cd-icon-picker 0.1.3 → 0.1.5

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/index.ts CHANGED
@@ -11,4 +11,4 @@ const install = (app: App) => {
11
11
 
12
12
  export { Icon, IconPicker, SvgIcon, install };
13
13
 
14
- export default { install };
14
+ export default IconPicker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cd-icon-picker",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
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
@@ -49,7 +49,7 @@ export default defineComponent({
49
49
  },
50
50
  });
51
51
  </script>
52
- <style lang="scss" scoped>
52
+ <style scoped>
53
53
  .svg-icon-spin { animation: loadingCircle 1s infinite linear; }
54
54
  @keyframes loadingCircle { 100% { transform: rotate(360deg); } }
55
55
  </style>
@@ -15,7 +15,16 @@
15
15
  </template>
16
16
  </t-input>
17
17
 
18
- <t-dialog v-model:visible="visible" header="选择图标" width="940px" :close-on-esc-keydown="true" :close-on-overlay-click="true" @confirm="handleConfirm" @cancel="handleCancel">
18
+ <t-dialog v-model:visible="visible" width="940px" :close-on-esc-keydown="true" :close-on-overlay-click="true" @confirm="handleConfirm" @cancel="handleCancel">
19
+ <template #header>
20
+ <div class="cd-picker-header">
21
+ 当前图标
22
+ <span v-if="isSvgMode && currentSelect">
23
+ <SvgIcon :name="currentSelect" :prefix="svgPrefix" :size="20" />
24
+ </span>
25
+ <Icon :icon="currentSelect || defaultIcon" :size="20" v-else />
26
+ </div>
27
+ </template>
19
28
  <div class="cd-picker-body">
20
29
  <div class="cd-picker-sidebar">
21
30
  <div class="cd-picker-section">
package/src/SvgIcon.vue CHANGED
@@ -43,7 +43,7 @@
43
43
  },
44
44
  });
45
45
  </script>
46
- <style lang="scss" scoped>
46
+ <style scoped>
47
47
  .cd-svg-icon {
48
48
  display: inline-block;
49
49
  overflow: hidden;