@test-icons/vue-next 0.0.10 → 0.0.12
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/icons/ACane.d.ts +1 -1
- package/dist/icons/ACane.js +2 -1
- package/dist/icons/Abdominal.d.ts +1 -1
- package/dist/icons/Abdominal.js +2 -1
- package/dist/icons/Buou.d.ts +1 -1
- package/dist/icons/Buou.js +2 -1
- package/dist/icons/Juanxincai.d.ts +1 -1
- package/dist/icons/Juanxincai.js +2 -1
- package/dist/icons/Lachang.d.ts +1 -1
- package/dist/icons/Lachang.js +2 -1
- package/dist/icons/Quanji.d.ts +1 -1
- package/dist/icons/Quanji.js +2 -1
- package/dist/runtime/index.d.ts +11 -0
- package/dist/runtime/index.js +33 -54
- package/package.json +1 -1
package/dist/icons/ACane.d.ts
CHANGED
package/dist/icons/ACane.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
1
2
|
/**
|
|
2
3
|
* @file ACane 拐杖
|
|
3
4
|
* @author Auto Generated by HaierIcons
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
/* tslint:disable: max-line-length */
|
|
7
8
|
/* eslint-disable max-len */
|
|
8
9
|
import { IconWrapper } from '../runtime';
|
|
9
|
-
export default IconWrapper('a-cane', true,
|
|
10
|
+
export default IconWrapper('a-cane', true, props => h("svg", {
|
|
10
11
|
"attrs": {
|
|
11
12
|
"width": props.size,
|
|
12
13
|
"height": props.size,
|
package/dist/icons/Abdominal.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
1
2
|
/**
|
|
2
3
|
* @file Abdominal 腹部
|
|
3
4
|
* @author Auto Generated by HaierIcons
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
/* tslint:disable: max-line-length */
|
|
7
8
|
/* eslint-disable max-len */
|
|
8
9
|
import { IconWrapper } from '../runtime';
|
|
9
|
-
export default IconWrapper('abdominal', false,
|
|
10
|
+
export default IconWrapper('abdominal', false, props => h("svg", {
|
|
10
11
|
"attrs": {
|
|
11
12
|
"width": props.size,
|
|
12
13
|
"height": props.size,
|
package/dist/icons/Buou.d.ts
CHANGED
package/dist/icons/Buou.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
1
2
|
/**
|
|
2
3
|
* @file Buou 布偶猫
|
|
3
4
|
* @author Auto Generated by HaierIcons
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
/* tslint:disable: max-line-length */
|
|
7
8
|
/* eslint-disable max-len */
|
|
8
9
|
import { IconWrapper } from '../runtime';
|
|
9
|
-
export default IconWrapper('buou', false,
|
|
10
|
+
export default IconWrapper('buou', false, props => h("svg", {
|
|
10
11
|
"attrs": {
|
|
11
12
|
"t": "1781682016103",
|
|
12
13
|
"viewBox": "0 0 1024 1024",
|
package/dist/icons/Juanxincai.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
1
2
|
/**
|
|
2
3
|
* @file Juanxincai 卷心菜
|
|
3
4
|
* @author Auto Generated by HaierIcons
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
/* tslint:disable: max-line-length */
|
|
7
8
|
/* eslint-disable max-len */
|
|
8
9
|
import { IconWrapper } from '../runtime';
|
|
9
|
-
export default IconWrapper('juanxincai', false,
|
|
10
|
+
export default IconWrapper('juanxincai', false, props => h("svg", {
|
|
10
11
|
"attrs": {
|
|
11
12
|
"t": "1781681840975",
|
|
12
13
|
"viewBox": "0 0 1024 1024",
|
package/dist/icons/Lachang.d.ts
CHANGED
package/dist/icons/Lachang.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
1
2
|
/**
|
|
2
3
|
* @file Lachang 腊肠
|
|
3
4
|
* @author Auto Generated by HaierIcons
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
/* tslint:disable: max-line-length */
|
|
7
8
|
/* eslint-disable max-len */
|
|
8
9
|
import { IconWrapper } from '../runtime';
|
|
9
|
-
export default IconWrapper('lachang', false,
|
|
10
|
+
export default IconWrapper('lachang', false, props => h("svg", {
|
|
10
11
|
"attrs": {
|
|
11
12
|
"t": "1781686054355",
|
|
12
13
|
"viewBox": "0 0 1024 1024",
|
package/dist/icons/Quanji.d.ts
CHANGED
package/dist/icons/Quanji.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
1
2
|
/**
|
|
2
3
|
* @file Quanji 拳击
|
|
3
4
|
* @author Auto Generated by HaierIcons
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
/* tslint:disable: max-line-length */
|
|
7
8
|
/* eslint-disable max-len */
|
|
8
9
|
import { IconWrapper } from '../runtime';
|
|
9
|
-
export default IconWrapper('quanji', false,
|
|
10
|
+
export default IconWrapper('quanji', false, props => h("svg", {
|
|
10
11
|
"attrs": {
|
|
11
12
|
"t": "1781686156830",
|
|
12
13
|
"viewBox": "0 0 1024 1024",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEFAULT_ICON_CONFIGS: {
|
|
2
|
+
size: string;
|
|
3
|
+
rtl: boolean;
|
|
4
|
+
prefix: string;
|
|
5
|
+
};
|
|
6
|
+
export interface ISvgIconProps {
|
|
7
|
+
id: string;
|
|
8
|
+
size: number | string;
|
|
9
|
+
}
|
|
10
|
+
export declare function IconConverter(id: string, icon: any, config: any): ISvgIconProps;
|
|
11
|
+
export declare function IconWrapper(name: string, rtl: boolean, render: (props: ISvgIconProps) => any): any;
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,28 +1,9 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
1
2
|
/**
|
|
2
|
-
* @file runtime 运行时
|
|
3
|
+
* @file runtime 运行时 (Vue 3)
|
|
3
4
|
* @author Auto Generated by HaierIcons
|
|
4
5
|
*/
|
|
5
|
-
|
|
6
|
-
import { h } from 'vue';
|
|
7
|
-
|
|
8
|
-
// 包裹前的图标属性
|
|
9
|
-
|
|
10
|
-
// 图标配置属性
|
|
11
|
-
|
|
12
|
-
// 图标基础属性
|
|
13
|
-
|
|
14
|
-
// 包裹后的图标属性
|
|
15
|
-
|
|
16
|
-
// 渲染Help函数属性
|
|
17
|
-
|
|
18
|
-
// 包裹前的图标实例
|
|
19
|
-
|
|
20
|
-
// 包裹后的图标属性
|
|
21
|
-
// eslint-disable-next-line max-len
|
|
22
|
-
|
|
23
|
-
// 包裹前的图标渲染器
|
|
24
|
-
|
|
25
|
-
// 包裹后的图标
|
|
6
|
+
import { defineComponent, inject, h } from 'vue';
|
|
26
7
|
|
|
27
8
|
// 默认属性
|
|
28
9
|
export var DEFAULT_ICON_CONFIGS = {
|
|
@@ -42,40 +23,38 @@ export function IconConverter(id, icon, config) {
|
|
|
42
23
|
};
|
|
43
24
|
}
|
|
44
25
|
|
|
45
|
-
// 图标Wrapper
|
|
26
|
+
// 图标 Wrapper(Vue 3 Composition API)
|
|
46
27
|
export function IconWrapper(name, rtl, render) {
|
|
47
|
-
|
|
28
|
+
return defineComponent({
|
|
48
29
|
name: 'icon-' + name,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
render(h) {
|
|
58
|
-
var h = arguments[0];
|
|
59
|
-
var size = this.size,
|
|
60
|
-
id = this.id,
|
|
61
|
-
spin = this.spin,
|
|
62
|
-
_this$ICON_CONFIGS = this.ICON_CONFIGS,
|
|
63
|
-
ICON_CONFIGS = _this$ICON_CONFIGS === void 0 ? DEFAULT_ICON_CONFIGS : _this$ICON_CONFIGS;
|
|
64
|
-
var svgProps = IconConverter(id, {
|
|
65
|
-
size
|
|
66
|
-
}, ICON_CONFIGS);
|
|
67
|
-
var cls = ['hi-icon'];
|
|
68
|
-
cls.push('hi-icon' + '-' + name);
|
|
69
|
-
if (rtl && ICON_CONFIGS.rtl) {
|
|
70
|
-
cls.push('hi-icon-rtl');
|
|
30
|
+
props: {
|
|
31
|
+
size: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
default: undefined
|
|
34
|
+
},
|
|
35
|
+
spin: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
71
38
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
39
|
+
},
|
|
40
|
+
setup(props) {
|
|
41
|
+
var ICON_CONFIGS = inject('ICON_CONFIGS', DEFAULT_ICON_CONFIGS);
|
|
42
|
+
var id = guid();
|
|
43
|
+
return () => {
|
|
44
|
+
var svgProps = IconConverter(id, {
|
|
45
|
+
size: props.size
|
|
46
|
+
}, ICON_CONFIGS);
|
|
47
|
+
var cls = ['hi-icon', 'hi-icon-' + name];
|
|
48
|
+
if (rtl && ICON_CONFIGS.rtl) {
|
|
49
|
+
cls.push('hi-icon-rtl');
|
|
50
|
+
}
|
|
51
|
+
if (props.spin) {
|
|
52
|
+
cls.push('hi-icon-spin');
|
|
53
|
+
}
|
|
54
|
+
return h('span', {
|
|
55
|
+
class: cls.join(' ')
|
|
56
|
+
}, [render(svgProps)]);
|
|
57
|
+
};
|
|
78
58
|
}
|
|
79
|
-
};
|
|
80
|
-
return options;
|
|
59
|
+
});
|
|
81
60
|
}
|