acdr-ui/dist/dev/mp-weixin/node-modules/wot-design-uni/components/wd-icon/wd-icon.js.map

1 line
2.6 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"version":3,"file":"wd-icon.js","sources":["../../../../../../../node_modules/wot-design-uni/components/wd-icon/wd-icon.vue","../../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL25vZGVfbW9kdWxlcy93b3QtZGVzaWduLXVuaS9jb21wb25lbnRzL3dkLWljb24vd2QtaWNvbi52dWU"],"sourcesContent":["<template>\n <view @click=\"handleClick\" :class=\"rootClass\" :style=\"rootStyle\">\n <image v-if=\"isImageUrl\" class=\"wd-icon__image\" :src=\"name\"></image>\n </view>\n</template>\n\n<script lang=\"ts\">\nexport default {\n name: 'wd-icon',\n options: {\n virtualHost: true,\n addGlobalClass: true,\n styleIsolation: 'shared'\n }\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { objToStyle } from '../common/util'\nimport { iconProps } from './types'\n\nconst props = defineProps(iconProps)\nconst emit = defineEmits(['click'])\n\nconst isImageUrl = ref<boolean>(false)\n\nwatch(\n () => props.name,\n (val) => {\n isImageUrl.value = val.indexOf('/') > -1\n },\n { deep: true, immediate: true }\n)\n\nconst rootClass = computed(() => {\n const prefix = props.classPrefix\n return `${prefix} ${props.customClass} ${isImageUrl.value ? 'wd-icon--image' : prefix + '-' + props.name}`\n})\n\nconst rootStyle = computed(() => {\n const style: Record<string, any> = {}\n if (props.color) {\n style['color'] = props.color\n }\n if (props.size) {\n style['font-size'] = props.size\n }\n return `${objToStyle(style)}; ${props.customStyle}`\n})\n\nfunction handleClick(event: any) {\n emit('click', event)\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import './index.scss';\n</style>\n","import Component from 'D:/App/Work/addr/acdr-ui/node_modules/wot-design-uni/components/wd-icon/wd-icon.vue'\nwx.createComponent(Component)"],"names":["ref","watch","computed","objToStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAA,cAAe;AAAA,EACb,MAAM;AAAA,EACN,SAAS;AAAA,IACP,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,EAClB;AACF;;;;;AAQA,UAAM,QAAQ;AACd,UAAM,OAAO;AAEP,UAAA,aAAaA,kBAAa,KAAK;AAErCC,kBAAA;AAAA,MACE,MAAM,MAAM;AAAA,MACZ,CAAC,QAAQ;AACP,mBAAW,QAAQ,IAAI,QAAQ,GAAG,IAAI;AAAA,MACxC;AAAA,MACA,EAAE,MAAM,MAAM,WAAW,KAAK;AAAA,IAAA;AAG1B,UAAA,YAAYC,cAAAA,SAAS,MAAM;AAC/B,YAAM,SAAS,MAAM;AACrB,aAAO,GAAG,MAAM,IAAI,MAAM,WAAW,IAAI,WAAW,QAAQ,mBAAmB,SAAS,MAAM,MAAM,IAAI;AAAA,IAAA,CACzG;AAEK,UAAA,YAAYA,cAAAA,SAAS,MAAM;AAC/B,YAAM,QAA6B,CAAA;AACnC,UAAI,MAAM,OAAO;AACT,cAAA,OAAO,IAAI,MAAM;AAAA,MACzB;AACA,UAAI,MAAM,MAAM;AACR,cAAA,WAAW,IAAI,MAAM;AAAA,MAC7B;AACA,aAAO,GAAGC,cAAAA,WAAW,KAAK,CAAC,KAAK,MAAM,WAAW;AAAA,IAAA,CAClD;AAED,aAAS,YAAY,OAAY;AAC/B,WAAK,SAAS,KAAK;AAAA,IACrB;;;;;;;;;;;;;;;ACpDA,GAAG,gBAAgB,SAAS;","x_google_ignoreList":[0]}