main
Ldy20010130 5 months ago
parent 07cb23a3a7
commit 993a73c9bc

@ -1,43 +1,17 @@
<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 :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>
@ -45,35 +19,51 @@
</template>
<script>
export default {
name: 'tabbar',
props: {
value: {
type: [Number, String]
export default {
name: 'tabbar',
props: {
value: {
type: [Number, String]
},
xiaoxi: {
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');
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>
<style lang="scss">
/deep/.u-tabbar--fixed {
height: calc(45px + constant(safe-area-inset-bottom));
height: 45px;
position: fixed;
left: 0;
right: 0;
bottom: 0;
/* 直接扩展高度因为padding-bottom是内边距 */
height: calc(45px + env(safe-area-inset-bottom));
/* 直接扩展高度 */
padding-bottom: constant(safe-area-inset-bottom);
/*兼容 iOS<11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容iOS>= 11.2*/
}
</style>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -2,13 +2,17 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name='viewport' content="width=device-width, viewport-fit=cover" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="renderer" content="webkit">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="shortcut icon" type="image/x-icon" href="<%= BASE_URL %>static/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="<%= BASE_URL %>static/favicon.ico">
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
@ -17,4 +21,12 @@
<strong>本站点必须要开启JavaScript才能运行.</strong>
</noscript>
<div id="app"></div>
<style>
#app {
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS<11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容iOS>= 11.2 */
}
</style>
</html>
Loading…
Cancel
Save