@test-icons/vue-next 0.0.11 → 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 +1 -1
- package/dist/icons/Abdominal.d.ts +1 -1
- package/dist/icons/Abdominal.js +1 -1
- package/dist/icons/Buou.d.ts +1 -1
- package/dist/icons/Buou.js +1 -1
- package/dist/icons/Juanxincai.d.ts +1 -1
- package/dist/icons/Juanxincai.js +1 -1
- package/dist/icons/Lachang.d.ts +1 -1
- package/dist/icons/Lachang.js +1 -1
- package/dist/icons/Quanji.d.ts +1 -1
- package/dist/icons/Quanji.js +1 -1
- package/dist/runtime/index.d.ts +11 -0
- package/dist/runtime/index.js +33 -53
- package/package.json +1 -1
package/dist/icons/ACane.d.ts
CHANGED
package/dist/icons/ACane.js
CHANGED
|
@@ -7,7 +7,7 @@ import { h } from 'vue';
|
|
|
7
7
|
/* tslint:disable: max-line-length */
|
|
8
8
|
/* eslint-disable max-len */
|
|
9
9
|
import { IconWrapper } from '../runtime';
|
|
10
|
-
export default IconWrapper('a-cane', true,
|
|
10
|
+
export default IconWrapper('a-cane', true, props => h("svg", {
|
|
11
11
|
"attrs": {
|
|
12
12
|
"width": props.size,
|
|
13
13
|
"height": props.size,
|
package/dist/icons/Abdominal.js
CHANGED
|
@@ -7,7 +7,7 @@ import { h } from 'vue';
|
|
|
7
7
|
/* tslint:disable: max-line-length */
|
|
8
8
|
/* eslint-disable max-len */
|
|
9
9
|
import { IconWrapper } from '../runtime';
|
|
10
|
-
export default IconWrapper('abdominal', false,
|
|
10
|
+
export default IconWrapper('abdominal', false, props => h("svg", {
|
|
11
11
|
"attrs": {
|
|
12
12
|
"width": props.size,
|
|
13
13
|
"height": props.size,
|
package/dist/icons/Buou.d.ts
CHANGED
package/dist/icons/Buou.js
CHANGED
|
@@ -7,7 +7,7 @@ import { h } from 'vue';
|
|
|
7
7
|
/* tslint:disable: max-line-length */
|
|
8
8
|
/* eslint-disable max-len */
|
|
9
9
|
import { IconWrapper } from '../runtime';
|
|
10
|
-
export default IconWrapper('buou', false,
|
|
10
|
+
export default IconWrapper('buou', false, props => h("svg", {
|
|
11
11
|
"attrs": {
|
|
12
12
|
"t": "1781682016103",
|
|
13
13
|
"viewBox": "0 0 1024 1024",
|
package/dist/icons/Juanxincai.js
CHANGED
|
@@ -7,7 +7,7 @@ import { h } from 'vue';
|
|
|
7
7
|
/* tslint:disable: max-line-length */
|
|
8
8
|
/* eslint-disable max-len */
|
|
9
9
|
import { IconWrapper } from '../runtime';
|
|
10
|
-
export default IconWrapper('juanxincai', false,
|
|
10
|
+
export default IconWrapper('juanxincai', false, props => h("svg", {
|
|
11
11
|
"attrs": {
|
|
12
12
|
"t": "1781681840975",
|
|
13
13
|
"viewBox": "0 0 1024 1024",
|
package/dist/icons/Lachang.d.ts
CHANGED
package/dist/icons/Lachang.js
CHANGED
|
@@ -7,7 +7,7 @@ import { h } from 'vue';
|
|
|
7
7
|
/* tslint:disable: max-line-length */
|
|
8
8
|
/* eslint-disable max-len */
|
|
9
9
|
import { IconWrapper } from '../runtime';
|
|
10
|
-
export default IconWrapper('lachang', false,
|
|
10
|
+
export default IconWrapper('lachang', false, props => h("svg", {
|
|
11
11
|
"attrs": {
|
|
12
12
|
"t": "1781686054355",
|
|
13
13
|
"viewBox": "0 0 1024 1024",
|
package/dist/icons/Quanji.d.ts
CHANGED
package/dist/icons/Quanji.js
CHANGED
|
@@ -7,7 +7,7 @@ import { h } from 'vue';
|
|
|
7
7
|
/* tslint:disable: max-line-length */
|
|
8
8
|
/* eslint-disable max-len */
|
|
9
9
|
import { IconWrapper } from '../runtime';
|
|
10
|
-
export default IconWrapper('quanji', false,
|
|
10
|
+
export default IconWrapper('quanji', false, props => h("svg", {
|
|
11
11
|
"attrs": {
|
|
12
12
|
"t": "1781686156830",
|
|
13
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,39 +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() {
|
|
58
|
-
var size = this.size,
|
|
59
|
-
id = this.id,
|
|
60
|
-
spin = this.spin,
|
|
61
|
-
_this$ICON_CONFIGS = this.ICON_CONFIGS,
|
|
62
|
-
ICON_CONFIGS = _this$ICON_CONFIGS === void 0 ? DEFAULT_ICON_CONFIGS : _this$ICON_CONFIGS;
|
|
63
|
-
var svgProps = IconConverter(id, {
|
|
64
|
-
size
|
|
65
|
-
}, ICON_CONFIGS);
|
|
66
|
-
var cls = ['hi-icon'];
|
|
67
|
-
cls.push('hi-icon' + '-' + name);
|
|
68
|
-
if (rtl && ICON_CONFIGS.rtl) {
|
|
69
|
-
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
|
|
70
38
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
+
};
|
|
77
58
|
}
|
|
78
|
-
};
|
|
79
|
-
return options;
|
|
59
|
+
});
|
|
80
60
|
}
|