@zyzgroup/core-vue 0.0.5 → 0.0.6
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/README.md +6 -7
- package/ce/yz_custom_element.iife.js +87 -0
- package/ce/yz_custom_element.iife.js.map +1 -0
- package/ce/yz_custom_element.js +40526 -0
- package/ce/yz_custom_element.js.map +1 -0
- package/ce/yz_custom_element.umd.cjs +87 -0
- package/ce/yz_custom_element.umd.cjs.map +1 -0
- package/dist/Icon.ce.vue +57 -0
- package/package.json +7 -5
- package/types/components/Icon.ce.vue.d.ts +36 -0
package/dist/Icon.ce.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.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/zyzgroup_core_vue.umd.cjs",
|
|
7
7
|
"module": "dist/zyzgroup_core_vue.js",
|
|
@@ -12,20 +12,22 @@
|
|
|
12
12
|
"require": "./dist/zyzgroup_core_vue.umd.cjs",
|
|
13
13
|
"import": "./dist/zyzgroup_core_vue.js"
|
|
14
14
|
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"import": "./
|
|
15
|
+
"./ce": {
|
|
16
|
+
"require": "./ce/yz_custom_element.umd.cjs",
|
|
17
|
+
"import": "./ce/yz_custom_element.js"
|
|
18
18
|
},
|
|
19
19
|
"./dist/style.css": "./dist/style.css"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist/**/*",
|
|
23
|
+
"ce/**/*",
|
|
23
24
|
"types/**/*"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
27
|
"dev": "vite",
|
|
27
|
-
"build": "vue-tsc --emitDeclarationOnly && vite build",
|
|
28
|
+
"build": "vue-tsc --emitDeclarationOnly && vite build & npm run ce",
|
|
28
29
|
"preview": "vite preview",
|
|
30
|
+
"ce": "copy_ce_vue && npm run --prefix ../../../vite/ lib -- ../lib/packages/core-vue/vite.ce.config.json",
|
|
29
31
|
"copy:components": "copy /src/components/ /dist/ vue",
|
|
30
32
|
"publishToNpm": "npm run build && npm run copy:components && update_package_version ./package.json && npm publish --access public"
|
|
31
33
|
},
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
2
|
+
icon?: string | undefined;
|
|
3
|
+
color?: string | undefined;
|
|
4
|
+
click?: ((e: Event) => void) | undefined;
|
|
5
|
+
}>, {
|
|
6
|
+
icon: string;
|
|
7
|
+
color: string;
|
|
8
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
9
|
+
icon?: string | undefined;
|
|
10
|
+
color?: string | undefined;
|
|
11
|
+
click?: ((e: Event) => void) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
icon: string;
|
|
14
|
+
color: string;
|
|
15
|
+
}>>>, {
|
|
16
|
+
icon: string;
|
|
17
|
+
color: string;
|
|
18
|
+
}, {}>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithDefaults<P, D> = {
|
|
21
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
22
|
+
default: D[K];
|
|
23
|
+
}> : P[K];
|
|
24
|
+
};
|
|
25
|
+
type __VLS_Prettify<T> = {
|
|
26
|
+
[K in keyof T]: T[K];
|
|
27
|
+
} & {};
|
|
28
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
+
type __VLS_TypePropsToOption<T> = {
|
|
30
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
+
} : {
|
|
33
|
+
type: import('vue').PropType<T[K]>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
};
|