@zyzgroup/core-vue 0.0.2 → 0.0.4

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.
Files changed (2) hide show
  1. package/dist/Icon.vue +57 -0
  2. package/package.json +5 -2
package/dist/Icon.vue ADDED
@@ -0,0 +1,57 @@
1
+ <script setup lang="ts">
2
+ // https://icon-sets.iconify.design/
3
+
4
+ // unplugin-auto-import
5
+ // unplugin-icons
6
+ // @iconify/json
7
+
8
+ // SUCCESS
9
+ // import IconAccessibility from "~icons/carbon/accessibility";
10
+ // import IconCarbonChevronSort from "~icons/carbon/chevron-sort";
11
+ // import IconAccountBox from "~icons/mdi/account-box";
12
+ // import IconAddSubtract from "~icons/icon-park/add-subtract";
13
+ // <icon-accessibility />
14
+ // <icon-account-box style="font-size: 2em; color: red" />
15
+ // <icon-add-subtract></icon-add-subtract>
16
+
17
+ // import { ChevronUpDownIcon } from "@heroicons/vue/24/solid";
18
+
19
+ // UNSUCCESS
20
+ // 使用 unplugin-icons 和 unplugin-auto-import 从 iconify 中自动导入任何图标集
21
+ // <icon-carbon-accessibility />
22
+ // <icon-mdi-account-box style="font-size: 2em; color: red" />
23
+
24
+ import { Icon } from "@iconify/vue";
25
+ import { theme } from "@zyzgroup/core-web";
26
+
27
+ const props = withDefaults(
28
+ defineProps<{
29
+ icon?: string;
30
+ color?: string;
31
+ click?: (e: Event) => void;
32
+ }>(),
33
+ { icon: "mdi-light:home", color: theme.colorGray3 }
34
+ );
35
+ </script>
36
+
37
+ <template>
38
+ <span
39
+ @click="click"
40
+ class="icon"
41
+ :style="['cursor: pointer', 'color: ' + color]"
42
+ >
43
+ <Icon
44
+ :icon="props.icon"
45
+ :color="color"
46
+ />
47
+ </span>
48
+ </template>
49
+
50
+ <style scoped>
51
+ .icon {
52
+ display: inline-flex;
53
+ justify-content: center;
54
+ align-items: center;
55
+ font-size: 1em;
56
+ }
57
+ </style>
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@zyzgroup/core-vue",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
6
  "main": "dist/zyzgroup_core_vue.umd.cjs",
7
7
  "module": "dist/zyzgroup_core_vue.js",
8
8
  "types": "types/lib.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
+ "types": "./types/lib.d.ts",
11
12
  "require": "./dist/zyzgroup_core_vue.umd.cjs",
12
13
  "import": "./dist/zyzgroup_core_vue.js"
13
14
  },
15
+ "./*.vue": "./dist/*.vue",
14
16
  "./dist/style.css": "./dist/style.css"
15
17
  },
16
18
  "files": [
@@ -21,7 +23,8 @@
21
23
  "dev": "vite",
22
24
  "build": "vue-tsc --emitDeclarationOnly && vite build",
23
25
  "preview": "vite preview",
24
- "publishToNpm": "npm run build && update_package_version ./package.json && npm publish --access public"
26
+ "copy:components": "copy /src/components/ /dist/ vue",
27
+ "publishToNpm": "npm run build && npm run copy:components && update_package_version ./package.json && npm publish --access public"
25
28
  },
26
29
  "dependencies": {
27
30
  "vue": "^3.4.21"