1
This commit is contained in:
58
components/navbar-back/navbar-back.vue
Normal file
58
components/navbar-back/navbar-back.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<up-navbar
|
||||
v-bind="$attrs"
|
||||
:bgColor="bgColor"
|
||||
titleStyle="color:#fff"
|
||||
leftIconColor="#fff"
|
||||
:left-text="leftText"
|
||||
:title="title"
|
||||
placeholder
|
||||
:autoBack="autoBack"
|
||||
:leftIcon="leftIcon"
|
||||
@rightClick="rightClick"
|
||||
@leftClick="leftClick"
|
||||
>
|
||||
<template #right>
|
||||
<slot></slot>
|
||||
</template>
|
||||
</up-navbar>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const emits = defineEmits(['leftClick', 'rightClick'])
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
autoBack: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#fff'
|
||||
},
|
||||
leftIcon: {
|
||||
type: String,
|
||||
default: 'arrow-left'
|
||||
},
|
||||
leftText: {
|
||||
type: String,
|
||||
default: '返回'
|
||||
},
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '#0055A2'
|
||||
}
|
||||
})
|
||||
|
||||
function rightClick() {
|
||||
emits('rightClick')
|
||||
}
|
||||
function leftClick() {
|
||||
emits('leftClick')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user