You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.7 KiB
80 lines
1.7 KiB
2 months ago
|
<template>
|
||
|
<view>
|
||
|
<u-tabbar :value="value1" :fixed="true" :placeholder="false" :safeAreaInsetBottom="false">
|
||
|
<u-tabbar-item
|
||
|
:badge="`${item.menuName === '工作待办' ? $store.state.mine.xiaoxi : 0}`"
|
||
|
v-for="(item, index) in isMenu"
|
||
|
:key="index"
|
||
|
:text="item.menuName"
|
||
|
|
||
|
:name="item.menuName"
|
||
|
@click="click1(item.path)"
|
||
|
>
|
||
|
<image
|
||
|
v-if="item.menuName === '工作待办'"
|
||
|
class="u-page item slot-icon"
|
||
|
slot="active-icon"
|
||
|
src="../../static/images/login/chat.png"
|
||
|
style="height: 25px;width: 25px"
|
||
|
></image>
|
||
|
<image
|
||
|
v-if="item.menuName === '首页'"
|
||
|
class="u-page item slot-icon"
|
||
|
slot="active-icon"
|
||
|
src="../../static/images/login/user.png"
|
||
|
style="height: 25px;width: 25px"
|
||
|
></image>
|
||
|
<image
|
||
|
v-if="item.menuName === '工作待办'"
|
||
|
class="u-page item slot-icon"
|
||
|
slot="inactive-icon"
|
||
|
src="../../static/images/login/chat.png"
|
||
|
style="height: 25px;width: 25px"
|
||
|
></image>
|
||
|
<image
|
||
|
v-if="item.menuName === '首页'"
|
||
|
class="u-page item slot-icon"
|
||
|
slot="inactive-icon"
|
||
|
src="../../static/images/login/user.png"
|
||
|
style="height: 25px;width: 25px"
|
||
|
></image>
|
||
|
</u-tabbar-item>
|
||
|
</u-tabbar>
|
||
|
<view style="height: 50px; width: 100%;"></view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: 'tabbar',
|
||
|
props: {
|
||
|
value: {
|
||
|
type: [Number, String]
|
||
|
},
|
||
|
xiaoxi: {
|
||
|
type: [Number, String]
|
||
|
}
|
||
|
},
|
||
|
onShow() {
|
||
|
this.xiaoxi = this.$store.state.mine.xiaoxi;
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
//菜单权限数组
|
||
|
isMenu: this.$store.getters.saveMenu,
|
||
|
//tabber颜色接收
|
||
|
value1: this.$props.value
|
||
|
};
|
||
|
},
|
||
|
methods: {
|
||
|
click1(e) {
|
||
|
this.$tab.reLaunch(e);
|
||
|
//获取消息条数
|
||
|
this.$store.dispatch('getNewsListOne');
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss"></style>
|