1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"ast":null,"code":"import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\";\nconst _withScopeId = n => (_pushScopeId(\"data-v-1f5d2044\"), n = n(), _popScopeId(), n);\nconst _hoisted_1 = {\n key: 0,\n class: \"online-pop\"\n};\nconst _hoisted_2 = {\n class: \"online-view\"\n};\nconst _hoisted_3 = {\n class: \"title\"\n};\nconst _hoisted_4 = {\n class: \"small\"\n};\nconst _hoisted_5 = {\n class: \"view\"\n};\nconst _hoisted_6 = {\n class: \"box\"\n};\nconst _hoisted_7 = {\n class: \"name\"\n};\nconst _hoisted_8 = {\n class: \"money\"\n};\nconst _hoisted_9 = {\n class: \"box\"\n};\nconst _hoisted_10 = {\n class: \"item down\"\n};\nconst _hoisted_11 = {\n class: \"lab\"\n};\nconst _hoisted_12 = {\n class: \"item time\"\n};\nconst _hoisted_13 = {\n class: \"lab\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_van_icon = _resolveComponent(\"van-icon\");\n return _openBlock(), _createBlock(_Transition, {\n name: \"custom-classes\",\n \"enter-active-class\": \"animate__animated animate__zoomIn\",\n \"leave-active-class\": \"animate__animated animate__zoomOut\"\n }, {\n default: _withCtx(() => [$setup.showOnLine ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [_createElementVNode(\"div\", _hoisted_2, [_createElementVNode(\"div\", _hoisted_3, [_createElementVNode(\"small\", _hoisted_4, _toDisplayString($setup.Lang[$setup.Type].nearly_20), 1 /* TEXT */), _createTextVNode(\" \" + _toDisplayString($setup.Lang[$setup.Type].player_list) + \" \", 1 /* TEXT */), _createVNode(_component_van_icon, {\n class: \"close\",\n name: \"cross\",\n onClick: $setup.closeOnLine\n }, null, 8 /* PROPS */, [\"onClick\"])]), _createElementVNode(\"div\", _hoisted_5, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.list, (item, index) => {\n return _openBlock(), _createElementBlock(\"div\", {\n class: \"list\",\n key: item\n }, [_createElementVNode(\"div\", {\n class: _normalizeClass([\"ranking\", [$setup.Type]])\n }, _toDisplayString(index != 0 ? index + 1 : \"\"), 3 /* TEXT, CLASS */), _createElementVNode(\"div\", {\n class: _normalizeClass([\"head\", [`head_${item.head}`]])\n }, [_createElementVNode(\"span\", {\n class: _normalizeClass([\"frame\", [`frame_${item.frame}`]])\n }, null, 2 /* CLASS */)], 2 /* CLASS */), _createElementVNode(\"div\", _hoisted_6, [_createElementVNode(\"div\", _hoisted_7, _toDisplayString(item.name), 1 /* TEXT */), _createElementVNode(\"div\", _hoisted_8, _toDisplayString(item.money), 1 /* TEXT */)]), _createElementVNode(\"div\", _hoisted_9, [_createElementVNode(\"div\", _hoisted_10, [_createElementVNode(\"span\", _hoisted_11, _toDisplayString($setup.Lang[$setup.Type].place_bet), 1 /* TEXT */), _createElementVNode(\"span\", null, _toDisplayString(item.win), 1 /* TEXT */)]), _createElementVNode(\"div\", _hoisted_12, [_createElementVNode(\"span\", _hoisted_13, _toDisplayString($setup.Lang[$setup.Type].to_win), 1 /* TEXT */), _createElementVNode(\"span\", null, _toDisplayString(item.time) + _toDisplayString($setup.Lang[$setup.Type].games), 1 /* TEXT */)])])]);\n }), 128 /* KEYED_FRAGMENT */))])])])) : _createCommentVNode(\"v-if\", true)]),\n _: 1 /* STABLE */\n });\n}","map":{"version":3,"names":["class","_createBlock","_Transition","name","$setup","showOnLine","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_hoisted_3","_hoisted_4","_toDisplayString","Lang","Type","nearly_20","player_list","_createVNode","_component_van_icon","onClick","closeOnLine","_hoisted_5","_Fragment","_renderList","list","item","index","key","_normalizeClass","head","frame","_hoisted_6","_hoisted_7","_hoisted_8","money","_hoisted_9","_hoisted_10","_hoisted_11","place_bet","win","_hoisted_12","_hoisted_13","to_win","time","games"],"sources":["/Users/li/Desktop/work/work2/OG/GamePortrait/src/components/OnLinePop.vue"],"sourcesContent":["<template>\n <Transition\n name=\"custom-classes\"\n enter-active-class=\"animate__animated animate__zoomIn\"\n leave-active-class=\"animate__animated animate__zoomOut\"\n >\n <div class=\"online-pop\" v-if=\"showOnLine\">\n <div class=\"online-view\">\n <div class=\"title\">\n <small class=\"small\">{{ Lang[Type].nearly_20 }}</small>\n {{ Lang[Type].player_list }}\n <van-icon class=\"close\" name=\"cross\" @click=\"closeOnLine\" />\n </div>\n <div class=\"view\">\n <div class=\"list\" v-for=\"(item, index) in list\" :key=\"item\">\n <div class=\"ranking\" :class=\"[Type]\">\n {{ index != 0 ? index + 1 : \"\" }}\n </div>\n <div class=\"head\" :class=\"[`head_${item.head}`]\">\n <span class=\"frame\" :class=\"[`frame_${item.frame}`]\"></span>\n </div>\n <div class=\"box\">\n <div class=\"name\">{{ item.name }}</div>\n <div class=\"money\">{{ item.money }}</div>\n </div>\n <div class=\"box\">\n <div class=\"item down\">\n <span class=\"lab\">{{ Lang[Type].place_bet }}</span>\n <span>{{ item.win }}</span>\n </div>\n <div class=\"item time\">\n <span class=\"lab\">{{ Lang[Type].to_win }}</span>\n <span>{{ item.time }}{{ Lang[Type].games }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </Transition>\n</template>\n\n<script>\nimport { computed } from \"vue\"\nimport { useStore } from \"vuex\"\nexport default {\n name: \"OnLinePop\",\n props: {},\n setup() {\n const store = useStore()\n const showOnLine = computed(() => store.state.config.showOnLine)\n const Type = computed(() => store.state.config.$Type)\n const Lang = computed(() => store.state.config.$lang)\n let list = []\n const getRndInteger = (min, max) => {\n return Math.floor(Math.random() * (max - min)) + min\n }\n const genUid = () => {\n const length = 9\n const soupLength = genUid.soup_.length\n let id = []\n for (let i = 0; i < length; i++) {\n id[i] = genUid.soup_.charAt(Math.random() * soupLength)\n }\n return `EZ` + id.join(\"\")\n }\n genUid.soup_ = \"0123456789\"\n\n for (let i = 0; i < 20; i++) {\n const time = getRndInteger(5, 20)\n const money = getRndInteger(4000, 99999)\n const drop = getRndInteger(1, 99) / 100\n const item = {\n name: genUid(),\n head: getRndInteger(1, 7),\n frame: getRndInteger(1, 5),\n time: time,\n win: parseInt(time * 3.14 * 800) + drop,\n money: (money + drop + parseInt(time * 3.14 * 800)).toFixed(2)\n }\n list.push(item)\n }\n const compare = (key, desc) => {\n //key: 用于排序的数组的key值\n //desc: 布尔值,为true是升序排序,false是降序排序\n return function (a, b) {\n let value1 = a[key]\n let value2 = b[key]\n if (desc == true) {\n // 升序排列\n return value1 - value2\n } else {\n // 降序排列\n return value2 - value1\n }\n }\n }\n list = list.sort(compare(\"money\", false))\n const closeOnLine = () => {\n store.commit(\"config/showOnLine\")\n }\n return { Type, Lang, list, showOnLine, closeOnLine }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.online-pop {\n position: absolute;\n transform: rotateX(0deg);\n z-index: 36;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n .online-view {\n width: 13.5rem;\n border: 1px solid #ddd;\n margin-top: 1.5rem;\n border-radius: 0.5rem;\n background: #fff;\n position: relative;\n overflow: hidden;\n left: 50%;\n margin-left: -6.75rem;\n padding-bottom: 0rem;\n font-size: 0.35rem;\n .title {\n font-size: 0.5rem;\n font-weight: 600;\n color: #333;\n text-align: center;\n width: 100%;\n margin-top: 0.5rem;\n margin-bottom: 0.52rem;\n position: relative;\n z-index: 2;\n transform: rotateX(0deg);\n .small {\n position: absolute;\n left: 0.4rem;\n font-size: 0.36rem;\n top: 0.1rem;\n }\n .close {\n position: absolute;\n right: 0.25rem;\n top: -0.2rem;\n font-size: 1rem;\n color: #999;\n z-index: 2;\n &:active {\n opacity: 0.6;\n }\n }\n }\n .view {\n height: 7.3rem;\n overflow-y: auto;\n }\n .list {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.3rem 0.4rem;\n border-bottom: 1px solid #eee;\n &:first-child .ranking {\n background-image: url(\"~@/assets/images/cn_no_1.png\");\n &.en,\n &.kr,\n &.yn {\n background-image: url(\"~@/assets/images/en_no_1.png\");\n padding-left: 2rem;\n }\n &.tw {\n background-image: url(\"~@/assets/images/tw_no_1.png\");\n }\n }\n .ranking {\n padding-left: 1.7rem;\n background: url(\"~@/assets/images/cn_no_x.png\") left center no-repeat;\n background-size: 2rem auto;\n height: 1rem;\n line-height: 1rem;\n font-size: 0.65rem;\n font-weight: bold;\n color: #e2900a;\n -webkit-text-stroke: 1px #000;\n text-stroke: 1px #000;\n min-width: 1.1rem;\n &.en,\n &.kr,\n &.yn {\n background-image: url(\"~@/assets/images/en_no_x.png\");\n padding-left: 2rem;\n }\n &.tw {\n background-image: url(\"~@/assets/images/tw_no_x.png\");\n }\n }\n .head {\n width: 1.1rem;\n height: 1.1rem;\n background: url(\"~@/assets/images/user.png\") no-repeat;\n background-size: 1.1rem auto;\n position: relative;\n margin: 0.2rem;\n\n @for $i from 1 through 7 {\n &.head_#{$i} {\n background-position: 0 -#{1.12 * $i}rem;\n }\n }\n .frame {\n width: 1.6rem;\n height: 1.5rem;\n position: absolute;\n top: -0.21rem;\n left: -0.25rem;\n background: url(\"~@/assets/images/frame.png\") no-repeat;\n background-size: 1.6rem auto;\n @for $i from 1 through 5 {\n &.frame_#{$i} {\n background-position: 0 -#{1.6 * $i}rem;\n }\n }\n }\n }\n .box {\n min-width: 3.2rem;\n .name {\n font-size: 0.38rem;\n font-weight: 600;\n color: #333;\n line-height: 1;\n }\n .money {\n border: 1px solid #eeefef;\n color: #c56718;\n border-radius: 0.5rem;\n margin-top: 0.2rem;\n padding: 0.1rem 0.1rem 0.1rem 0.7rem;\n line-height: 1;\n background: url(\"~@/assets/images/icon/money.png\") no-repeat 0.13rem\n center;\n background-size: 0.4rem auto;\n }\n }\n .down {\n color: #c56718;\n font-weight: bold;\n .lab {\n background: linear-gradient(#f0ab5b, #c56718);\n color: #fff;\n padding: 0.05rem 0.1rem;\n line-height: 1;\n border-radius: 0.05rem;\n font-weight: normal;\n margin-right: 0.1rem;\n }\n }\n .time {\n color: #338d5f;\n font-weight: bold;\n margin-top: 0.2rem;\n .lab {\n background: linear-gradient(#3caf81, #338d5f);\n color: #fff;\n padding: 0.05rem 0.1rem;\n line-height: 1;\n border-radius: 0.05rem;\n font-weight: normal;\n margin-right: 0.1rem;\n }\n }\n }\n }\n}\n</style>\n"],"mappings":";;;;EAMSA,KAAK,EAAC;;;EACJA,KAAK,EAAC;AAAa;;EACjBA,KAAK,EAAC;AAAO;;EACTA,KAAK,EAAC;AAAO;;EAIjBA,KAAK,EAAC;AAAM;;EAQRA,KAAK,EAAC;AAAK;;EACTA,KAAK,EAAC;AAAM;;EACZA,KAAK,EAAC;AAAO;;EAEfA,KAAK,EAAC;AAAK;;EACTA,KAAK,EAAC;AAAW;;EACdA,KAAK,EAAC;AAAK;;EAGdA,KAAK,EAAC;AAAW;;EACdA,KAAK,EAAC;AAAK;;;uBA9B/BC,YAAA,CAsCaC,WAAA;IArCXC,IAAI,EAAC,gBAAgB;IACrB,oBAAkB,EAAC,mCAAmC;IACtD,oBAAkB,EAAC;;sBAEnB,MAgCM,CAhCwBC,MAAA,CAAAC,UAAU,I,cAAxCC,mBAAA,CAgCM,OAhCNC,UAgCM,GA/BJC,mBAAA,CA8BM,OA9BNC,UA8BM,GA7BJD,mBAAA,CAIM,OAJNE,UAIM,GAHJF,mBAAA,CAAuD,SAAvDG,UAAuD,EAAAC,gBAAA,CAA/BR,MAAA,CAAAS,IAAI,CAACT,MAAA,CAAAU,IAAI,EAAEC,SAAS,kB,iBAAW,GACvD,GAAAH,gBAAA,CAAGR,MAAA,CAAAS,IAAI,CAACT,MAAA,CAAAU,IAAI,EAAEE,WAAW,IAAG,GAC5B,iBAAAC,YAAA,CAA4DC,mBAAA;MAA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