main
Ldy20010130 5 months ago
parent 07cb23a3a7
commit 993a73c9bc

@ -1,43 +1,17 @@
<template> <template>
<view> <view>
<u-tabbar :value="value1" :fixed="true" :placeholder="false" :safeAreaInsetBottom="false"> <u-tabbar :value="value1" :fixed="true" :placeholder="false" :safeAreaInsetBottom="false">
<u-tabbar-item <u-tabbar-item :badge="`${item.menuName === '工作待办' ? $store.state.mine.xiaoxi : 0}`"
:badge="`${item.menuName === '工作待办' ? $store.state.mine.xiaoxi : 0}`" v-for="(item, index) in isMenu" :key="index" :text="item.menuName" :name="item.menuName"
v-for="(item, index) in isMenu" @click="click1(item.path)">
:key="index" <image v-if="item.menuName === ''" class="u-page item slot-icon" slot="active-icon"
:text="item.menuName" 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"
:name="item.menuName" src="../../static/images/login/user.png" style="height: 25px;width: 25px"></image>
@click="click1(item.path)" <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 <image v-if="item.menuName === ''" class="u-page item slot-icon" slot="inactive-icon"
v-if="item.menuName === '工作待办'" src="../../static/images/login/user.png" style="height: 25px;width: 25px"></image>
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-item>
</u-tabbar> </u-tabbar>
<view style="height: 50px; width: 100%;"></view> <view style="height: 50px; width: 100%;"></view>
@ -45,35 +19,51 @@
</template> </template>
<script> <script>
export default { export default {
name: 'tabbar', name: 'tabbar',
props: { props: {
value: { value: {
type: [Number, String] type: [Number, String]
},
xiaoxi: {
type: [Number, String]
}
}, },
xiaoxi: { onShow() {
type: [Number, String] this.xiaoxi = this.$store.state.mine.xiaoxi;
} },
}, data() {
onShow() { return {
this.xiaoxi = this.$store.state.mine.xiaoxi; //
}, isMenu: this.$store.getters.saveMenu,
data() { //tabber
return { value1: this.$props.value
// };
isMenu: this.$store.getters.saveMenu, },
//tabber methods: {
value1: this.$props.value click1(e) {
}; this.$tab.reLaunch(e);
}, //
methods: { this.$store.dispatch('getNewsListOne');
click1(e) { }
this.$tab.reLaunch(e);
//
this.$store.dispatch('getNewsListOne');
} }
} };
};
</script> </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"> <html lang="zh-CN">
<head> <head>
<meta charset="utf-8"> <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 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> <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> <script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
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' : '') + '" />') .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> </script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" /> <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head> </head>
@ -17,4 +21,12 @@
<strong>本站点必须要开启JavaScript才能运行.</strong> <strong>本站点必须要开启JavaScript才能运行.</strong>
</noscript> </noscript>
<div id="app"></div> <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> </html>
Loading…
Cancel
Save