| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <template>
- <u-navbar :title="title" placeholder class="custom_nav_bar">
- <template slot="left">
- <slot name="left">
- <view class="u-nav-slot">
- <image
- @click="leftClick"
- class="back_icon"
-
- src="../../static/images/common_left_arrow.png"
- style="width: 12px;height: 20px;"
- alt=""
- srcset=""
- />
- </view>
- </slot>
- </template>
- <template slot="center">
- <slot name="center"></slot>
- </template>
- <template slot="right">
- <slot name="more">
- <view @click="rightClick" v-if="more" class="u-nav-slot">
- <u-icon class="more_dot" name="more-dot-fill" size="23" color="#0C1C33"></u-icon>
- </view>
- </slot>
- </template>
- </u-navbar>
- </template>
- <script>
- export default {
- name: '',
- components: {},
- props: {
- title: {
- type: String
- },
- more: {
- type: Boolean,
- default: false
- },
- route: {
- type: Boolean,
- default: true
- }
- },
- data() {
- return {};
- },
- methods: {
- leftClick() {
- if (this.route) {
- uni.navigateBack();
- }
- this.$emit('leftClick');
- },
- rightClick() {
- this.$emit('rightClick');
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .custom_nav_bar {
- /deep/ .u-navbar__content__left {
- padding: 0;
- }
- /deep/ .u-navbar__content__right {
- padding: 0;
- }
- .back_icon {
- padding: 24rpx;
- margin-left: 20rpx;
- width: 12px;
- height: 20px;
- }
- .more_dot {
- padding: 24rpx;
- margin-right: 20rpx;
- }
- }
- </style>
|