64 lines
1.1 KiB
Vue
64 lines
1.1 KiB
Vue
<template>
|
|
<view>
|
|
<view class="sticky-box">
|
|
<view>
|
|
<tui-tabs :tabs="tabList" badgeBgColor="var(--ui-BG-Main)" selectedColor="var(--ui-BG-Main)" sliderBgColor="var(--ui-BG-Main)" :currentTab="currentTab" @change="change"></tui-tabs>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import tuiTabs from "@/components/thorui/tui-tabs/tui-tabs.vue"
|
|
import sheep from '@/sheep';
|
|
export default {
|
|
components: {
|
|
tuiTabs,
|
|
},
|
|
props: {
|
|
clerk: {
|
|
type: Object,
|
|
default: {},
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
|
|
}
|
|
},
|
|
computed: {
|
|
tabList() {
|
|
var tabs = [{
|
|
name: '礼物墙'
|
|
},{
|
|
name: '价格'
|
|
}, {
|
|
name: '动态',
|
|
num: this.clerk.trendNum,
|
|
}, {
|
|
name: '评价',
|
|
num: this.clerk.commentNum,
|
|
}];
|
|
return tabs;
|
|
},
|
|
currentTab() {
|
|
return sheep.$store('sys').clerkTabIndex;
|
|
},
|
|
},
|
|
created() {
|
|
|
|
},
|
|
methods: {
|
|
change(e) {
|
|
this.$emit('change', e.index);
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.sticky-box {
|
|
background-color: #fff;
|
|
padding: 5px 0;
|
|
}
|
|
</style> |