ivue-material-plus
Version:
A high quality UI components Library with Vue.js
1 lines • 1.81 kB
Source Map (JSON)
{"version":3,"file":"index2.mjs","sources":["../../../../../src/components/ivue-skeleton-item/index.vue"],"sourcesContent":["<template>\r\n <div :class=\"wrapperClasses\">\r\n <ivue-icon v-if=\"type === 'image'\">image</ivue-icon>\r\n <slot></slot>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, computed } from 'vue';\r\nimport { oneOf } from '../../utils/assist';\r\nimport IvueIcon from '../ivue-icon';\r\n\r\n// type\r\nimport type { Props } from './types/skeleton-item';\r\n\r\nconst prefixCls = 'ivue-skeleton-item';\r\n\r\nexport default defineComponent({\r\n name: prefixCls,\r\n props: {\r\n type: {\r\n type: String,\r\n validator(value: string) {\r\n return oneOf(value, [\r\n 'circle',\r\n 'square',\r\n 'rect',\r\n 'h1',\r\n 'h3',\r\n 'text',\r\n 'caption',\r\n 'p',\r\n 'image',\r\n 'button',\r\n ]);\r\n },\r\n default: 'text',\r\n },\r\n },\r\n setup(props: Props) {\r\n // computed\r\n\r\n // 外层样式\r\n const wrapperClasses = computed(() => {\r\n return [prefixCls, `${prefixCls}--${props.type}`];\r\n });\r\n\r\n return {\r\n wrapperClasses,\r\n };\r\n },\r\n components: {\r\n IvueIcon,\r\n },\r\n});\r\n</script>\r\n\r\n<style lang=\"scss\" scoped></style>\r\n"],"names":["_resolveComponent","_normalizeClass","_openBlock","_createBlock","_withCtx","_createCommentVNode"],"mappings":";;;;;+BACEA,iBAGM,WAAA,CAAA,CAAA;;WAFaC,cAAI,CAAA,IAAA,CAAA,cAAA,CAAA;AAAA,GAAA,EAAA;AAAA,IAAmB,IAAA,CAAA,IAAA,KAAA,OAAA,IAAAC,SAAA,EAAA,EAAAC,YAAA,oBAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;AAAA,MAAA,OAAA,EAAAC,QAAA,MAAA;AAAA;;;KACxC,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA;;;;;;;"}