d第一次提交
This commit is contained in:
38
components/tabBar/index.scss
Normal file
38
components/tabBar/index.scss
Normal file
@@ -0,0 +1,38 @@
|
||||
.tabBar_contaier {
|
||||
background: #ffffff;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
padding-top: 26rpx;
|
||||
|
||||
box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(213,233,255,0.8);
|
||||
border-radius: 82rpx 82rpx 0rpx 0rpx;
|
||||
.tabBar_item {
|
||||
image {
|
||||
width: 66rpx;
|
||||
height: 66rpx;
|
||||
}
|
||||
.tabBar_item_text{
|
||||
color: #CACACA;
|
||||
font-size: 20rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.select_tabBar_item_text{
|
||||
color: #121836;
|
||||
}
|
||||
}
|
||||
.tabBar_item:nth-child(3) {
|
||||
width: 50rpx;
|
||||
position: relative;
|
||||
image {
|
||||
position: absolute;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
top: -60rpx;
|
||||
padding: 10rpx;
|
||||
// left: -10rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
48
components/tabBar/tabBar.vue
Normal file
48
components/tabBar/tabBar.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<view class="tabBar_contaier flex around">
|
||||
<view @click="selectFn(item,index)" class="tabBar_item flex jc column ac" v-for="(item,index) in tabBarList " :key="index">
|
||||
<image :src="value==item.selectIndex?item.selectedIconPath:item.iconPath"></image>
|
||||
<view :class=" 'tabBar_item_text' + (value==item.selectIndex?' .select_tabBar_item_text':'') ">{{item.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import station from '@/api/station.js'
|
||||
export default {
|
||||
name: "tabBar",
|
||||
props:{
|
||||
value:{
|
||||
type:Number,
|
||||
default:0
|
||||
},
|
||||
tabBarList:{
|
||||
type:Array,
|
||||
default:()=>[]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
// debugger
|
||||
},
|
||||
methods:{
|
||||
async scanCode(){
|
||||
let res = await this.tool.scanCode();
|
||||
if(res.result){
|
||||
uni.navigateTo({
|
||||
url:`/ChargingStation/pages/placeOrder/index?type=qrCode&id=${res.result}`
|
||||
})
|
||||
}
|
||||
},
|
||||
selectFn(e,index){
|
||||
this.$emit('input',e.selectIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import 'index.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user