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

<style></style>
