@vrojs/base 0.0.3 → 0.0.4
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/index.d.ts +2 -0
- package/dist/index.js +41 -33
- package/dist/style/index.css +1 -1
- package/dist/types/ExtractComponentProps.d.ts +3 -0
- package/dist/types/ExtractComponentProps.js +1 -0
- package/dist/types/VroSlots.d.ts +4 -0
- package/dist/types/VroSlots.js +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/utils/addUnit.d.ts +1 -0
- package/dist/utils/addUnit.js +7 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +15 -15
- package/dist/utils/showComponent.d.ts +6 -5
- package/dist/utils/showComponent.js +32 -10
- package/dist/vro-circle-progress/index.d.ts +113 -0
- package/dist/vro-circle-progress/index.js +11 -0
- package/dist/vro-circle-progress/style/css.d.ts +0 -0
- package/dist/vro-circle-progress/style/css.js +4 -0
- package/dist/vro-circle-progress/style/index.css +1 -0
- package/dist/vro-circle-progress/style/index.d.ts +0 -0
- package/dist/vro-circle-progress/style/index.js +4 -0
- package/dist/vro-circle-progress/types.d.ts +57 -0
- package/dist/vro-circle-progress/types.js +52 -0
- package/dist/vro-circle-progress/vro-circle-progress.vue.d.ts +70 -0
- package/dist/vro-circle-progress/vro-circle-progress.vue.js +72 -0
- package/dist/vro-circle-progress/vro-circle-progress.vue2.js +4 -0
- package/dist/vro-icon/index.d.ts +58 -0
- package/dist/vro-icon/index.js +11 -0
- package/dist/vro-icon/style/css.d.ts +0 -0
- package/dist/vro-icon/style/css.js +4 -0
- package/dist/vro-icon/style/index.css +1 -0
- package/dist/vro-icon/style/index.d.ts +0 -0
- package/dist/vro-icon/style/index.js +4 -0
- package/dist/vro-icon/types.d.ts +29 -0
- package/dist/vro-icon/types.js +30 -0
- package/dist/vro-icon/vro-icon.vue.d.ts +37 -0
- package/dist/vro-icon/vro-icon.vue.js +36 -0
- package/dist/vro-icon/vro-icon.vue2.js +4 -0
- package/dist/vro-input/index.d.ts +3 -3
- package/dist/vro-input/types.d.ts +5 -5
- package/dist/vro-input/types.js +6 -9
- package/dist/vro-input/vro-input.vue.d.ts +3 -3
- package/dist/vro-loading/index.d.ts +9 -30
- package/dist/vro-loading/style/index.css +1 -1
- package/dist/vro-loading/types.d.ts +7 -9
- package/dist/vro-loading/types.js +8 -10
- package/dist/vro-loading/vro-loading.vue.d.ts +6 -18
- package/dist/vro-loading/vro-loading.vue.js +37 -24
- package/package.json +7 -4
- package/dist/utils/props.d.ts +0 -2
- package/dist/utils/props.js +0 -5
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as p, computed as k, createElementBlock as i, openBlock as n, normalizeStyle as m, createElementVNode as c, renderSlot as h, createTextVNode as g, toDisplayString as f } from "vue";
|
|
2
|
+
import { clamp as u } from "@daysnap/utils";
|
|
3
|
+
import { addUnit as v } from "../utils/addUnit.js";
|
|
4
|
+
import { vroCircleProgressProps as _ } from "./types.js";
|
|
5
|
+
const y = ["aria-valuenow"], w = {
|
|
6
|
+
class: "vro-circle-progress-svg",
|
|
7
|
+
viewBox: "0 0 100 100"
|
|
8
|
+
}, x = ["r", "stroke-width"], b = ["r", "stroke-width", "stroke-linecap", "stroke-dasharray", "stroke-dashoffset"], z = { class: "vro-circle-progress-content" }, s = 50, B = /* @__PURE__ */ p({
|
|
9
|
+
name: "VroCircleProgress",
|
|
10
|
+
__name: "vro-circle-progress",
|
|
11
|
+
props: _,
|
|
12
|
+
setup(d) {
|
|
13
|
+
const e = d, r = k(() => {
|
|
14
|
+
const o = u(0, e.modelValue, 100), t = u(0, e.strokeWidth, 100), a = s - t / 2, l = 2 * Math.PI * a;
|
|
15
|
+
return {
|
|
16
|
+
value: o,
|
|
17
|
+
strokeWidth: t,
|
|
18
|
+
radius: a,
|
|
19
|
+
circumference: l,
|
|
20
|
+
strokeDashoffset: l * (1 - o / 100),
|
|
21
|
+
text: `${Math.round(o)}%`,
|
|
22
|
+
style: {
|
|
23
|
+
"--size": v(e.size) || "var(--vro-circle-progress-size)",
|
|
24
|
+
"--color": e.color || "var(--vro-circle-progress-color)",
|
|
25
|
+
"--background-color": e.backgroundColor || "var(--vro-circle-progress-background-color)",
|
|
26
|
+
"--duration": v(e.duration, "ms") || "var(--vro-circle-progress-duration)",
|
|
27
|
+
"--curve": e.curve || "var(--vro-circle-progress-curve)"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
return (o, t) => (n(), i("div", {
|
|
32
|
+
class: "vro-circle-progress",
|
|
33
|
+
style: m(r.value.style),
|
|
34
|
+
role: "progressbar",
|
|
35
|
+
"aria-valuenow": r.value.value,
|
|
36
|
+
"aria-valuemin": "0",
|
|
37
|
+
"aria-valuemax": "100"
|
|
38
|
+
}, [
|
|
39
|
+
(n(), i("svg", w, [
|
|
40
|
+
c("circle", {
|
|
41
|
+
class: "vro-circle-progress-track",
|
|
42
|
+
cx: s,
|
|
43
|
+
cy: s,
|
|
44
|
+
r: r.value.radius,
|
|
45
|
+
fill: "none",
|
|
46
|
+
"stroke-width": r.value.strokeWidth
|
|
47
|
+
}, null, 8, x),
|
|
48
|
+
c("circle", {
|
|
49
|
+
class: "vro-circle-progress-line",
|
|
50
|
+
cx: s,
|
|
51
|
+
cy: s,
|
|
52
|
+
r: r.value.radius,
|
|
53
|
+
fill: "none",
|
|
54
|
+
"stroke-width": r.value.strokeWidth,
|
|
55
|
+
"stroke-linecap": o.strokeLinecap,
|
|
56
|
+
"stroke-dasharray": r.value.circumference,
|
|
57
|
+
"stroke-dashoffset": r.value.strokeDashoffset
|
|
58
|
+
}, null, 8, b)
|
|
59
|
+
])),
|
|
60
|
+
c("div", z, [
|
|
61
|
+
h(o.$slots, "default", {
|
|
62
|
+
value: r.value.value
|
|
63
|
+
}, () => [
|
|
64
|
+
g(f(r.value.text), 1)
|
|
65
|
+
])
|
|
66
|
+
])
|
|
67
|
+
], 12, y));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
B as default
|
|
72
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export declare const VroIcon: import('..').WithInstall<{
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
+
name: StringConstructor;
|
|
5
|
+
fontFamily: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
size: import('vue').PropType<string | number>;
|
|
10
|
+
color: StringConstructor;
|
|
11
|
+
loading: import('vue').PropType<boolean | string>;
|
|
12
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
13
|
+
fontFamily: string;
|
|
14
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLElement, import('vue').ComponentProvideOptions, {
|
|
15
|
+
P: {};
|
|
16
|
+
B: {};
|
|
17
|
+
D: {};
|
|
18
|
+
C: {};
|
|
19
|
+
M: {};
|
|
20
|
+
Defaults: {};
|
|
21
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
22
|
+
name: StringConstructor;
|
|
23
|
+
fontFamily: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
size: import('vue').PropType<string | number>;
|
|
28
|
+
color: StringConstructor;
|
|
29
|
+
loading: import('vue').PropType<boolean | string>;
|
|
30
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
31
|
+
fontFamily: string;
|
|
32
|
+
}>;
|
|
33
|
+
__isFragment?: never;
|
|
34
|
+
__isTeleport?: never;
|
|
35
|
+
__isSuspense?: never;
|
|
36
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
37
|
+
name: StringConstructor;
|
|
38
|
+
fontFamily: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
size: import('vue').PropType<string | number>;
|
|
43
|
+
color: StringConstructor;
|
|
44
|
+
loading: import('vue').PropType<boolean | string>;
|
|
45
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
46
|
+
fontFamily: string;
|
|
47
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
48
|
+
$slots: {
|
|
49
|
+
default?(_: {}): any;
|
|
50
|
+
};
|
|
51
|
+
})>;
|
|
52
|
+
export default VroIcon;
|
|
53
|
+
export type VroIconInstance = InstanceType<typeof VroIcon>;
|
|
54
|
+
declare module 'vue' {
|
|
55
|
+
interface GlobalComponents {
|
|
56
|
+
VroIcon: typeof VroIcon;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "@daysnap/utils";
|
|
2
|
+
import "vue";
|
|
3
|
+
import { withInstall as o } from "../utils/withInstall.js";
|
|
4
|
+
import r from "./vro-icon.vue.js";
|
|
5
|
+
import { vroIconProps as a } from "./types.js";
|
|
6
|
+
const f = o(r);
|
|
7
|
+
export {
|
|
8
|
+
f as VroIcon,
|
|
9
|
+
f as default,
|
|
10
|
+
a as vroIconProps
|
|
11
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root,:host{--vro-icon-duration: 2s;--vro-icon-size: inherit;--vro-icon-color: inherit}.vro-icon{display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;line-height:1em;font-size:var(--size);color:var(--color);text-rendering:auto;-webkit-font-smoothing:antialiased}.vro-icon img{display:block;width:1em;height:1em;object-fit:contain}.vro-icon svg{height:1em;width:1em;fill:currentColor;stroke:currentColor}.vro-icon.is-loading{animation:rotating var(--duration) linear infinite}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const vroIconProps: {
|
|
3
|
+
/**
|
|
4
|
+
* 图标名称。传入图片地址时会渲染为 img,否则作为字体图标类名使用。
|
|
5
|
+
*/
|
|
6
|
+
name: StringConstructor;
|
|
7
|
+
/**
|
|
8
|
+
* 字体图标族类名,仅在 name 不是图片地址时生效。
|
|
9
|
+
*
|
|
10
|
+
* @default iconfont
|
|
11
|
+
*/
|
|
12
|
+
fontFamily: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 图标尺寸,传入数字时单位为 px。
|
|
18
|
+
*/
|
|
19
|
+
size: PropType<string | number>;
|
|
20
|
+
/**
|
|
21
|
+
* 图标颜色。
|
|
22
|
+
*/
|
|
23
|
+
color: StringConstructor;
|
|
24
|
+
/**
|
|
25
|
+
* 是否开启旋转动画,传入字符串时作为动画时长。
|
|
26
|
+
*/
|
|
27
|
+
loading: PropType<boolean | string>;
|
|
28
|
+
};
|
|
29
|
+
export type VroIconProps = ExtractPropTypes<typeof vroIconProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const n = {
|
|
2
|
+
/**
|
|
3
|
+
* 图标名称。传入图片地址时会渲染为 img,否则作为字体图标类名使用。
|
|
4
|
+
*/
|
|
5
|
+
name: String,
|
|
6
|
+
/**
|
|
7
|
+
* 字体图标族类名,仅在 name 不是图片地址时生效。
|
|
8
|
+
*
|
|
9
|
+
* @default iconfont
|
|
10
|
+
*/
|
|
11
|
+
fontFamily: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "iconfont"
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* 图标尺寸,传入数字时单位为 px。
|
|
17
|
+
*/
|
|
18
|
+
size: [String, Number],
|
|
19
|
+
/**
|
|
20
|
+
* 图标颜色。
|
|
21
|
+
*/
|
|
22
|
+
color: String,
|
|
23
|
+
/**
|
|
24
|
+
* 是否开启旋转动画,传入字符串时作为动画时长。
|
|
25
|
+
*/
|
|
26
|
+
loading: [Boolean, String]
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
n as vroIconProps
|
|
30
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
11
|
+
name: StringConstructor;
|
|
12
|
+
fontFamily: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
size: import('vue').PropType<string | number>;
|
|
17
|
+
color: StringConstructor;
|
|
18
|
+
loading: import('vue').PropType<boolean | string>;
|
|
19
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
+
name: StringConstructor;
|
|
21
|
+
fontFamily: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
size: import('vue').PropType<string | number>;
|
|
26
|
+
color: StringConstructor;
|
|
27
|
+
loading: import('vue').PropType<boolean | string>;
|
|
28
|
+
}>> & Readonly<{}>, {
|
|
29
|
+
fontFamily: string;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as p, computed as s, createElementBlock as i, openBlock as c, normalizeStyle as d, normalizeClass as v, renderSlot as f, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { isBoolean as g } from "@daysnap/utils";
|
|
3
|
+
import { addUnit as h } from "../utils/addUnit.js";
|
|
4
|
+
import { vroIconProps as y } from "./types.js";
|
|
5
|
+
const z = ["src"], b = /* @__PURE__ */ p({
|
|
6
|
+
name: "VroIcon",
|
|
7
|
+
__name: "vro-icon",
|
|
8
|
+
props: y,
|
|
9
|
+
setup(l) {
|
|
10
|
+
const n = l, a = s(() => /^(?:https?:)?\/\/|^(?:data|blob):|[/.]\w+(?:[?#].*)?$/.test(n.name ?? "")), m = s(() => {
|
|
11
|
+
const { fontFamily: o, name: e, loading: r } = n, t = [];
|
|
12
|
+
return a.value || t.push(o, e), r && t.push("is-loading"), t;
|
|
13
|
+
}), u = s(() => {
|
|
14
|
+
const { color: o, size: e, loading: r } = n;
|
|
15
|
+
return {
|
|
16
|
+
"--color": o || "var(--vro-icon-color)",
|
|
17
|
+
"--size": e || e === 0 ? h(e) : "var(--vro-icon-size)",
|
|
18
|
+
"--duration": !g(r) && r ? r : "var(--vro-icon-duration)"
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
return (o, e) => (c(), i("i", {
|
|
22
|
+
class: v(["vro-icon", m.value]),
|
|
23
|
+
style: d(u.value)
|
|
24
|
+
}, [
|
|
25
|
+
f(o.$slots, "default", {}, () => [
|
|
26
|
+
a.value ? (c(), i("img", {
|
|
27
|
+
key: 0,
|
|
28
|
+
src: o.name
|
|
29
|
+
}, null, 8, z)) : _("", !0)
|
|
30
|
+
])
|
|
31
|
+
], 6));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
b as default
|
|
36
|
+
};
|
|
@@ -28,7 +28,7 @@ export declare const VroInput: import('..').WithInstall<import('vue').DefineComp
|
|
|
28
28
|
id: StringConstructor;
|
|
29
29
|
name: StringConstructor;
|
|
30
30
|
readonly: BooleanConstructor;
|
|
31
|
-
inputmode: import('vue').PropType<"
|
|
31
|
+
inputmode: import('vue').PropType<import('vue').HTMLAttributes["inputmode"]>;
|
|
32
32
|
}>, {
|
|
33
33
|
input: HTMLInputElement;
|
|
34
34
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -64,7 +64,7 @@ export declare const VroInput: import('..').WithInstall<import('vue').DefineComp
|
|
|
64
64
|
id: StringConstructor;
|
|
65
65
|
name: StringConstructor;
|
|
66
66
|
readonly: BooleanConstructor;
|
|
67
|
-
inputmode: import('vue').PropType<"
|
|
67
|
+
inputmode: import('vue').PropType<import('vue').HTMLAttributes["inputmode"]>;
|
|
68
68
|
}>> & Readonly<{
|
|
69
69
|
onInput?: ((value: InputEvent) => any) | undefined;
|
|
70
70
|
onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
@@ -72,8 +72,8 @@ export declare const VroInput: import('..').WithInstall<import('vue').DefineComp
|
|
|
72
72
|
}>, {
|
|
73
73
|
precision: string | number;
|
|
74
74
|
type: import('vue').InputTypeHTMLAttribute | "decimal";
|
|
75
|
-
disabled: boolean;
|
|
76
75
|
modelValue: string | number | null | undefined;
|
|
76
|
+
disabled: boolean;
|
|
77
77
|
max: string | number;
|
|
78
78
|
min: string | number;
|
|
79
79
|
autoFix: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtractPropTypes, InputTypeHTMLAttribute } from 'vue';
|
|
1
|
+
import { ExtractPropTypes, HTMLAttributes, InputTypeHTMLAttribute, PropType } from 'vue';
|
|
2
2
|
export declare const vroInputProps: {
|
|
3
3
|
/**
|
|
4
4
|
* 输入框类型。
|
|
@@ -10,14 +10,14 @@ export declare const vroInputProps: {
|
|
|
10
10
|
* @default text
|
|
11
11
|
*/
|
|
12
12
|
type: {
|
|
13
|
-
type:
|
|
13
|
+
type: PropType<InputTypeHTMLAttribute | "decimal">;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* 输入框绑定值。
|
|
18
18
|
*/
|
|
19
19
|
modelValue: {
|
|
20
|
-
type:
|
|
20
|
+
type: PropType<string | number | null | undefined>;
|
|
21
21
|
default: string;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
@@ -72,7 +72,7 @@ export declare const vroInputProps: {
|
|
|
72
72
|
*
|
|
73
73
|
* value 为当前输入值,preValue 为上一次 modelValue。
|
|
74
74
|
*/
|
|
75
|
-
formatter:
|
|
75
|
+
formatter: PropType<(value: string, preValue: string) => string>;
|
|
76
76
|
/**
|
|
77
77
|
* 原生 id 属性。未传入时会自动生成一个 id。
|
|
78
78
|
*/
|
|
@@ -90,6 +90,6 @@ export declare const vroInputProps: {
|
|
|
90
90
|
*
|
|
91
91
|
* 当 type 为 number 或 decimal 时,组件会自动设置更适合移动端的键盘类型。
|
|
92
92
|
*/
|
|
93
|
-
inputmode:
|
|
93
|
+
inputmode: PropType<HTMLAttributes["inputmode"]>;
|
|
94
94
|
};
|
|
95
95
|
export type VroInputProps = ExtractPropTypes<typeof vroInputProps>;
|
package/dist/vro-input/types.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import "vue";
|
|
3
|
-
import { definePropType as e } from "../utils/props.js";
|
|
4
|
-
const o = {
|
|
1
|
+
const e = {
|
|
5
2
|
/**
|
|
6
3
|
* 输入框类型。
|
|
7
4
|
*
|
|
@@ -12,14 +9,14 @@ const o = {
|
|
|
12
9
|
* @default text
|
|
13
10
|
*/
|
|
14
11
|
type: {
|
|
15
|
-
type:
|
|
12
|
+
type: String,
|
|
16
13
|
default: "text"
|
|
17
14
|
},
|
|
18
15
|
/**
|
|
19
16
|
* 输入框绑定值。
|
|
20
17
|
*/
|
|
21
18
|
modelValue: {
|
|
22
|
-
type:
|
|
19
|
+
type: [String, Number],
|
|
23
20
|
default: ""
|
|
24
21
|
},
|
|
25
22
|
/**
|
|
@@ -74,7 +71,7 @@ const o = {
|
|
|
74
71
|
*
|
|
75
72
|
* value 为当前输入值,preValue 为上一次 modelValue。
|
|
76
73
|
*/
|
|
77
|
-
formatter:
|
|
74
|
+
formatter: Function,
|
|
78
75
|
/**
|
|
79
76
|
* 原生 id 属性。未传入时会自动生成一个 id。
|
|
80
77
|
*/
|
|
@@ -92,8 +89,8 @@ const o = {
|
|
|
92
89
|
*
|
|
93
90
|
* 当 type 为 number 或 decimal 时,组件会自动设置更适合移动端的键盘类型。
|
|
94
91
|
*/
|
|
95
|
-
inputmode:
|
|
92
|
+
inputmode: String
|
|
96
93
|
};
|
|
97
94
|
export {
|
|
98
|
-
|
|
95
|
+
e as vroInputProps
|
|
99
96
|
};
|
|
@@ -27,7 +27,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
27
27
|
id: StringConstructor;
|
|
28
28
|
name: StringConstructor;
|
|
29
29
|
readonly: BooleanConstructor;
|
|
30
|
-
inputmode: import('vue').PropType<"
|
|
30
|
+
inputmode: import('vue').PropType<import('vue').HTMLAttributes["inputmode"]>;
|
|
31
31
|
}>, {
|
|
32
32
|
input: HTMLInputElement;
|
|
33
33
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -63,7 +63,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
63
63
|
id: StringConstructor;
|
|
64
64
|
name: StringConstructor;
|
|
65
65
|
readonly: BooleanConstructor;
|
|
66
|
-
inputmode: import('vue').PropType<"
|
|
66
|
+
inputmode: import('vue').PropType<import('vue').HTMLAttributes["inputmode"]>;
|
|
67
67
|
}>> & Readonly<{
|
|
68
68
|
onInput?: ((value: InputEvent) => any) | undefined;
|
|
69
69
|
onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
@@ -71,8 +71,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
71
71
|
}>, {
|
|
72
72
|
precision: string | number;
|
|
73
73
|
type: import('vue').InputTypeHTMLAttribute | "decimal";
|
|
74
|
-
disabled: boolean;
|
|
75
74
|
modelValue: string | number | null | undefined;
|
|
75
|
+
disabled: boolean;
|
|
76
76
|
max: string | number;
|
|
77
77
|
min: string | number;
|
|
78
78
|
autoFix: boolean;
|
|
@@ -5,23 +5,16 @@ export declare const VroLoading: import('..').WithInstall<{
|
|
|
5
5
|
type: import('vue').PropType<import('./types').VroLoadingType>;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
-
size:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
color: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: string;
|
|
15
|
-
};
|
|
8
|
+
size: import('vue').PropType<string | number>;
|
|
9
|
+
color: StringConstructor;
|
|
10
|
+
duration: import('vue').PropType<string | number>;
|
|
16
11
|
ariaLabel: {
|
|
17
12
|
type: StringConstructor;
|
|
18
13
|
default: string;
|
|
19
14
|
};
|
|
20
15
|
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
21
|
-
size: string | number;
|
|
22
16
|
type: import('./types').VroLoadingType;
|
|
23
17
|
ariaLabel: string;
|
|
24
|
-
color: string;
|
|
25
18
|
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
26
19
|
P: {};
|
|
27
20
|
B: {};
|
|
@@ -34,23 +27,16 @@ export declare const VroLoading: import('..').WithInstall<{
|
|
|
34
27
|
type: import('vue').PropType<import('./types').VroLoadingType>;
|
|
35
28
|
default: string;
|
|
36
29
|
};
|
|
37
|
-
size:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
color: {
|
|
42
|
-
type: StringConstructor;
|
|
43
|
-
default: string;
|
|
44
|
-
};
|
|
30
|
+
size: import('vue').PropType<string | number>;
|
|
31
|
+
color: StringConstructor;
|
|
32
|
+
duration: import('vue').PropType<string | number>;
|
|
45
33
|
ariaLabel: {
|
|
46
34
|
type: StringConstructor;
|
|
47
35
|
default: string;
|
|
48
36
|
};
|
|
49
37
|
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
50
|
-
size: string | number;
|
|
51
38
|
type: import('./types').VroLoadingType;
|
|
52
39
|
ariaLabel: string;
|
|
53
|
-
color: string;
|
|
54
40
|
}>;
|
|
55
41
|
__isFragment?: never;
|
|
56
42
|
__isTeleport?: never;
|
|
@@ -60,23 +46,16 @@ export declare const VroLoading: import('..').WithInstall<{
|
|
|
60
46
|
type: import('vue').PropType<import('./types').VroLoadingType>;
|
|
61
47
|
default: string;
|
|
62
48
|
};
|
|
63
|
-
size:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
67
|
-
color: {
|
|
68
|
-
type: StringConstructor;
|
|
69
|
-
default: string;
|
|
70
|
-
};
|
|
49
|
+
size: import('vue').PropType<string | number>;
|
|
50
|
+
color: StringConstructor;
|
|
51
|
+
duration: import('vue').PropType<string | number>;
|
|
71
52
|
ariaLabel: {
|
|
72
53
|
type: StringConstructor;
|
|
73
54
|
default: string;
|
|
74
55
|
};
|
|
75
56
|
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
76
|
-
size: string | number;
|
|
77
57
|
type: import('./types').VroLoadingType;
|
|
78
58
|
ariaLabel: string;
|
|
79
|
-
color: string;
|
|
80
59
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
81
60
|
$slots: {
|
|
82
61
|
icon?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:root,:host{--vro-loading-size: 24px;--vro-loading-color: currentColor;--vro-loading-circular-duration: 1.6s;--vro-loading-spinner-duration: 1.2s;--vro-loading-dots-duration: 1s;--vro-loading-image-duration: 1.2s}.vro-loading{display:inline-flex;align-items:center;justify-content:center;color:var(--color);line-height:1;vertical-align:middle}.vro-loading-circular{width:var(--size);height:var(--size);animation:vro-loading-rotate var(--duration) linear infinite}.vro-loading-circular circle{stroke:currentColor;stroke-width:4;stroke-linecap:round;stroke-dasharray:90,150;stroke-dashoffset:0;animation:vro-loading-circular var(--duration) ease-in-out infinite}.vro-loading-spinner{width:var(--size);height:var(--size);animation:vro-loading-fade var(--duration) linear infinite}.vro-loading-dots{display:inline-flex;align-items:center;justify-content:center;gap:calc(var(--size) * .12);width:var(--size);height:var(--size)}.vro-loading-dots i{width:calc(var(--size) * .18);height:calc(var(--size) * .18);background:currentColor;border-radius:50%;animation:vro-loading-dot var(--duration) ease-in-out infinite}.vro-loading-dots i:nth-child(2){animation-delay:.15s}.vro-loading-dots i:nth-child(3){animation-delay:.3s}.vro-loading-image{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);gap:max(1px,var(--size) * .14);width:var(--size);height:var(--size)}.vro-loading-image i{background:currentColor;opacity:.16}.vro-loading-image i:nth-child(1){animation:vro-loading-image-1 var(--duration) linear infinite}.vro-loading-image i:nth-child(2){animation:vro-loading-image-2 var(--duration) linear infinite}.vro-loading-image i:nth-child(3){animation:vro-loading-image-4 var(--duration) linear infinite}.vro-loading-image i:nth-child(4){animation:vro-loading-image-3 var(--duration) linear infinite}@keyframes vro-loading-rotate{to{transform:rotate(360deg)}}@keyframes vro-loading-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}to{stroke-dasharray:90,150;stroke-dashoffset:-120}}@keyframes vro-loading-fade{to{transform:rotate(360deg)}}@keyframes vro-loading-dot{0%,80%,to{opacity:.35;transform:scale(.72)}40%{opacity:1;transform:scale(1)}}@keyframes vro-loading-image-1{0%,12.5%,to{opacity:.86}25%,87.5%{opacity:.16}}@keyframes vro-loading-image-2{0%,to{opacity:.16}12.5%,37.5%{opacity:.86}50%{opacity:.16}}@keyframes vro-loading-image-3{0%,25%,to{opacity:.16}37.5%,62.5%{opacity:.86}75%{opacity:.16}}@keyframes vro-loading-image-4{0%,50%,to{opacity:.16}62.5%,87.5%{opacity:.86}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
export type VroLoadingType = 'circular' | 'spinner' | 'dots';
|
|
2
|
+
export type VroLoadingType = 'circular' | 'spinner' | 'dots' | 'image';
|
|
3
3
|
export declare const vroLoadingProps: {
|
|
4
4
|
/**
|
|
5
5
|
* 加载图标类型。
|
|
@@ -11,17 +11,15 @@ export declare const vroLoadingProps: {
|
|
|
11
11
|
/**
|
|
12
12
|
* 加载图标尺寸,传入数字时单位为 px。
|
|
13
13
|
*/
|
|
14
|
-
size:
|
|
15
|
-
type: PropType<string | number>;
|
|
16
|
-
default: number;
|
|
17
|
-
};
|
|
14
|
+
size: PropType<string | number>;
|
|
18
15
|
/**
|
|
19
16
|
* 加载图标颜色。
|
|
20
17
|
*/
|
|
21
|
-
color:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
color: StringConstructor;
|
|
19
|
+
/**
|
|
20
|
+
* 加载动画时长,传入数字时单位为 ms。
|
|
21
|
+
*/
|
|
22
|
+
duration: PropType<string | number>;
|
|
25
23
|
/**
|
|
26
24
|
* 无障碍标签。
|
|
27
25
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r = {
|
|
2
2
|
/**
|
|
3
3
|
* 加载图标类型。
|
|
4
4
|
*/
|
|
@@ -9,17 +9,15 @@ const t = {
|
|
|
9
9
|
/**
|
|
10
10
|
* 加载图标尺寸,传入数字时单位为 px。
|
|
11
11
|
*/
|
|
12
|
-
size:
|
|
13
|
-
type: [String, Number],
|
|
14
|
-
default: 24
|
|
15
|
-
},
|
|
12
|
+
size: [String, Number],
|
|
16
13
|
/**
|
|
17
14
|
* 加载图标颜色。
|
|
18
15
|
*/
|
|
19
|
-
color:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
color: String,
|
|
17
|
+
/**
|
|
18
|
+
* 加载动画时长,传入数字时单位为 ms。
|
|
19
|
+
*/
|
|
20
|
+
duration: [String, Number],
|
|
23
21
|
/**
|
|
24
22
|
* 无障碍标签。
|
|
25
23
|
*/
|
|
@@ -29,5 +27,5 @@ const t = {
|
|
|
29
27
|
}
|
|
30
28
|
};
|
|
31
29
|
export {
|
|
32
|
-
|
|
30
|
+
r as vroLoadingProps
|
|
33
31
|
};
|