dingdong-mall/components/custom-bar/module-bar.vue

44 lines
1.2 KiB
Vue
Raw Normal View History

2022-03-15 17:38:58 +08:00
<template>
<!-- 底部fixed操作条包含发布选项普通文字加icon加标签选项 -->
<view class="cu-bar tabbar margin-bottom-xl bg-white fixed-bottom-bar">
<view class="action text-gray add-action" v-for="(item, index) in moduleBarInfos" :key="index"
v-if="item.action === 'add'">
<button class="cu-btn bg-main-color shadow" :class="'cuIcon-' + item.cuIcon"></button>
2022-03-15 17:38:58 +08:00
{{item.name}}
</view>
<view class="action text-main-color" v-else-if="index === 0">
2022-03-15 17:38:58 +08:00
<view :class="'cuIcon-' + item.cuIcon">
<view class="cu-tag badge" v-if="item.countTag">{{item.countTag > 99 ? '99+' : item.countTag}}</view>
</view>
{{item.name}}
</view>
<view class="action text-gray" v-else-if="index > 0">
<view :class="'cuIcon-' + item.cuIcon">
<view class="cu-tag badge" v-if="item.countTag">{{item.countTag > 99 ? '99+' : item.countTag}}</view>
</view>
{{item.name}}
</view>
</view>
</template>
<script>
export default {
name: "module-bar",
props: {
moduleBarInfos: {
type: Array,
default: []
}
},
data() {
return {};
},
methods: {
}
}
</script>
<style>
2022-03-15 17:38:58 +08:00
</style>