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

1 line
4.0 KiB
JSON

{"ast":null,"code":"import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, TransitionGroup as _TransitionGroup, withCtx as _withCtx, createVNode as _createVNode } from \"vue\";\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n return _openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"chip-view\", {\n win: $props.win\n }])\n }, [_createVNode(_TransitionGroup, {\n class: \"chip-box\",\n tag: \"ul\",\n \"enter-from-class\": \"chip-enter-from\",\n \"leave-to-class\": \"chip-leave-to\"\n }, {\n default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.list, (item, index) => {\n return _openBlock(), _createElementBlock(\"li\", {\n class: \"box\",\n key: `${item.key}_${index}`,\n style: _normalizeStyle({\n top: item.y,\n left: item.x\n })\n }, [_createElementVNode(\"i\", {\n class: _normalizeClass([\"chip\", [item.key, item.type]])\n }, null, 2 /* CLASS */)], 4 /* STYLE */);\n }), 128 /* KEYED_FRAGMENT */))]),\n\n _: 1 /* STABLE */\n })], 2 /* CLASS */);\n}","map":{"version":3,"names":["_createElementBlock","class","_normalizeClass","win","$props","_createVNode","_TransitionGroup","tag","_Fragment","_renderList","list","item","index","key","style","_normalizeStyle","y","x","_createElementVNode","type"],"sources":["/Users/li/Desktop/work/work2/OG/GamePortrait/src/components/chipView.vue"],"sourcesContent":["<template>\n <div class=\"chip-view\" :class=\"{ win }\">\n <transition-group\n class=\"chip-box\"\n tag=\"ul\"\n enter-from-class=\"chip-enter-from\"\n leave-to-class=\"chip-leave-to\"\n >\n <li\n class=\"box\"\n v-for=\"(item, index) in list\"\n :key=\"`${item.key}_${index}`\"\n :style=\"{\n top: item.y,\n left: item.x\n }\"\n >\n <i class=\"chip\" :class=\"[item.key, item.type]\"></i>\n </li>\n </transition-group>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"chipView\",\n props: {\n list: {\n type: Array,\n default: () => []\n },\n win: {\n type: Boolean,\n default: false\n }\n },\n setup() {}\n}\n</script>\n<style lang=\"scss\" scoped>\n.chip-view {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 3;\n &:active {\n background: rgba(255, 255, 255, 0.3);\n }\n &.win {\n background-color: rgba(255, 235, 59, 0.25);\n -webkit-animation-timing-function: ease-in-out;\n -webkit-animation-name: breathe;\n -webkit-animation-duration: 0.5s;\n -webkit-animation-iteration-count: infinite;\n -webkit-animation-direction: alternate;\n }\n .chip-box {\n position: absolute;\n width: 100%;\n height: 100%;\n .box {\n width: 0.69 * 1.35rem;\n height: 0.55 * 1.35rem;\n position: absolute;\n transition: 0.5s all;\n }\n .chip {\n width: 100%;\n height: 100%;\n display: block;\n }\n }\n}\n// /* 进场的瞬间与离场的效果添加 */\n.chip-enter-from {\n opacity: 0;\n transform: translateX(-1000px) scale(2);\n}\n.chip-leave-to {\n opacity: 0;\n transform: translateX(-1000px) scale(1);\n}\n</style>\n"],"mappings":";;uBACEA,mBAAA,CAmBM;IAnBDC,KAAK,EAAAC,eAAA,EAAC,WAAW;MAAAC,GAAA,EAAWC,MAAA,CAAAD;IAAG;MAClCE,YAAA,CAiBmBC,gBAAA;IAhBjBL,KAAK,EAAC,UAAU;IAChBM,GAAG,EAAC,IAAI;IACR,kBAAgB,EAAC,iBAAiB;IAClC,gBAAc,EAAC;;sBAIb,MAA6B,E,kBAF/BP,mBAAA,CAUKQ,SAAA,QAAAC,WAAA,CARqBL,MAAA,CAAAM,IAAI,GAApBC,IAAI,EAAEC,KAAK;2BAFrBZ,mBAAA,CAUK;QATHC,KAAK,EAAC,KAAK;QAEVY,GAAG,KAAKF,IAAI,CAACE,GAAG,IAAID,KAAK;QACzBE,KAAK,EAAAC,eAAA;eAAmBJ,IAAI,CAACK,CAAC;gBAAkBL,IAAI,CAACM;;UAKtDC,mBAAA,CAAmD;QAAhDjB,KAAK,EAAAC,eAAA,EAAC,MAAM,GAAUS,IAAI,CAACE,GAAG,EAAEF,IAAI,CAACQ,IAAI"},"metadata":{},"sourceType":"module","externalDependencies":[]}