<template>
  <!-- 底部横条 -->
  <!-- <div> -->
  <van-tabbar route active-color="#FF3456" inactive-color="#404d74">
    <van-tabbar-item replace to="/home" icon="wap-home">首页</van-tabbar-item>
    <van-tabbar-item replace to="/trading" :dot="hasAlarm" icon="gold-coin">交易</van-tabbar-item>
    <van-tabbar-item replace to="/position" icon="goods-collect">持仓</van-tabbar-item>
    <van-tabbar-item replace to="/user" icon="contact">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script>
import { onMounted, computed } from "vue";
import { useStore } from "vuex";

export default {
  props: {
    hasAlarm: {
      type: Boolean,
      default: false
    }
  },
  setup() {
    // const router = useRouter()
    const store = useStore();
    onMounted(() => {

    });
    const count = computed(() => {
      return store.state.cartCount;
    });

    return {
      count,
    };
  },
};
</script>

<style lang="less" scoped>
@import "../common/style/mixin";
</style>