UNPKG

song-ui-u

Version:

vue3 + js的PC前端组件库

1 lines 1.22 kB
{"version":3,"file":"index.vue.cjs","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":["useNamespace","useStyle","computed"],"mappings":";;;;;;;;AAMA,MAAA,WAAA,GAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;AAKjC,MAAM,EAAE,GAAGA,oBAAY,CAAC,MAAM,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAGC,cAAQ,EAAE,CAAA;AACzB;AACA,MAAM,KAAK,GAAG,OASZ,CAAA;AACF,MAAM,SAAS,GAAGC,YAAQ,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;AAC7D,MAAM,UAAU,GAAGA,YAAQ,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;"}