cd-icon-picker 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cd-icon-picker",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Vue 3 icon picker supporting TDesign & RemixIcon, with custom SVG via :diy-icon.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/Icon.vue CHANGED
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <SvgIcon v-if="isSvgIcon" :size="size" :name="getSvgIcon" :class="[$attrs.class, 'cd-icon']" :spin="spin" />
2
+ <SvgIcon v-if="isSvgIcon" :size="String(size)" :name="getSvgIcon" :class="[$attrs.class, 'cd-icon']" :spin="spin" />
3
3
  <span v-else-if="isCompanyIcon" v-html="getCompanySvg" :class="['cd-icon', $attrs.class, spin && 'svg-icon-spin']" :style="getStyle"></span>
4
4
  <i v-else-if="isRemixIcon" :class="['cd-icon', $attrs.class, icon, spin && 'svg-icon-spin']" :style="getStyle"></i>
5
- <t-icon v-else :name="icon" :size="size" :color="color" :spin="spin" :class="[$attrs.class, 'cd-icon']" />
5
+ <t-icon v-else :name="icon" :size="String(size)" :color="color" :spin="spin" :class="[$attrs.class, 'cd-icon']" />
6
6
  </template>
7
7
  <script lang="ts">
8
8
  import type { PropType } from 'vue';
@@ -23,8 +23,8 @@ export default defineComponent({
23
23
  default: '',
24
24
  },
25
25
  size: {
26
- type: [String, Number] as PropType<string | number>,
27
- default: 16,
26
+ type: String,
27
+ default: '16',
28
28
  },
29
29
  spin: {
30
30
  type: Boolean,
@@ -21,9 +21,9 @@
21
21
  <div class="cd-picker-header">
22
22
  <span style="font-size: 14px;font-weight: normal;">当前图标:</span>
23
23
  <span v-if="isSvgMode && currentSelect">
24
- <SvgIcon :name="currentSelect" :prefix="svgPrefix" :size="20" />
24
+ <SvgIcon :name="currentSelect" :prefix="svgPrefix" :size="'20'" />
25
25
  </span>
26
- <Icon :icon="currentSelect || defaultIcon" :size="20" v-else />
26
+ <Icon :icon="currentSelect || defaultIcon" :size="'20'" v-else />
27
27
  </div>
28
28
  </template>
29
29
  <div class="cd-picker-body">
package/src/SvgIcon.vue CHANGED
@@ -19,8 +19,8 @@
19
19
  required: true,
20
20
  },
21
21
  size: {
22
- type: [Number, String],
23
- default: 16,
22
+ type: String,
23
+ default: '16',
24
24
  },
25
25
  spin: {
26
26
  type: Boolean,