星油车管小程序
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.
 
 
 
 

48 lines
1.0 KiB

<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>