1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <view>
- <u-navbar :is-back="showBackBtn" :title="title" z-index="99999999999999">
- <view class="slot-wrap">
- <img class="homeIcon" src="@/static/modIcon/home-1.png" alt="" v-if="showHomeBtn"
- @click="goHome()">
- </view>
- </u-navbar>
- </view>
- </template>
- <script>
- export default {
- name: "navBar",
- props: {
- statusBar: {
- type: Boolean,
- default: true,
- },
- title: {
- type: String,
- default: "",
- },
- showBackBtn: {
- type: Boolean,
- default: true,
- },
- showHomeBtn: {
- type: Boolean,
- default: true,
- },
- },
- components: {},
- data() {
- return {};
- },
- onLoad() {},
- created() {},
- mounted() {},
- onPageShow() {},
- methods: {
- goHome() {
- uni.switchTab({
- url: "/pages/index/index",
- });
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .homeIcon {
- margin-left: 20rpx;
- width: 42rpx;
- height: 42rpx;
- }
- .slot-wrap {
- display: flex;
- align-items: center;
- }
- </style>
|