yc-pro-components 0.0.4 → 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/es/components/check-card/index.d.ts +38 -38
- package/es/components/check-card/src/index.vue.d.ts +2 -2
- package/es/components/check-card-group/index.d.ts +19 -19
- package/es/components/check-card-group/src/index.vue.d.ts +1 -1
- package/es/components/dialog-form/index.d.ts +7 -7
- package/es/components/dialog-form/src/index.vue.d.ts +7 -7
- package/es/components/display-item/index.d.ts +21 -21
- package/es/components/display-item/src/index.vue.d.ts +21 -21
- package/es/components/drawer-form/index.d.ts +26 -26
- package/es/components/drawer-form/src/index.vue.d.ts +8 -8
- package/es/components/form/index.d.ts +14 -14
- package/es/components/form/src/form-content.vue.d.ts +20 -20
- package/es/components/form/src/index.vue.d.ts +14 -14
- package/es/components/form-item/index.d.ts +32 -32
- package/es/components/form-item/src/index.vue.d.ts +12 -12
- package/es/components/header/index.d.ts +19 -19
- package/es/components/header/src/index.vue.d.ts +1 -1
- package/es/components/index.d.ts +0 -1
- package/es/components/index.mjs +0 -2
- package/es/components/input-tag/index.d.ts +9 -9
- package/es/components/input-tag/src/index.vue.d.ts +1 -1
- package/es/components/page/index.d.ts +220 -220
- package/es/components/page/src/index.vue.d.ts +78 -78
- package/es/components/radio/index.d.ts +25 -25
- package/es/components/radio/src/index.vue.d.ts +25 -25
- package/es/components/render/index.d.ts +6 -6
- package/es/components/render/src/index.vue.d.ts +2 -2
- package/es/components/search/index.d.ts +49 -49
- package/es/components/search/src/index.vue.d.ts +21 -21
- package/es/components/table/index.d.ts +54 -54
- package/es/components/table/src/index.vue.d.ts +18 -18
- package/es/components/table/src/table-column-drag-sort.vue.d.ts +18 -18
- package/es/components/table/src/table-column.vue.d.ts +21 -21
- package/es/components/yc-count-to/index.d.ts +1 -1
- package/es/components/yc-count-to/src/normal/index.d.ts +1 -1
- package/es/components/yc-dialog/index.d.ts +24 -24
- package/es/components/yc-line-tree/src/index.vue2.mjs +2 -18
- package/es/components/yc-more-actions/index.d.ts +46 -46
- package/es/components/yc-more-actions/src/index.vue.d.ts +3 -3
- package/es/components/yc-plus-page/src/index.vue.d.ts +203 -203
- package/es/components/yc-select-v2/src/index.vue.d.ts +2 -2
- package/es/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/es/components/yc-svg-icon/src/index.vue.d.ts +1 -1
- package/es/components/yc-text/src/index.vue.d.ts +2 -2
- package/es/hooks/usePlusFormReset.d.ts +90 -90
- package/es/index.mjs +0 -2
- package/index.js +11 -2066
- package/index.min.js +7 -7
- package/index.min.mjs +7 -7
- package/index.mjs +12 -2060
- package/lib/components/check-card/index.d.ts +38 -38
- package/lib/components/check-card/src/index.vue.d.ts +2 -2
- package/lib/components/check-card-group/index.d.ts +19 -19
- package/lib/components/check-card-group/src/index.vue.d.ts +1 -1
- package/lib/components/dialog-form/index.d.ts +7 -7
- package/lib/components/dialog-form/src/index.vue.d.ts +7 -7
- package/lib/components/display-item/index.d.ts +21 -21
- package/lib/components/display-item/src/index.vue.d.ts +21 -21
- package/lib/components/drawer-form/index.d.ts +26 -26
- package/lib/components/drawer-form/src/index.vue.d.ts +8 -8
- package/lib/components/form/index.d.ts +14 -14
- package/lib/components/form/src/form-content.vue.d.ts +20 -20
- package/lib/components/form/src/index.vue.d.ts +14 -14
- package/lib/components/form-item/index.d.ts +32 -32
- package/lib/components/form-item/src/index.vue.d.ts +12 -12
- package/lib/components/header/index.d.ts +19 -19
- package/lib/components/header/src/index.vue.d.ts +1 -1
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +10 -19
- package/lib/components/input-tag/index.d.ts +9 -9
- package/lib/components/input-tag/src/index.vue.d.ts +1 -1
- package/lib/components/page/index.d.ts +220 -220
- package/lib/components/page/src/index.vue.d.ts +78 -78
- package/lib/components/radio/index.d.ts +25 -25
- package/lib/components/radio/src/index.vue.d.ts +25 -25
- package/lib/components/render/index.d.ts +6 -6
- package/lib/components/render/src/index.vue.d.ts +2 -2
- package/lib/components/search/index.d.ts +49 -49
- package/lib/components/search/src/index.vue.d.ts +21 -21
- package/lib/components/table/index.d.ts +54 -54
- package/lib/components/table/src/index.vue.d.ts +18 -18
- package/lib/components/table/src/table-column-drag-sort.vue.d.ts +18 -18
- package/lib/components/table/src/table-column.vue.d.ts +21 -21
- package/lib/components/yc-count-to/index.d.ts +1 -1
- package/lib/components/yc-count-to/src/normal/index.d.ts +1 -1
- package/lib/components/yc-dialog/index.d.ts +24 -24
- package/lib/components/yc-line-tree/src/index.vue2.js +2 -18
- package/lib/components/yc-more-actions/index.d.ts +46 -46
- package/lib/components/yc-more-actions/src/index.vue.d.ts +3 -3
- package/lib/components/yc-plus-page/src/index.vue.d.ts +203 -203
- package/lib/components/yc-select-v2/src/index.vue.d.ts +2 -2
- package/lib/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/lib/components/yc-svg-icon/src/index.vue.d.ts +1 -1
- package/lib/components/yc-text/src/index.vue.d.ts +2 -2
- package/lib/hooks/usePlusFormReset.d.ts +90 -90
- package/lib/index.js +10 -19
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -2
- package/es/components/yc-icon/index.d.ts +0 -49
- package/es/components/yc-icon/index.mjs +0 -10
- package/es/components/yc-icon/src/hooks.d.ts +0 -11
- package/es/components/yc-icon/src/hooks.mjs +0 -80
- package/es/components/yc-icon/src/iconfont.d.ts +0 -21
- package/es/components/yc-icon/src/iconfont.mjs +0 -45
- package/es/components/yc-icon/src/iconifyIconOffline.d.ts +0 -34
- package/es/components/yc-icon/src/iconifyIconOffline.mjs +0 -51
- package/es/components/yc-icon/src/iconifyIconOnline.d.ts +0 -19
- package/es/components/yc-icon/src/iconifyIconOnline.mjs +0 -30
- package/es/components/yc-icon/src/types.d.ts +0 -35
- package/es/components/yc-icon/src/types.mjs +0 -1
- package/lib/components/yc-icon/index.d.ts +0 -49
- package/lib/components/yc-icon/index.js +0 -18
- package/lib/components/yc-icon/src/hooks.d.ts +0 -11
- package/lib/components/yc-icon/src/hooks.js +0 -82
- package/lib/components/yc-icon/src/iconfont.d.ts +0 -21
- package/lib/components/yc-icon/src/iconfont.js +0 -49
- package/lib/components/yc-icon/src/iconifyIconOffline.d.ts +0 -34
- package/lib/components/yc-icon/src/iconifyIconOffline.js +0 -55
- package/lib/components/yc-icon/src/iconifyIconOnline.d.ts +0 -19
- package/lib/components/yc-icon/src/iconifyIconOnline.js +0 -34
- package/lib/components/yc-icon/src/types.d.ts +0 -35
- package/lib/components/yc-icon/src/types.js +0 -2
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 图标属性类型
|
|
3
|
-
* @see https://docs.iconify.design/icon-components/vue/#properties
|
|
4
|
-
*/
|
|
5
|
-
export interface YcIconType {
|
|
6
|
-
/** 是否内联显示 */
|
|
7
|
-
inline?: boolean;
|
|
8
|
-
/** 图标宽度 */
|
|
9
|
-
width?: string | number;
|
|
10
|
-
/** 图标高度 */
|
|
11
|
-
height?: string | number;
|
|
12
|
-
/** 水平翻转 */
|
|
13
|
-
horizontalFlip?: boolean;
|
|
14
|
-
/** 垂直翻转 */
|
|
15
|
-
verticalFlip?: boolean;
|
|
16
|
-
/** 翻转方向 */
|
|
17
|
-
flip?: string;
|
|
18
|
-
/** 旋转角度 */
|
|
19
|
-
rotate?: number | string;
|
|
20
|
-
/** 颜色 */
|
|
21
|
-
color?: string;
|
|
22
|
-
/** 水平对齐 */
|
|
23
|
-
horizontalAlign?: boolean;
|
|
24
|
-
/** 垂直对齐 */
|
|
25
|
-
verticalAlign?: boolean;
|
|
26
|
-
/** 对齐方式 */
|
|
27
|
-
align?: string;
|
|
28
|
-
/** 加载完成回调 */
|
|
29
|
-
onLoad?: Function;
|
|
30
|
-
includes?: Function;
|
|
31
|
-
/** SVG 填充色 */
|
|
32
|
-
fill?: string;
|
|
33
|
-
/** 样式对象 */
|
|
34
|
-
style?: object;
|
|
35
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { IconifyIconData } from './src/iconifyIconOffline';
|
|
2
|
-
import { DefineComponent, PropType, Component, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
-
/** 本地图标组件 */
|
|
4
|
-
declare const YcIconifyIconOffline: DefineComponent<{
|
|
5
|
-
icon: {
|
|
6
|
-
type: PropType<string | Component | IconifyIconData>;
|
|
7
|
-
default: null;
|
|
8
|
-
};
|
|
9
|
-
}, unknown, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
10
|
-
icon: {
|
|
11
|
-
type: PropType<string | Component | IconifyIconData>;
|
|
12
|
-
default: null;
|
|
13
|
-
};
|
|
14
|
-
}>>, {
|
|
15
|
-
icon: string | Component | IconifyIconData;
|
|
16
|
-
}, {}>;
|
|
17
|
-
/** 在线图标组件 */
|
|
18
|
-
declare const YcIconifyIconOnline: DefineComponent<{
|
|
19
|
-
icon: {
|
|
20
|
-
type: StringConstructor;
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
|
-
}, unknown, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
24
|
-
icon: {
|
|
25
|
-
type: StringConstructor;
|
|
26
|
-
default: string;
|
|
27
|
-
};
|
|
28
|
-
}>>, {
|
|
29
|
-
icon: string;
|
|
30
|
-
}, {}>;
|
|
31
|
-
/** iconfont 组件 */
|
|
32
|
-
declare const YcFontIcon: DefineComponent<{
|
|
33
|
-
icon: {
|
|
34
|
-
type: StringConstructor;
|
|
35
|
-
default: string;
|
|
36
|
-
};
|
|
37
|
-
}, unknown, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
38
|
-
icon: {
|
|
39
|
-
type: StringConstructor;
|
|
40
|
-
default: string;
|
|
41
|
-
};
|
|
42
|
-
}>>, {
|
|
43
|
-
icon: string;
|
|
44
|
-
}, {}>;
|
|
45
|
-
export { YcIconifyIconOffline, YcIconifyIconOnline, YcFontIcon };
|
|
46
|
-
export { useRenderIcon } from './src/hooks';
|
|
47
|
-
export type { YcIconType } from './src/types';
|
|
48
|
-
export type { IconifyIconData } from './src/iconifyIconOffline';
|
|
49
|
-
export { YcIconifyIconOffline as IconifyIconOffline, YcIconifyIconOnline as IconifyIconOnline, YcFontIcon as FontIcon };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var iconifyIconOffline = require('./src/iconifyIconOffline.js');
|
|
4
|
-
var iconifyIconOnline = require('./src/iconifyIconOnline.js');
|
|
5
|
-
var iconfont = require('./src/iconfont.js');
|
|
6
|
-
var hooks = require('./src/hooks.js');
|
|
7
|
-
|
|
8
|
-
const YcIconifyIconOffline = iconifyIconOffline.default;
|
|
9
|
-
const YcIconifyIconOnline = iconifyIconOnline.default;
|
|
10
|
-
const YcFontIcon = iconfont.default;
|
|
11
|
-
|
|
12
|
-
exports.useRenderIcon = hooks.useRenderIcon;
|
|
13
|
-
exports.FontIcon = YcFontIcon;
|
|
14
|
-
exports.IconifyIconOffline = YcIconifyIconOffline;
|
|
15
|
-
exports.IconifyIconOnline = YcIconifyIconOnline;
|
|
16
|
-
exports.YcFontIcon = YcFontIcon;
|
|
17
|
-
exports.YcIconifyIconOffline = YcIconifyIconOffline;
|
|
18
|
-
exports.YcIconifyIconOnline = YcIconifyIconOnline;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
import { YcIconType } from './types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 渲染图标的 Hook
|
|
6
|
-
* 支持 iconfont、自定义 SVG、Iconify 以及 URL 中所有的图标
|
|
7
|
-
* @param icon 必传 图标
|
|
8
|
-
* @param attrs 可选 YcIconType 属性
|
|
9
|
-
* @returns Component
|
|
10
|
-
*/
|
|
11
|
-
export declare function useRenderIcon(icon: string | Component | Record<string, unknown>, attrs?: YcIconType): Component | undefined;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var vue = require('vue');
|
|
4
|
-
var iconfont = require('./iconfont.js');
|
|
5
|
-
var iconifyIconOnline = require('./iconifyIconOnline.js');
|
|
6
|
-
var iconifyIconOffline = require('./iconifyIconOffline.js');
|
|
7
|
-
var lodashEs = require('lodash-es');
|
|
8
|
-
|
|
9
|
-
function isUrlIcon(icon) {
|
|
10
|
-
return /^https?:\/\//i.test(icon);
|
|
11
|
-
}
|
|
12
|
-
const UrlIconComponent = vue.defineComponent({
|
|
13
|
-
name: "YcUrlIcon",
|
|
14
|
-
props: {
|
|
15
|
-
src: { type: String, required: true },
|
|
16
|
-
size: { type: Number, default: 20 }
|
|
17
|
-
},
|
|
18
|
-
render() {
|
|
19
|
-
return vue.h("img", {
|
|
20
|
-
src: this.src,
|
|
21
|
-
class: "yc-url-icon",
|
|
22
|
-
style: {
|
|
23
|
-
width: `${this.size}px`,
|
|
24
|
-
height: `${this.size}px`,
|
|
25
|
-
objectFit: "contain"
|
|
26
|
-
},
|
|
27
|
-
alt: "icon"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
function useRenderIcon(icon, attrs) {
|
|
32
|
-
const ifReg = /^IF-/;
|
|
33
|
-
if (lodashEs.isString(icon) && isUrlIcon(icon)) {
|
|
34
|
-
const attrSize = (attrs == null ? void 0 : attrs.width) || (attrs == null ? void 0 : attrs.height);
|
|
35
|
-
const size = typeof attrSize === "number" ? attrSize : 20;
|
|
36
|
-
return vue.h(UrlIconComponent, { src: icon, size });
|
|
37
|
-
}
|
|
38
|
-
if (lodashEs.isString(icon) && ifReg.test(icon)) {
|
|
39
|
-
const name = icon.split(ifReg)[1];
|
|
40
|
-
const iconName = name.slice(
|
|
41
|
-
0,
|
|
42
|
-
name.indexOf(" ") == -1 ? name.length : name.indexOf(" ")
|
|
43
|
-
);
|
|
44
|
-
const iconType = name.slice(name.indexOf(" ") + 1, name.length);
|
|
45
|
-
return vue.defineComponent({
|
|
46
|
-
name: "YcFontIconWrapper",
|
|
47
|
-
render() {
|
|
48
|
-
return vue.h(iconfont.default, {
|
|
49
|
-
icon: iconName,
|
|
50
|
-
iconType,
|
|
51
|
-
...attrs
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
} else if (typeof icon === "function" || typeof (icon == null ? void 0 : icon.render) === "function") {
|
|
56
|
-
return attrs ? vue.h(icon, { ...attrs }) : icon;
|
|
57
|
-
} else if (typeof icon === "object") {
|
|
58
|
-
return vue.defineComponent({
|
|
59
|
-
name: "YcOfflineIconWrapper",
|
|
60
|
-
render() {
|
|
61
|
-
return vue.h(iconifyIconOffline.default, {
|
|
62
|
-
icon,
|
|
63
|
-
...attrs
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
} else {
|
|
68
|
-
return vue.defineComponent({
|
|
69
|
-
name: "YcIconWrapper",
|
|
70
|
-
render() {
|
|
71
|
-
if (!icon) return;
|
|
72
|
-
const IconComponent = icon.includes(":") ? iconifyIconOnline.default : iconifyIconOffline.default;
|
|
73
|
-
return vue.h(IconComponent, {
|
|
74
|
-
icon,
|
|
75
|
-
...attrs
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
exports.useRenderIcon = useRenderIcon;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* iconfont 组件
|
|
4
|
-
* 封装 iconfont,默认 font-class 引用模式
|
|
5
|
-
* 支持 unicode 引用、font-class 引用、symbol 引用
|
|
6
|
-
* @see https://www.iconfont.cn/help/detail?helptype=code
|
|
7
|
-
*/
|
|
8
|
-
declare const _default: DefineComponent<{
|
|
9
|
-
icon: {
|
|
10
|
-
type: StringConstructor;
|
|
11
|
-
default: string;
|
|
12
|
-
};
|
|
13
|
-
}, unknown, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
14
|
-
icon: {
|
|
15
|
-
type: StringConstructor;
|
|
16
|
-
default: string;
|
|
17
|
-
};
|
|
18
|
-
}>>, {
|
|
19
|
-
icon: string;
|
|
20
|
-
}, {}>;
|
|
21
|
-
export default _default;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
|
|
7
|
-
var FontIcon = vue.defineComponent({
|
|
8
|
-
name: "YcFontIcon",
|
|
9
|
-
props: {
|
|
10
|
-
icon: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: ""
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
render() {
|
|
16
|
-
const attrs = this.$attrs;
|
|
17
|
-
if (Object.keys(attrs).includes("uni") || (attrs == null ? void 0 : attrs.iconType) === "uni") {
|
|
18
|
-
return vue.h(
|
|
19
|
-
"i",
|
|
20
|
-
{
|
|
21
|
-
class: "iconfont",
|
|
22
|
-
...attrs
|
|
23
|
-
},
|
|
24
|
-
this.icon
|
|
25
|
-
);
|
|
26
|
-
} else if (Object.keys(attrs).includes("svg") || (attrs == null ? void 0 : attrs.iconType) === "svg") {
|
|
27
|
-
return vue.h(
|
|
28
|
-
"svg",
|
|
29
|
-
{
|
|
30
|
-
class: "icon-svg"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
default: () => [
|
|
34
|
-
vue.h("use", {
|
|
35
|
-
"xlink:href": `#${this.icon}`
|
|
36
|
-
})
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
} else {
|
|
41
|
-
return vue.h("i", {
|
|
42
|
-
class: `iconfont ${this.icon}`,
|
|
43
|
-
...attrs
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
exports.default = FontIcon;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { PropType, Component, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Iconify 图标数据接口
|
|
5
|
-
*/
|
|
6
|
-
export interface IconifyIconData {
|
|
7
|
-
body: string;
|
|
8
|
-
width?: number;
|
|
9
|
-
height?: number;
|
|
10
|
-
left?: number;
|
|
11
|
-
top?: number;
|
|
12
|
-
rotate?: number;
|
|
13
|
-
hFlip?: boolean;
|
|
14
|
-
vFlip?: boolean;
|
|
15
|
-
}
|
|
16
|
-
type IconType = string | IconifyIconData | Component;
|
|
17
|
-
/**
|
|
18
|
-
* Iconify 离线图标组件
|
|
19
|
-
* 用于内网环境,从本地加载图标
|
|
20
|
-
*/
|
|
21
|
-
declare const _default: DefineComponent<{
|
|
22
|
-
icon: {
|
|
23
|
-
type: PropType<IconType>;
|
|
24
|
-
default: null;
|
|
25
|
-
};
|
|
26
|
-
}, unknown, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
27
|
-
icon: {
|
|
28
|
-
type: PropType<IconType>;
|
|
29
|
-
default: null;
|
|
30
|
-
};
|
|
31
|
-
}>>, {
|
|
32
|
-
icon: IconType;
|
|
33
|
-
}, {}>;
|
|
34
|
-
export default _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var vue$1 = require('@iconify/vue');
|
|
7
|
-
|
|
8
|
-
function isIconifyIconData(icon) {
|
|
9
|
-
return typeof icon === "object" && icon !== null && "body" in icon && typeof icon.body === "string";
|
|
10
|
-
}
|
|
11
|
-
var IconifyIconOffline = vue.defineComponent({
|
|
12
|
-
name: "YcIconifyIconOffline",
|
|
13
|
-
components: { IconifyIcon: vue$1.Icon },
|
|
14
|
-
props: {
|
|
15
|
-
icon: {
|
|
16
|
-
type: [String, Object, Function],
|
|
17
|
-
default: null
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
render() {
|
|
21
|
-
if (isIconifyIconData(this.icon)) {
|
|
22
|
-
const iconName = this.icon.name || "custom-icon";
|
|
23
|
-
vue$1.addIcon(iconName, this.icon);
|
|
24
|
-
}
|
|
25
|
-
const attrs = this.$attrs;
|
|
26
|
-
if (typeof this.icon === "string") {
|
|
27
|
-
return vue.h(
|
|
28
|
-
vue$1.Icon,
|
|
29
|
-
{
|
|
30
|
-
icon: this.icon,
|
|
31
|
-
"aria-hidden": false,
|
|
32
|
-
style: (attrs == null ? void 0 : attrs.style) ? Object.assign(attrs.style, { outline: "none" }) : { outline: "none" },
|
|
33
|
-
...attrs
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
default: () => []
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
} else {
|
|
40
|
-
return vue.h(
|
|
41
|
-
this.icon,
|
|
42
|
-
{
|
|
43
|
-
"aria-hidden": false,
|
|
44
|
-
style: (attrs == null ? void 0 : attrs.style) ? Object.assign(attrs.style, { outline: "none" }) : { outline: "none" },
|
|
45
|
-
...attrs
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
default: () => []
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
exports.default = IconifyIconOffline;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* Iconify 在线图标组件
|
|
4
|
-
* 用于外网环境,从 CDN 加载图标
|
|
5
|
-
*/
|
|
6
|
-
declare const _default: DefineComponent<{
|
|
7
|
-
icon: {
|
|
8
|
-
type: StringConstructor;
|
|
9
|
-
default: string;
|
|
10
|
-
};
|
|
11
|
-
}, unknown, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
12
|
-
icon: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: string;
|
|
15
|
-
};
|
|
16
|
-
}>>, {
|
|
17
|
-
icon: string;
|
|
18
|
-
}, {}>;
|
|
19
|
-
export default _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var vue$1 = require('@iconify/vue');
|
|
7
|
-
|
|
8
|
-
var IconifyIconOnline = vue.defineComponent({
|
|
9
|
-
name: "YcIconifyIconOnline",
|
|
10
|
-
components: { IconifyIcon: vue$1.Icon },
|
|
11
|
-
props: {
|
|
12
|
-
icon: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: ""
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
render() {
|
|
18
|
-
const attrs = this.$attrs;
|
|
19
|
-
return vue.h(
|
|
20
|
-
vue$1.Icon,
|
|
21
|
-
{
|
|
22
|
-
icon: `${this.icon}`,
|
|
23
|
-
"aria-hidden": false,
|
|
24
|
-
style: (attrs == null ? void 0 : attrs.style) ? Object.assign(attrs.style, { outline: "none" }) : { outline: "none" },
|
|
25
|
-
...attrs
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
default: () => []
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
exports.default = IconifyIconOnline;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 图标属性类型
|
|
3
|
-
* @see https://docs.iconify.design/icon-components/vue/#properties
|
|
4
|
-
*/
|
|
5
|
-
export interface YcIconType {
|
|
6
|
-
/** 是否内联显示 */
|
|
7
|
-
inline?: boolean;
|
|
8
|
-
/** 图标宽度 */
|
|
9
|
-
width?: string | number;
|
|
10
|
-
/** 图标高度 */
|
|
11
|
-
height?: string | number;
|
|
12
|
-
/** 水平翻转 */
|
|
13
|
-
horizontalFlip?: boolean;
|
|
14
|
-
/** 垂直翻转 */
|
|
15
|
-
verticalFlip?: boolean;
|
|
16
|
-
/** 翻转方向 */
|
|
17
|
-
flip?: string;
|
|
18
|
-
/** 旋转角度 */
|
|
19
|
-
rotate?: number | string;
|
|
20
|
-
/** 颜色 */
|
|
21
|
-
color?: string;
|
|
22
|
-
/** 水平对齐 */
|
|
23
|
-
horizontalAlign?: boolean;
|
|
24
|
-
/** 垂直对齐 */
|
|
25
|
-
verticalAlign?: boolean;
|
|
26
|
-
/** 对齐方式 */
|
|
27
|
-
align?: string;
|
|
28
|
-
/** 加载完成回调 */
|
|
29
|
-
onLoad?: Function;
|
|
30
|
-
includes?: Function;
|
|
31
|
-
/** SVG 填充色 */
|
|
32
|
-
fill?: string;
|
|
33
|
-
/** 样式对象 */
|
|
34
|
-
style?: object;
|
|
35
|
-
}
|