<template>
	<u-tabbar :value="value" :list="tabbar_list" :active-color="activeColor" :border-top="false"></u-tabbar>
</template>

<script>
export default {
	model: {
		props: 'value'
	},
	props: {
		value: {
			type: Number,
			default: 0
		}
	},
	computed: {
		tabbar_list() {
			return [
				{
					iconPath: 'https://onlineimg.qianniao.vip/tar-home-unsel.png',
					selectedIconPath: 'https://onlineimg.qianniao.vip/tar-home-' + this.theme + '.png',
					text: '首页',
					customIcon: false,
					pagePath: '/pages/index/index'
				},
				{
					iconPath: 'https://onlineimg.qianniao.vip/tar-cate-unsel.png',
					selectedIconPath: 'https://onlineimg.qianniao.vip/tar-cate-' + this.theme + '.png',
					text: '分类',
					customIcon: false,
					pagePath: '/pages/classification/cate'
				},
				{
					iconPath: 'https://onlineimg.qianniao.vip/tar-car-unsel.png',
					selectedIconPath: 'https://onlineimg.qianniao.vip/tar-car-' + this.theme + '.png',
					text: '购物车',
					customIcon: false,
					// 红色角标显示的数字，如果需要移除角标，配置此参数为0即可
					count: this.$store.state.cartNum,
					pagePath: '/pages/cart/cart'
				},
				{
					iconPath: 'https://onlineimg.qianniao.vip/tar-my-unsel.png',
					selectedIconPath: 'https://onlineimg.qianniao.vip/tar-my-' + this.theme + '.png',
					text: '我的',
					customIcon: false,
					pagePath: '/pages/user/user'
				}
			];
		},
		activeColor() {
			return this.$store.state.baseSet.themeStyle.color_o || '#FD463E';
			// return '#FD463E';
		}
	}
};
</script>

<style></style>
