1 line
5.9 KiB
JSON
1 line
5.9 KiB
JSON
{"ast":null,"code":"import { toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\";\nconst _withScopeId = n => (_pushScopeId(\"data-v-29a90e41\"), n = n(), _popScopeId(), n);\nconst _hoisted_1 = {\n class: \"switchtab\"\n};\nconst _hoisted_2 = {\n class: \"nav\"\n};\nconst _hoisted_3 = {\n class: \"content\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_GoodRoad = _resolveComponent(\"GoodRoad\");\n const _component_TableList = _resolveComponent(\"TableList\");\n return _openBlock(), _createElementBlock(\"div\", _hoisted_1, [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"div\", {\n class: _normalizeClass([\"li good\", {\n active: $data.active == 0\n }]),\n onClick: _cache[0] || (_cache[0] = $event => $options.chooseType(0))\n }, _toDisplayString(_ctx.Lang[_ctx.Type].good_road_tip), 3 /* TEXT, CLASS */), _createElementVNode(\"div\", {\n class: _normalizeClass([\"li switch\", {\n active: $data.active == 1\n }]),\n onClick: _cache[1] || (_cache[1] = $event => $options.chooseType(1))\n }, _toDisplayString(_ctx.Lang[_ctx.Type].switch_table), 3 /* TEXT, CLASS */)]), _createElementVNode(\"div\", _hoisted_3, [$data.active == 0 ? (_openBlock(), _createBlock(_component_GoodRoad, {\n key: 0,\n onClose: $options.close\n }, null, 8 /* PROPS */, [\"onClose\"])) : _createCommentVNode(\"v-if\", true), $data.active == 1 ? (_openBlock(), _createBlock(_component_TableList, {\n key: 1,\n onClose: $options.close,\n tabInfo: $props.tabInfo\n }, null, 8 /* PROPS */, [\"onClose\", \"tabInfo\"])) : _createCommentVNode(\"v-if\", true)])]);\n}","map":{"version":3,"names":["class","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_normalizeClass","active","$data","onClick","_cache","$event","$options","chooseType","_ctx","Lang","Type","good_road_tip","switch_table","_hoisted_3","_createBlock","_component_GoodRoad","onClose","close","_component_TableList","tabInfo","$props"],"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.switchtab {\n width: 100%;\n height: 100%;\n background: #fff;\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 #e5e6e8 0%,\n #e5e6e8 50%,\n #fff 50%,\n #fff 100%\n );\n .li {\n width: 50%;\n height: 100%;\n text-align: center;\n font-weight: 600;\n background: #e5e6e8;\n overflow: hidden;\n color: #808589;\n &.good {\n border-bottom-right-radius: 0.3rem;\n &.active {\n background: #fff;\n border-top-right-radius: 0.3rem;\n border-bottom-right-radius: 0;\n color: #333;\n }\n }\n &.switch {\n border-bottom-left-radius: 0.3rem;\n &.active {\n border-top-left-radius: 0.3rem;\n background: #fff;\n color: #333;\n }\n }\n }\n }\n .content {\n height: calc(100% - 1.3rem);\n width: 100%;\n overflow: hidden;\n }\n}\n</style>\n"],"mappings":";;;EACOA,KAAK,EAAC;AAAW;;EACfA,KAAK,EAAC;AAAK;;EAgBXA,KAAK,EAAC;AAAS;;;;uBAjBtBC,mBAAA,CAyBM,OAzBNC,UAyBM,GAxBJC,mBAAA,CAeM,OAfNC,UAeM,GAdJD,mBAAA,CAMM;IALJH,KAAK,EAAAK,eAAA,EAAC,SAAS;MAAAC,MAAA,EACGC,KAAA,CAAAD,MAAM;IAAA;IACvBE,OAAK,EAAAC,MAAA,QAAAA,MAAA,MAAAC,MAAA,IAAEC,QAAA,CAAAC,UAAU;sBAEfC,IAAA,CAAAC,IAAI,CAACD,IAAA,CAAAE,IAAI,EAAEC,aAAa,yBAE7Bb,mBAAA,CAMM;IALJH,KAAK,EAAAK,eAAA,EAAC,WAAW;MAAAC,MAAA,EACCC,KAAA,CAAAD,MAAM;IAAA;IACvBE,OAAK,EAAAC,MAAA,QAAAA,MAAA,MAAAC,MAAA,IAAEC,QAAA,CAAAC,UAAU;sBAEfC,IAAA,CAAAC,IAAI,CAACD,IAAA,CAAAE,IAAI,EAAEE,YAAY,wB,GAG9Bd,mBAAA,CAOM,OAPNe,UAOM,GANYX,KAAA,CAAAD,MAAM,S,cAAtBa,YAAA,CAAuDC,mBAAA;;IAAzBC,OAAK,EAAEV,QAAA,CAAAW;6EAE7Bf,KAAA,CAAAD,MAAM,S,cADda,YAAA,CAIaI,oBAAA;;IAFVF,OAAK,EAAEV,QAAA,CAAAW,KAAK;IACZE,OAAO,EAAEC,MAAA,CAAAD"},"metadata":{},"sourceType":"module","externalDependencies":[]} |