Commit 714fad7f by 张成

update

parent 6d7235bc
<template>
<!-- Tab -->
<u-tabbar zIndex="10075" v-model="selectedTabbar" :border="false" inactive-color="#000000" active-color="#006ECF" :fixed="true" :safeAreaInsetBottom="true" @change="beforeSwitch">
<u-tabbar-item v-for="(item,index) in list" :key="item.text" :text="item.text" :icon="selectedTabbar==index?item.activeIcon:item.icon"></u-tabbar-item>
<u-tabbar zIndex="10075" v-model="selectedTabbar" :border="false" inactive-color="#000000" active-color="#006ECF"
:fixed="true" :safeAreaInsetBottom="true" @change="beforeSwitch">
<u-tabbar-item v-for="(item, index) in list" :key="item.text" :text="item.text"
:icon="selectedTabbar == index ? item.activeIcon : item.icon"></u-tabbar-item>
</u-tabbar>
</template>
<script>
export default {
data() {
return{
return {
}
},
props:['selectedTabbar'],
computed:{
list(){
props: ['selectedTabbar'],
computed: {
list() {
// tabbar List
return this.$store.state.list;
}
},
methods:{
methods: {
//点击tab
beforeSwitch(index) {
uni.switchTab({url:this.list[index].pagePath});
uni.switchTab({ url: this.list[index].pagePath });
return true;
}
}
......@@ -30,5 +32,4 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
{
"name": "hooloo",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"uview-ui": "^2.0.31"
}
},
"node_modules/uview-ui": {
"version": "2.0.31",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.31.tgz",
"integrity": "sha512-I/0fGuvtiKHH/mBb864SGYk+SJ7WaF32tsBgYgeBOsxlUp+Th+Ac2tgz2cTvsQJl6eZYWsKZ3ixiSXCAcxZ8Sw==",
"engines": {
"HBuilderX": "^3.1.0"
}
}
},
"lockfileVersion": 1,
"dependencies": {
"uview-ui": {
"version": "2.0.31",
......
<template>
<view>
<view class="menu-banner">
<view class="log">
<image class="logImg" src="/static/imgs/hooloo.png"></image>
<view class="logText">未 来 咖 啡</view>
</view>
<image src="../../static/imgs/banner.png"></image>
</view>
<tabBar :selectedTabbar="selectedTabbar"></tabBar>
</view>
</template>
<script>
export default {
export default {
data() {
return {
selectedTabbar:2,//选中的tab
selectedTabbar: 2,//选中的tab
}
},
computed:{
computed: {
},
methods: {
}
}
}
</script>
<style>
<style lang="scss" scoped>
.menu-box {}
.menu-banner {
height: 376rpx;
position: relative;
.log {
position: absolute;
top: 100rpx;
left: 30rpx;
.logImg {
width: 312rpx;
height: 72rpx;
}
.logText {
font-size: 42rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #FFFFFF;
}
}
image {
width: 100%;
height: 376rpx;
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment