1 line
1.6 KiB
JSON
1 line
1.6 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport { ref, onMounted, computed } from \"vue\";\nimport { useRouter } from \"vue-router\";\nimport { useStore } from \"vuex\";\nimport { Tabbar, TabbarItem, showToast } from \"vant\";\nexport default {\n name: \"TabBar\",\n components: {\n \"van-tabbar\": Tabbar,\n \"van-tabbar-item\": TabbarItem\n },\n setup() {\n const router = useRouter();\n const store = useStore();\n const Type = computed(() => store.state.config.$Type);\n const Lang = computed(() => store.state.config.$lang);\n const active = ref(\"hall\");\n\n // 5个功能图标 - 深色豪华风格\n const tabbar = ref([{\n name: \"hall\",\n icon: \"🏠\",\n text: \"大厅\",\n to: \"/baccarat\"\n }, {\n name: \"statement\",\n icon: \"📊\",\n text: \"报表\"\n }, {\n name: \"message\",\n icon: \"💬\",\n text: \"消息\"\n }, {\n name: \"record\",\n icon: \"📝\",\n text: \"记录\"\n }, {\n name: \"profile\",\n icon: \"👤\",\n text: \"我的\"\n }]);\n const handleClick = item => {\n if (item.to) {\n router.push(item.to);\n } else {\n // 功能开发中提示\n showToast({\n message: Lang.value?.[Type.value]?.msg_waiting_development || \"功能开发中\",\n position: \"bottom\"\n });\n }\n };\n onMounted(() => {\n active.value = \"hall\";\n });\n return {\n tabbar,\n active,\n handleClick\n };\n }\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]} |