UNPKG

song-ui-u

Version:

vue3 + js的PC前端组件库

1 lines 1.18 kB
{"version":3,"file":"index.vue.mjs","sources":["../../../../../packages/components/icon/src/index.vue"],"sourcesContent":["<template>\n <i :class=\"[ns.b()]\" :style=\"[styleSize, styleColor]\">\n <slot />\n </i>\n</template>\n<script>\nexport default { name: \"x-icon\" };\n</script>\n<script setup>\nimport { computed } from \"vue\";\nimport { useNamespace, useStyle } from \"@ui-library/hook\";\nconst ns = useNamespace(\"icon\");\nconst uStyle = useStyle();\n/** props */\nconst props = defineProps({\n size: {\n type: String,\n default: \"\",\n },\n color: {\n type: String,\n default: \"\",\n },\n});\nconst styleSize = computed(() => uStyle.fontSize(props.size));\nconst styleColor = computed(() => uStyle.color(props.color));\n</script>\n"],"names":[],"mappings":";;;;;;AAMA,MAAA,WAAA,GAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;AAKjC,MAAM,EAAE,GAAG,YAAY,CAAC,MAAM,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAA;AACzB;AACA,MAAM,KAAK,GAAG,OASZ,CAAA;AACF,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;AAC7D,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;"}