@zyzgroup/core-vue 0.0.2 → 0.0.3
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/dist/Icon.vue +57 -0
- package/package.json +3 -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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zyzgroup/core-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/zyzgroup_core_vue.umd.cjs",
|
|
7
7
|
"module": "dist/zyzgroup_core_vue.js",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"dev": "vite",
|
|
22
22
|
"build": "vue-tsc --emitDeclarationOnly && vite build",
|
|
23
23
|
"preview": "vite preview",
|
|
24
|
-
"
|
|
24
|
+
"copy:components": "copy /src/components/ /dist/ vue",
|
|
25
|
+
"publishToNpm": "npm run build && npm run copy:components && update_package_version ./package.json && npm publish --access public"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"vue": "^3.4.21"
|