1 line
5.2 KiB
JSON
1 line
5.2 KiB
JSON
{"ast":null,"code":"import { mapState } from \"vuex\";\nimport GoodRoad from \"@/components/GoodRoad.vue\";\nimport TableList from \"@/components/TableList.vue\";\nexport default {\n name: \"SwitchTab\",\n props: {\n tabInfo: Object,\n default: () => ({\n game_id: 1,\n table_id: null\n })\n },\n data() {\n return {\n active: 0\n };\n },\n components: {\n GoodRoad,\n TableList\n },\n created() {},\n methods: {\n chooseType(active) {\n this.active = active;\n },\n close() {\n this.$emit(\"showSwitchtab\", false);\n }\n },\n computed: {\n ...mapState({\n Lang: state => state.config.$lang,\n Type: state => state.config.$Type,\n font: state => state.config.fonstSize,\n tabData: state => state.app.allTableData,\n userInfo: state => state.app.userInfo\n })\n },\n watch: {}\n};","map":{"version":3,"names":["mapState","GoodRoad","TableList","name","props","tabInfo","Object","default","game_id","table_id","data","active","components","created","methods","chooseType","close","$emit","computed","Lang","state","config","$lang","Type","$Type","font","fonstSize","tabData","app","allTableData","userInfo","watch"],"sources":["/Users/li/Desktop/work/work2/OG/GamePortrait/src/components/SwitchTab2.vue"],"sourcesContent":["<template>\n <div class=\"switchtab\">\n <div class=\"nav\">\n <div\n class=\"li good\"\n :class=\"{ active: active == 0 }\"\n @click=\"chooseType(0)\"\n >\n {{ Lang[Type].good_road_tip }}\n </div>\n <div\n class=\"li switch\"\n :class=\"{ active: active == 1 }\"\n @click=\"chooseType(1)\"\n >\n {{ Lang[Type].switch_table }}\n </div>\n </div>\n <div class=\"content\">\n <GoodRoad v-if=\"active == 0\" @close=\"close\"></GoodRoad>\n <TableList\n v-if=\"active == 1\"\n @close=\"close\"\n :tabInfo=\"tabInfo\"\n ></TableList>\n </div>\n </div>\n</template>\n<script>\nimport { mapState } from \"vuex\"\nimport GoodRoad from \"@/components/GoodRoad.vue\"\nimport TableList from \"@/components/TableList.vue\"\nexport default {\n name: \"SwitchTab\",\n props: {\n tabInfo: Object,\n default: () => ({\n game_id: 1,\n table_id: null\n })\n },\n data() {\n return {\n active: 0\n }\n },\n components: { GoodRoad, TableList },\n created() {},\n methods: {\n chooseType(active) {\n this.active = active\n },\n close() {\n this.$emit(\"showSwitchtab\", false)\n }\n },\n computed: {\n ...mapState({\n Lang: (state) => state.config.$lang,\n Type: (state) => state.config.$Type,\n font: (state) => state.config.fonstSize,\n tabData: (state) => state.app.allTableData,\n userInfo: (state) => state.app.userInfo\n })\n },\n watch: {}\n}\n</script>\n<style lang=\"scss\" scoped>\n/* 深色豪华主题配色 */\n$dark-bg: #0d0d0d;\n$dark-bg-secondary: #1a1a1a;\n$card-bg: #1e1e1e;\n$border-color: #333;\n$gold: #c5a059;\n$text-primary: #ffffff;\n$text-secondary: #888888;\n\n.switchtab {\n width: 100%;\n height: 100%;\n background: $dark-bg-secondary;\n transform: rotateX(0deg);\n .nav {\n height: 1.32rem;\n line-height: 1.32rem;\n display: flex;\n align-items: center;\n font-size: 0.44rem;\n background: linear-gradient(\n to bottom,\n $dark-bg 0%,\n $dark-bg 50%,\n $dark-bg-secondary 50%,\n $dark-bg-secondary 100%\n );\n .li {\n width: 50%;\n height: 100%;\n text-align: center;\n font-weight: 600;\n background: $dark-bg;\n overflow: hidden;\n color: $text-secondary;\n &.good {\n border-bottom-right-radius: 0.3rem;\n &.active {\n background: $dark-bg-secondary;\n border-top-right-radius: 0.3rem;\n border-bottom-right-radius: 0;\n color: $gold;\n }\n }\n &.switch {\n border-bottom-left-radius: 0.3rem;\n &.active {\n border-top-left-radius: 0.3rem;\n background: $dark-bg-secondary;\n color: $gold;\n }\n }\n }\n }\n .content {\n height: calc(100% - 1.3rem);\n width: 100%;\n overflow: hidden;\n background: $dark-bg-secondary;\n }\n}\n</style>\n"],"mappings":"AA6BA,SAASA,QAAO,QAAS,MAAK;AAC9B,OAAOC,QAAO,MAAO,2BAA0B;AAC/C,OAAOC,SAAQ,MAAO,4BAA2B;AACjD,eAAe;EACbC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE;IACLC,OAAO,EAAEC,MAAM;IACfC,OAAO,EAAEA,CAAA,MAAO;MACdC,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAE;IACZ,CAAC;EACH,CAAC;EACDC,IAAIA,CAAA,EAAG;IACL,OAAO;MACLC,MAAM,EAAE;IACV;EACF,CAAC;EACDC,UAAU,EAAE;IAAEX,QAAQ;IAAEC;EAAU,CAAC;EACnCW,OAAOA,CAAA,EAAG,CAAC,CAAC;EACZC,OAAO,EAAE;IACPC,UAAUA,CAACJ,MAAM,EAAE;MACjB,IAAI,CAACA,MAAK,GAAIA,MAAK;IACrB,CAAC;IACDK,KAAKA,CAAA,EAAG;MACN,IAAI,CAACC,KAAK,CAAC,eAAe,EAAE,KAAK;IACnC;EACF,CAAC;EACDC,QAAQ,EAAE;IACR,GAAGlB,QAAQ,CAAC;MACVmB,IAAI,EAAGC,KAAK,IAAKA,KAAK,CAACC,MAAM,CAACC,KAAK;MACnCC,IAAI,EAAGH,KAAK,IAAKA,KAAK,CAACC,MAAM,CAACG,KAAK;MACnCC,IAAI,EAAGL,KAAK,IAAKA,KAAK,CAACC,MAAM,CAACK,SAAS;MACvCC,OAAO,EAAGP,KAAK,IAAKA,KAAK,CAACQ,GAAG,CAACC,YAAY;MAC1CC,QAAQ,EAAGV,KAAK,IAAKA,KAAK,CAACQ,GAAG,CAACE;IACjC,CAAC;EACH,CAAC;EACDC,KAAK,EAAE,CAAC;AACV"},"metadata":{},"sourceType":"module","externalDependencies":[]} |