GamePortrait/node_modules/.cache/babel-loader/e8a8be06d57a3b83176afed3a17e93adc52eab3182823526adb4d6f9cabac313.json

1 line
6.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":{"version":3,"names":["ref","onMounted","computed","useRouter","useStore","Tabbar","TabbarItem","showToast","name","components","setup","router","store","Type","state","config","$Type","Lang","$lang","active","tabbar","icon","text","to","handleClick","item","push","message","value","msg_waiting_development","position"],"sources":["/Users/li/Desktop/work/work2/OG/GamePortrait/src/components/Tabbar.vue"],"sourcesContent":["<template>\n\t<div class=\"tabbar\">\n\t\t<van-tabbar v-model=\"active\">\n\t\t\t<van-tabbar-item v-for=\"(item, index) in tabbar\" :key=\"index\" :name=\"item.name\" @click=\"handleClick(item)\">\n\t\t\t\t<template #icon=\"props\">\n\t\t\t\t\t<span class=\"tab-icon\" :class=\"{ active: props.active }\">{{ item.icon }}</span>\n\t\t\t\t</template>\n\t\t\t\t<span class=\"tab-text\" :class=\"{ active: active === item.name }\">{{ item.text }}</span>\n\t\t\t</van-tabbar-item>\n\t\t</van-tabbar>\n\t</div>\n</template>\n\n<script>\n\timport {\n\t\tref,\n\t\tonMounted,\n\t\tcomputed\n\t} from \"vue\"\n\timport {\n\t\tuseRouter\n\t} from \"vue-router\"\n\timport {\n\t\tuseStore\n\t} from \"vuex\"\n\timport {\n\t\tTabbar,\n\t\tTabbarItem,\n\t\tshowToast\n\t} from \"vant\"\n\texport default {\n\t\tname: \"TabBar\",\n\t\tcomponents: {\n\t\t\t\"van-tabbar\": Tabbar,\n\t\t\t\"van-tabbar-item\": TabbarItem\n\t\t},\n\t\tsetup() {\n\t\t\tconst router = useRouter()\n\t\t\tconst store = useStore()\n\t\t\tconst Type = computed(() => store.state.config.$Type)\n\t\t\tconst Lang = computed(() => store.state.config.$lang)\n\t\t\tconst active = ref(\"hall\")\n\t\t\t\n\t\t\t// 5个功能图标 - 深色豪华风格\n\t\t\tconst tabbar = ref([\n\t\t\t\t{\n\t\t\t\t\tname: \"hall\",\n\t\t\t\t\ticon: \"🏠\",\n\t\t\t\t\ttext: \"大厅\",\n\t\t\t\t\tto: \"/baccarat\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"statement\",\n\t\t\t\t\ticon: \"📊\",\n\t\t\t\t\ttext: \"报表\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"message\",\n\t\t\t\t\ticon: \"💬\",\n\t\t\t\t\ttext: \"消息\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"record\",\n\t\t\t\t\ticon: \"📝\",\n\t\t\t\t\ttext: \"记录\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"profile\",\n\t\t\t\t\ticon: \"👤\",\n\t\t\t\t\ttext: \"我的\"\n\t\t\t\t}\n\t\t\t])\n\n\t\t\tconst handleClick = (item) => {\n\t\t\t\tif (item.to) {\n\t\t\t\t\trouter.push(item.to)\n\t\t\t\t} else {\n\t\t\t\t\t// 功能开发中提示\n\t\t\t\t\tshowToast({\n\t\t\t\t\t\tmessage: Lang.value?.[Type.value]?.msg_waiting_development || \"功能开发中\",\n\t\t\t\t\t\tposition: \"bottom\"\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tonMounted(() => {\n\t\t\t\tactive.value = \"hall\"\n\t\t\t})\n\t\t\t\n\t\t\treturn {\n\t\t\t\ttabbar,\n\t\t\t\tactive,\n\t\t\t\thandleClick\n\t\t\t}\n\t\t}\n\t}\n</script>\n<style lang=\"scss\" scoped>\n\t/* 深色豪华风格 Tabbar */\n\t$dark-bg: #1a1a1a;\n\t$gold: #c5a059;\n\t$text-muted: #666666;\n\t\n\t.tabbar {\n\t\tposition: absolute;\n\t\twidth: 100%;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\tz-index: 25;\n\t\tbackground: $dark-bg;\n\t\tborder-top: 1px solid #333;\n\t}\n\n\t.van-tabbar--fixed {\n\t\tposition: static;\n\t\twidth: 100%;\n\t\theight: 56px;\n\t}\n\n\t.van-tabbar {\n\t\tbackground: $dark-bg !important;\n\t\theight: 56px;\n\t\t\n\t\t&::before {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t.van-tabbar-item {\n\t\tcolor: $text-muted;\n\t\t\n\t\t&--active {\n\t\t\tbackground: transparent !important;\n\t\t\tcolor: $gold !important;\n\t\t}\n\t}\n\n\t.tab-icon {\n\t\tfont-size: 20px;\n\t\tfilter: grayscale(1) opacity(0.5);\n\t\ttransition: all 0.2s ease;\n\t\t\n\t\t&.active {\n\t\t\tfilter: grayscale(0) opacity(1);\n\t\t}\n\t}\n\n\t.tab-text {\n\t\tfont-size: 10px;\n\t\tcolor: $text-muted;\n\t\tmargin-top: 2px;\n\t\t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