@pixelium/web-vue 0.0.3-beta → 0.0.3
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 +10 -1
- package/dist/pixelium-vue.cjs +2 -2
- package/dist/pixelium-vue.css +1 -1
- package/dist/pixelium-vue.js +563 -558
- package/dist/pixelium-vue.umd.cjs +2 -2
- package/es/alert/draw.d.ts +6 -0
- package/es/alert/index.d.ts +29 -0
- package/es/alert/type.d.ts +83 -0
- package/es/aside/index.css +1 -0
- package/es/aside/index.js +1 -1
- package/es/auto-complete/index.css +1 -0
- package/es/auto-complete/index.js +2 -2
- package/es/button/index.js +4 -4
- package/es/button-group/index.js +2 -2
- package/es/checkbox/index.js +2 -2
- package/es/checkbox-group/index.js +1 -1
- package/es/col/index.js +1 -1
- package/es/container/index.css +1 -0
- package/es/dialog/dialog-wrapped.d.ts +52 -0
- package/es/dialog/dialog.d.ts +51 -0
- package/es/dialog/index.d.ts +5 -0
- package/es/dialog/type.d.ts +308 -0
- package/es/footer/index.css +1 -0
- package/es/form-item/index.css +0 -3
- package/es/form-item/index.js +1 -1
- package/es/grid-item/index.js +1 -1
- package/es/header/index.css +1 -0
- package/es/index.css +1 -1
- package/es/index.js +9 -8
- package/es/input/index.css +1 -0
- package/es/input/index.js +2 -2
- package/es/input-group/index.js +2 -2
- package/es/input-group-label/index.js +2 -2
- package/es/input-number/index.css +1 -0
- package/es/input-number/index.js +2 -2
- package/es/input-tag/index.css +1 -0
- package/es/input-tag/index.js +2 -2
- package/es/main/index.css +4 -0
- package/es/main/index.d.ts +4 -1
- package/es/main/index.js +7 -3
- package/es/main/type.d.ts +7 -0
- package/es/message-box/index.js +1 -1
- package/es/popup-portal/index.d.ts +15 -0
- package/es/popup-portal/type.d.ts +3 -0
- package/es/popup-wrapper/use-popup-wrapper-manager.d.ts +1 -0
- package/es/radio/index.js +1 -1
- package/es/radio-group/index.js +1 -1
- package/es/select/index.css +1 -0
- package/es/select/index.js +2 -2
- package/es/share/hook/use-dark-mode.js +3 -3
- package/es/share/hook/use-polling.d.ts +2 -0
- package/es/share/hook/use-watch-global-css-var.js +2 -2
- package/es/share/style/index.css +5 -0
- package/es/share/util/locale.d.ts +46 -0
- package/es/slider/index.css +3 -0
- package/es/slider/index.js +1 -1
- package/es/switch/index.js +1 -1
- package/es/textarea/index.css +1 -0
- package/es/textarea/index.js +1 -1
- package/package.json +1 -1
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/coverage-final.json +0 -106
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -926
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -210
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RgbaColor } from '../share/type';
|
|
2
|
+
import type { AlertProps } from './type';
|
|
3
|
+
export declare function getBackgroundColor(variant: AlertProps['variant'], type: AlertProps['type'], palette: RgbaColor[] | null): RgbaColor | null;
|
|
4
|
+
export declare function getBorderColor(variant: AlertProps['variant'], type: AlertProps['type'], palette: RgbaColor[] | null): RgbaColor | null;
|
|
5
|
+
export declare const drawBorder: (ctx: CanvasRenderingContext2D, width: number, height: number, center: [number, number][], borderRadius: number[], rad: [number, number][], borderColor: RgbaColor, pixelSize: number) => void;
|
|
6
|
+
export declare const getTextColorWithPalette: (palette: RgbaColor[] | null, type: AlertProps["variant"]) => string | undefined;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AlertProps } from './type';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_28: {}, __VLS_30: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
title?: (props: typeof __VLS_28) => any;
|
|
7
|
+
} & {
|
|
8
|
+
default?: (props: typeof __VLS_30) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<AlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
close: (e: MouseEvent) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
|
|
13
|
+
onClose?: ((e: MouseEvent) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
type: "info" | "success" | "warning" | "error" | "loading" | "normal" | "sakura";
|
|
16
|
+
variant: "primary" | "plain";
|
|
17
|
+
shape: "rect" | "round";
|
|
18
|
+
closable: boolean;
|
|
19
|
+
textAlign: "start" | "center" | "end";
|
|
20
|
+
iconPlacement: "start" | "text-leading";
|
|
21
|
+
showIcon: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { NumberOrPercentage } from '../share/type';
|
|
2
|
+
export type AlertProps = {
|
|
3
|
+
/**
|
|
4
|
+
* @property {NumberOrPercentage | NumberOrPercentage[]} [borderRadius]
|
|
5
|
+
* @version 0.0.4
|
|
6
|
+
*/
|
|
7
|
+
borderRadius?: NumberOrPercentage | NumberOrPercentage[];
|
|
8
|
+
/**
|
|
9
|
+
* @property {'rect' | 'round'} [shape='rect']
|
|
10
|
+
* @version 0.0.4
|
|
11
|
+
*/
|
|
12
|
+
shape?: 'rect' | 'round';
|
|
13
|
+
/**
|
|
14
|
+
* @property {'primary' | 'plain'} [variant='plain']
|
|
15
|
+
* @version 0.0.2
|
|
16
|
+
*/
|
|
17
|
+
variant?: 'primary' | 'plain';
|
|
18
|
+
/**
|
|
19
|
+
* @property {'info' | 'success' | 'warning' | 'error' | 'loading' | 'normal' | 'sakura'} [type='primary']
|
|
20
|
+
* @version 0.0.2
|
|
21
|
+
*/
|
|
22
|
+
type?: 'info' | 'success' | 'warning' | 'error' | 'loading' | 'normal' | 'sakura';
|
|
23
|
+
/**
|
|
24
|
+
* @property {'start' | 'center' | 'end'} [textAlign='start']
|
|
25
|
+
* @version 0.0.2
|
|
26
|
+
*/
|
|
27
|
+
textAlign?: 'start' | 'center' | 'end';
|
|
28
|
+
/**
|
|
29
|
+
* @property {string} [title]
|
|
30
|
+
* @version 0.0.2
|
|
31
|
+
*/
|
|
32
|
+
title?: string;
|
|
33
|
+
/**
|
|
34
|
+
* @property {string} [color]
|
|
35
|
+
* @version 0.0.2
|
|
36
|
+
*/
|
|
37
|
+
color?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @property {boolean} [closable=false]
|
|
40
|
+
* @version 0.0.2
|
|
41
|
+
*/
|
|
42
|
+
closable?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @property {'start' | 'text-leading'} [iconPlacement='text-leading']
|
|
45
|
+
* @version 0.0.2
|
|
46
|
+
*/
|
|
47
|
+
iconPlacement?: 'start' | 'text-leading';
|
|
48
|
+
/**
|
|
49
|
+
* @property {boolean} [showIcon='true']
|
|
50
|
+
* @version 0.0.2
|
|
51
|
+
*/
|
|
52
|
+
showIcon?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* @property {boolean} [pollSizeChange=false]
|
|
55
|
+
* @version 0.0.4
|
|
56
|
+
*/
|
|
57
|
+
pollSizeChange?: boolean;
|
|
58
|
+
};
|
|
59
|
+
export type AlertEvents = {
|
|
60
|
+
/**
|
|
61
|
+
* @event close
|
|
62
|
+
* @version 0.0.4
|
|
63
|
+
* @param {MouseEvent} e
|
|
64
|
+
*/
|
|
65
|
+
close: [e: MouseEvent];
|
|
66
|
+
};
|
|
67
|
+
export type AlertSlots = {
|
|
68
|
+
/**
|
|
69
|
+
* @slot default
|
|
70
|
+
* @version 0.0.4
|
|
71
|
+
*/
|
|
72
|
+
default: {};
|
|
73
|
+
/**
|
|
74
|
+
* @slot title
|
|
75
|
+
* @version 0.0.4
|
|
76
|
+
*/
|
|
77
|
+
title: {};
|
|
78
|
+
/**
|
|
79
|
+
* @slot icon
|
|
80
|
+
* @version 0.0.4
|
|
81
|
+
*/
|
|
82
|
+
icon: {};
|
|
83
|
+
};
|
package/es/aside/index.css
CHANGED
package/es/aside/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var aside_default = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
setup(__props) {
|
|
22
22
|
var _instance$parent;
|
|
23
23
|
const instance = getCurrentInstance();
|
|
24
|
-
const asideCounter = ref((instance === null || instance === void 0 || (_instance$parent = instance.parent) === null || _instance$parent === void 0 ? void 0 : _instance$parent.type.name) === "Container").value ? inject(CONTAINER_PROVIDE) : void 0;
|
|
24
|
+
const asideCounter = ref((instance === null || instance === void 0 || (_instance$parent = instance.parent) === null || _instance$parent === void 0 ? void 0 : _instance$parent.type.name) === "Container").value ? inject(CONTAINER_PROVIDE, void 0) : void 0;
|
|
25
25
|
onMounted(() => {
|
|
26
26
|
if (asideCounter) asideCounter.value += 1;
|
|
27
27
|
});
|
|
@@ -97,8 +97,8 @@ var auto_complete_default = /* @__PURE__ */ defineComponent({
|
|
|
97
97
|
ref(false),
|
|
98
98
|
ref(false)
|
|
99
99
|
];
|
|
100
|
-
const inputGroupProvide = inject(INPUT_GROUP_PROVIDE);
|
|
101
|
-
const formItemProvide = inject(FORM_ITEM_PROVIDE);
|
|
100
|
+
const inputGroupProvide = inject(INPUT_GROUP_PROVIDE, void 0);
|
|
101
|
+
const formItemProvide = inject(FORM_ITEM_PROVIDE, void 0);
|
|
102
102
|
const borderRadiusComputed = createProvideComputed("borderRadius", [innerInputGroup.value && inputGroupProvide, props]);
|
|
103
103
|
const sizeComputed = createProvideComputed("size", () => [
|
|
104
104
|
innerInputGroup.value && inputGroupProvide,
|
package/es/button/index.js
CHANGED
|
@@ -57,10 +57,10 @@ var button_default = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
ref(false),
|
|
58
58
|
ref(false)
|
|
59
59
|
];
|
|
60
|
-
const buttonGroupProvide = inject(BUTTON_GROUP_PROVIDE);
|
|
61
|
-
const inputGroupProvide = inject(INPUT_GROUP_PROVIDE);
|
|
62
|
-
const formProps = inject(FORM_PROVIDE);
|
|
63
|
-
const formItemProvide = inject(FORM_ITEM_PROVIDE);
|
|
60
|
+
const buttonGroupProvide = inject(BUTTON_GROUP_PROVIDE, void 0);
|
|
61
|
+
const inputGroupProvide = inject(INPUT_GROUP_PROVIDE, void 0);
|
|
62
|
+
const formProps = inject(FORM_PROVIDE, void 0);
|
|
63
|
+
const formItemProvide = inject(FORM_ITEM_PROVIDE, void 0);
|
|
64
64
|
const borderRadiusComputed = createProvideComputed("borderRadius", [
|
|
65
65
|
innerButtonGroup.value && buttonGroupProvide,
|
|
66
66
|
innerInputGroup.value && inputGroupProvide,
|
package/es/button-group/index.js
CHANGED
|
@@ -22,8 +22,8 @@ var button_group_default = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
},
|
|
23
23
|
setup(__props) {
|
|
24
24
|
const props = __props;
|
|
25
|
-
const formProvide = inject(FORM_PROVIDE);
|
|
26
|
-
const formItemProvide = inject(FORM_ITEM_PROVIDE);
|
|
25
|
+
const formProvide = inject(FORM_PROVIDE, void 0);
|
|
26
|
+
const formItemProvide = inject(FORM_ITEM_PROVIDE, void 0);
|
|
27
27
|
const sizeComputed = createProvideComputed("size", () => [
|
|
28
28
|
props.size && props,
|
|
29
29
|
formItemProvide,
|
package/es/checkbox/index.js
CHANGED
|
@@ -60,8 +60,8 @@ var checkbox_default = /* @__PURE__ */ defineComponent({
|
|
|
60
60
|
defaultField: "defaultValue",
|
|
61
61
|
transform: (val) => !!val
|
|
62
62
|
});
|
|
63
|
-
const formItemProvide = inject(FORM_ITEM_PROVIDE);
|
|
64
|
-
const checkboxGroupProvide = inject(CHECKBOX_GROUP_PROVIDE);
|
|
63
|
+
const formItemProvide = inject(FORM_ITEM_PROVIDE, void 0);
|
|
64
|
+
const checkboxGroupProvide = inject(CHECKBOX_GROUP_PROVIDE, void 0);
|
|
65
65
|
const sizeComputed = createProvideComputed("size", () => [
|
|
66
66
|
checkboxGroupProvide,
|
|
67
67
|
props.size && props,
|
|
@@ -35,7 +35,7 @@ var checkbox_group_default = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
},
|
|
36
36
|
defaultField: "defaultValue"
|
|
37
37
|
});
|
|
38
|
-
const formItemProvide = inject(FORM_ITEM_PROVIDE);
|
|
38
|
+
const formItemProvide = inject(FORM_ITEM_PROVIDE, void 0);
|
|
39
39
|
const disabledComputed = createProvideComputed("disabled", [formItemProvide, props], "or");
|
|
40
40
|
const readonlyComputed = createProvideComputed("readonly", [formItemProvide, props], "or");
|
|
41
41
|
const getKey = (option) => {
|
package/es/col/index.js
CHANGED
|
@@ -22,7 +22,7 @@ var col_default = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
return props.span[widthType.value] || 24;
|
|
23
23
|
});
|
|
24
24
|
const instance = getCurrentInstance();
|
|
25
|
-
const gutter = ref((instance === null || instance === void 0 || (_instance$parent = instance.parent) === null || _instance$parent === void 0 ? void 0 : _instance$parent.type.name) === "Row").value && inject("px-row-provide") || ref({
|
|
25
|
+
const gutter = ref((instance === null || instance === void 0 || (_instance$parent = instance.parent) === null || _instance$parent === void 0 ? void 0 : _instance$parent.type.name) === "Row").value && inject("px-row-provide", void 0) || ref({
|
|
26
26
|
x: 0,
|
|
27
27
|
y: 0
|
|
28
28
|
});
|
package/es/container/index.css
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { DialogExpose, DialogProps } from './type';
|
|
2
|
+
type __VLS_Props = DialogProps & {
|
|
3
|
+
onBeforeOk?: () => Promise<boolean | void> | boolean | void;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
title?: (props: typeof __VLS_11) => any;
|
|
8
|
+
} & {
|
|
9
|
+
icon?: (props: typeof __VLS_14) => any;
|
|
10
|
+
} & {
|
|
11
|
+
default?: (props: typeof __VLS_17) => any;
|
|
12
|
+
} & {
|
|
13
|
+
footer?: (props: typeof __VLS_20) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, DialogExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
cancel: (event: MouseEvent | KeyboardEvent) => any;
|
|
17
|
+
close: () => any;
|
|
18
|
+
open: () => any;
|
|
19
|
+
"update:visible": (visible: boolean) => any;
|
|
20
|
+
beforeOk: () => any;
|
|
21
|
+
ok: (event: MouseEvent) => any;
|
|
22
|
+
afterOpen: () => any;
|
|
23
|
+
afterClose: () => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onCancel?: ((event: MouseEvent | KeyboardEvent) => any) | undefined;
|
|
26
|
+
onClose?: (() => any) | undefined;
|
|
27
|
+
onOpen?: (() => any) | undefined;
|
|
28
|
+
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
|
+
onBeforeOk?: (() => any) | undefined;
|
|
30
|
+
onOk?: ((event: MouseEvent) => any) | undefined;
|
|
31
|
+
onAfterOpen?: (() => any) | undefined;
|
|
32
|
+
onAfterClose?: (() => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
loading: boolean;
|
|
35
|
+
title: string;
|
|
36
|
+
mask: boolean;
|
|
37
|
+
closable: boolean;
|
|
38
|
+
visible: boolean | null;
|
|
39
|
+
defaultVisible: boolean | null;
|
|
40
|
+
destroyOnHide: boolean;
|
|
41
|
+
maskClosable: boolean;
|
|
42
|
+
escToClose: boolean;
|
|
43
|
+
showCancel: boolean;
|
|
44
|
+
showFooter: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { DialogProps } from './type';
|
|
2
|
+
type __VLS_Props = Omit<DialogProps, 'defaultVisible' | 'root'> & {
|
|
3
|
+
onBeforeOk?: () => Promise<boolean | void> | boolean | void;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_23: {}, __VLS_25: {}, __VLS_32: {}, __VLS_34: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
icon?: (props: typeof __VLS_23) => any;
|
|
8
|
+
} & {
|
|
9
|
+
title?: (props: typeof __VLS_25) => any;
|
|
10
|
+
} & {
|
|
11
|
+
default?: (props: typeof __VLS_32) => any;
|
|
12
|
+
} & {
|
|
13
|
+
footer?: (props: typeof __VLS_34) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
cancel: (event: MouseEvent | KeyboardEvent) => any;
|
|
17
|
+
close: () => any;
|
|
18
|
+
open: () => any;
|
|
19
|
+
"update:visible": (visible: boolean) => any;
|
|
20
|
+
beforeOk: () => any;
|
|
21
|
+
ok: (event: MouseEvent) => any;
|
|
22
|
+
afterOpen: () => any;
|
|
23
|
+
afterClose: () => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onCancel?: ((event: MouseEvent | KeyboardEvent) => any) | undefined;
|
|
26
|
+
onClose?: (() => any) | undefined;
|
|
27
|
+
onOpen?: (() => any) | undefined;
|
|
28
|
+
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
|
+
onBeforeOk?: (() => any) | undefined;
|
|
30
|
+
onOk?: ((event: MouseEvent) => any) | undefined;
|
|
31
|
+
onAfterOpen?: (() => any) | undefined;
|
|
32
|
+
onAfterClose?: (() => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
loading: boolean;
|
|
35
|
+
title: string;
|
|
36
|
+
mask: boolean;
|
|
37
|
+
closable: boolean;
|
|
38
|
+
visible: boolean | null;
|
|
39
|
+
destroyOnHide: boolean;
|
|
40
|
+
maskClosable: boolean;
|
|
41
|
+
escToClose: boolean;
|
|
42
|
+
showCancel: boolean;
|
|
43
|
+
showFooter: boolean;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DialogOptions, DialogReturn, DialogEvents } from './type';
|
|
2
|
+
import type { EmitEvent } from '../share/type';
|
|
3
|
+
import DialogWrapped from './dialog-wrapped.ts';
|
|
4
|
+
declare const _default: typeof DialogWrapped & { [key in DialogOptions["type"] & string]: (options: (Omit<DialogOptions, "type"> & Omit<EmitEvent<DialogEvents>, "update:visible">) | string) => DialogReturn; };
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import type { ButtonEvents, ButtonProps } from '../button/type';
|
|
2
|
+
import type { MaskProps } from '../mask/type';
|
|
3
|
+
import type { EmitEvent, RestAttrs, ValidContent, ValidVNodeContent } from '../share/type';
|
|
4
|
+
export type DialogOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* @property {ValidContent} content
|
|
7
|
+
* @version 0.0.4
|
|
8
|
+
*/
|
|
9
|
+
content: ValidContent;
|
|
10
|
+
/**
|
|
11
|
+
* @property {ValidContent} [title]
|
|
12
|
+
* @version 0.0.4
|
|
13
|
+
*/
|
|
14
|
+
title?: ValidContent;
|
|
15
|
+
/**
|
|
16
|
+
* @property {ValidVNodeContent} [icon]
|
|
17
|
+
* @version 0.0.4
|
|
18
|
+
*/
|
|
19
|
+
icon?: ValidVNodeContent;
|
|
20
|
+
/**
|
|
21
|
+
* @property {ValidVNodeContent} [footer]
|
|
22
|
+
* @version 0.0.4
|
|
23
|
+
*/
|
|
24
|
+
footer?: ValidVNodeContent;
|
|
25
|
+
/**
|
|
26
|
+
* @property {'info' | 'success' | 'warning' | 'error' | 'normal' | 'confirm'} [type='normal']
|
|
27
|
+
* @version 0.0.4
|
|
28
|
+
*/
|
|
29
|
+
type?: 'info' | 'success' | 'warning' | 'error' | 'normal' | 'confirm';
|
|
30
|
+
/**
|
|
31
|
+
* @property {boolean} [closable=true]
|
|
32
|
+
* @version 0.0.4
|
|
33
|
+
*/
|
|
34
|
+
closable?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @property {boolean} [mask=true]
|
|
37
|
+
* @version 0.0.4
|
|
38
|
+
*/
|
|
39
|
+
mask?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @property {boolean} [maskClosable=true]
|
|
42
|
+
* @version 0.0.4
|
|
43
|
+
*/
|
|
44
|
+
maskClosable?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* @property {boolean} [escToClose=true]
|
|
47
|
+
* @version 0.0.4
|
|
48
|
+
*/
|
|
49
|
+
escToClose?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* @property {boolean} [showCancel]
|
|
52
|
+
* @version 0.0.4
|
|
53
|
+
*/
|
|
54
|
+
showCancel?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* @property {string} [okText]
|
|
57
|
+
* @version 0.0.4
|
|
58
|
+
*/
|
|
59
|
+
okText?: string;
|
|
60
|
+
/**
|
|
61
|
+
* @property {string} [cancelText]
|
|
62
|
+
* @version 0.0.4
|
|
63
|
+
*/
|
|
64
|
+
cancelText?: string;
|
|
65
|
+
/**
|
|
66
|
+
* @property {boolean} [showFooter=true]
|
|
67
|
+
* @version 0.0.4
|
|
68
|
+
*/
|
|
69
|
+
showFooter?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* @property {number} [zIndex]
|
|
72
|
+
* @version 0.0.4
|
|
73
|
+
*/
|
|
74
|
+
zIndex?: number;
|
|
75
|
+
/**
|
|
76
|
+
* @property {string | HTMLElement} [root='body']
|
|
77
|
+
* @version 0.0.4
|
|
78
|
+
*/
|
|
79
|
+
root?: string | HTMLElement;
|
|
80
|
+
/**
|
|
81
|
+
* @property {ButtonProps & EmitEvent<ButtonEvents> & RestAttrs} [okButtonProps]
|
|
82
|
+
* @version 0.0.4
|
|
83
|
+
*/
|
|
84
|
+
okButtonProps?: ButtonProps & EmitEvent<ButtonEvents> & RestAttrs;
|
|
85
|
+
/**
|
|
86
|
+
* @property {ButtonProps & EmitEvent<ButtonEvents> & RestAttrs} [cancelButtonProps]
|
|
87
|
+
* @version 0.0.4
|
|
88
|
+
*/
|
|
89
|
+
cancelButtonProps?: ButtonProps & EmitEvent<ButtonEvents> & RestAttrs;
|
|
90
|
+
/**
|
|
91
|
+
* @property {Omit<MaskProps, 'zIndex'>} [maskProps]
|
|
92
|
+
* @version 0.0.4
|
|
93
|
+
*/
|
|
94
|
+
maskProps?: Omit<MaskProps, 'zIndex'>;
|
|
95
|
+
/**
|
|
96
|
+
* @property {RestAttrs} [containerProps]
|
|
97
|
+
* @version 0.0.4
|
|
98
|
+
*/
|
|
99
|
+
containerProps?: RestAttrs;
|
|
100
|
+
/**
|
|
101
|
+
* @property {RestAttrs} [headerProps]
|
|
102
|
+
* @version 0.0.4
|
|
103
|
+
*/
|
|
104
|
+
headerProps?: RestAttrs;
|
|
105
|
+
/**
|
|
106
|
+
* @property {RestAttrs} [bodyProps]
|
|
107
|
+
* @version 0.0.4
|
|
108
|
+
*/
|
|
109
|
+
bodyProps?: RestAttrs;
|
|
110
|
+
/**
|
|
111
|
+
* @property {RestAttrs} [footerProps]
|
|
112
|
+
* @version 0.0.4
|
|
113
|
+
*/
|
|
114
|
+
footerProps?: RestAttrs;
|
|
115
|
+
};
|
|
116
|
+
export type DialogProps = {
|
|
117
|
+
/**
|
|
118
|
+
* @property {boolean | null} [visible]
|
|
119
|
+
* @version 0.0.4
|
|
120
|
+
*/
|
|
121
|
+
visible?: boolean | null;
|
|
122
|
+
/**
|
|
123
|
+
* @property {boolean | null} [visible]
|
|
124
|
+
* @version 0.0.4
|
|
125
|
+
*/
|
|
126
|
+
defaultVisible?: boolean | null;
|
|
127
|
+
/**
|
|
128
|
+
* @property {string} [title='']
|
|
129
|
+
* @version 0.0.4
|
|
130
|
+
*/
|
|
131
|
+
title?: string;
|
|
132
|
+
/**
|
|
133
|
+
* @property {boolean} [closable=true]
|
|
134
|
+
* @version 0.0.4
|
|
135
|
+
*/
|
|
136
|
+
closable?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* @property {boolean} [mask=true]
|
|
139
|
+
* @version 0.0.4
|
|
140
|
+
*/
|
|
141
|
+
mask?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* @property {boolean} [maskClosable=true]
|
|
144
|
+
* @version 0.0.4
|
|
145
|
+
*/
|
|
146
|
+
maskClosable?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* @property {boolean} [escToClose=true]
|
|
149
|
+
* @version 0.0.4
|
|
150
|
+
*/
|
|
151
|
+
escToClose?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* @property {boolean} [showCancel=true]
|
|
154
|
+
* @version 0.0.4
|
|
155
|
+
*/
|
|
156
|
+
showCancel?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* @property {string} [okText]
|
|
159
|
+
* @version 0.0.4
|
|
160
|
+
*/
|
|
161
|
+
okText?: string;
|
|
162
|
+
/**
|
|
163
|
+
* @property {string} [cancelText]
|
|
164
|
+
* @version 0.0.4
|
|
165
|
+
*/
|
|
166
|
+
cancelText?: string;
|
|
167
|
+
/**
|
|
168
|
+
* @property {boolean} [boolean=false]
|
|
169
|
+
* @version 0.0.4
|
|
170
|
+
*/
|
|
171
|
+
loading?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* @property {boolean} [showFooter=true]
|
|
174
|
+
* @version 0.0.4
|
|
175
|
+
*/
|
|
176
|
+
showFooter?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* @property {string | HTMLElement} [root='body']
|
|
179
|
+
* @version 0.0.4
|
|
180
|
+
*/
|
|
181
|
+
root?: string | HTMLElement;
|
|
182
|
+
/**
|
|
183
|
+
* @property {number} [zIndex]
|
|
184
|
+
* @version 0.0.4
|
|
185
|
+
*/
|
|
186
|
+
zIndex?: number;
|
|
187
|
+
/**
|
|
188
|
+
* @property {boolean} [destroyOnHide=false]
|
|
189
|
+
* @version 0.0.4
|
|
190
|
+
*/
|
|
191
|
+
destroyOnHide?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* @property {ButtonProps & EmitEvent<ButtonEvents> & RestAttrs} [okButtonProps]
|
|
194
|
+
* @version 0.0.4
|
|
195
|
+
*/
|
|
196
|
+
okButtonProps?: ButtonProps & EmitEvent<ButtonEvents> & RestAttrs;
|
|
197
|
+
/**
|
|
198
|
+
* @property {ButtonProps & EmitEvent<ButtonEvents> & RestAttrs} [cancelButtonProps]
|
|
199
|
+
* @version 0.0.4
|
|
200
|
+
*/
|
|
201
|
+
cancelButtonProps?: ButtonProps & EmitEvent<ButtonEvents> & RestAttrs;
|
|
202
|
+
/**
|
|
203
|
+
* @property {Omit<MaskProps, 'zIndex'>} [maskProps]
|
|
204
|
+
* @version 0.0.4
|
|
205
|
+
*/
|
|
206
|
+
maskProps?: Omit<MaskProps, 'zIndex'>;
|
|
207
|
+
/**
|
|
208
|
+
* @property {RestAttrs} [containerProps]
|
|
209
|
+
* @version 0.0.4
|
|
210
|
+
*/
|
|
211
|
+
containerProps?: RestAttrs;
|
|
212
|
+
/**
|
|
213
|
+
* @property {RestAttrs} [headerProps]
|
|
214
|
+
* @version 0.0.4
|
|
215
|
+
*/
|
|
216
|
+
headerProps?: RestAttrs;
|
|
217
|
+
/**
|
|
218
|
+
* @property {RestAttrs} [bodyProps]
|
|
219
|
+
* @version 0.0.4
|
|
220
|
+
*/
|
|
221
|
+
bodyProps?: RestAttrs;
|
|
222
|
+
/**
|
|
223
|
+
* @property {RestAttrs} [footerProps]
|
|
224
|
+
* @version 0.0.4
|
|
225
|
+
*/
|
|
226
|
+
footerProps?: RestAttrs;
|
|
227
|
+
};
|
|
228
|
+
export type DialogSlots = {
|
|
229
|
+
/**
|
|
230
|
+
* @slot default
|
|
231
|
+
* @version 0.0.4
|
|
232
|
+
*/
|
|
233
|
+
default: {};
|
|
234
|
+
/**
|
|
235
|
+
* @slot title
|
|
236
|
+
* @version 0.0.4
|
|
237
|
+
*/
|
|
238
|
+
title: {};
|
|
239
|
+
/**
|
|
240
|
+
* @slot icon
|
|
241
|
+
* @version 0.0.4
|
|
242
|
+
*/
|
|
243
|
+
icon: {};
|
|
244
|
+
/**
|
|
245
|
+
* @slot footer
|
|
246
|
+
* @version 0.0.4
|
|
247
|
+
*/
|
|
248
|
+
footer: {};
|
|
249
|
+
};
|
|
250
|
+
export type DialogEvents = {
|
|
251
|
+
/**
|
|
252
|
+
* @event update:visible
|
|
253
|
+
* @version 0.0.4
|
|
254
|
+
*/
|
|
255
|
+
'update:visible': [visible: boolean];
|
|
256
|
+
/**
|
|
257
|
+
* @event beforeOk
|
|
258
|
+
* @version 0.0.4
|
|
259
|
+
*/
|
|
260
|
+
beforeOk: [];
|
|
261
|
+
/**
|
|
262
|
+
* @event ok
|
|
263
|
+
* @param {MouseEvent} event
|
|
264
|
+
* @version 0.0.4
|
|
265
|
+
*/
|
|
266
|
+
ok: [event: MouseEvent];
|
|
267
|
+
/**
|
|
268
|
+
* @event cancel
|
|
269
|
+
* @param {MouseEvent | KeyboardEvent} event
|
|
270
|
+
* @version 0.0.4
|
|
271
|
+
*/
|
|
272
|
+
cancel: [event: MouseEvent | KeyboardEvent];
|
|
273
|
+
/**
|
|
274
|
+
* @event open
|
|
275
|
+
* @version 0.0.4
|
|
276
|
+
*/
|
|
277
|
+
open: [];
|
|
278
|
+
/**
|
|
279
|
+
* @event afterOpen
|
|
280
|
+
* @version 0.0.4
|
|
281
|
+
*/
|
|
282
|
+
afterOpen: [];
|
|
283
|
+
/**
|
|
284
|
+
* @event close
|
|
285
|
+
* @version 0.0.4
|
|
286
|
+
*/
|
|
287
|
+
close: [];
|
|
288
|
+
/**
|
|
289
|
+
* @event afterClose
|
|
290
|
+
* @version 0.0.4
|
|
291
|
+
*/
|
|
292
|
+
afterClose: [];
|
|
293
|
+
};
|
|
294
|
+
export type DialogExpose = {
|
|
295
|
+
/**
|
|
296
|
+
* @property {() => void} close
|
|
297
|
+
* @version 0.0.4
|
|
298
|
+
*/
|
|
299
|
+
close: () => void;
|
|
300
|
+
/**
|
|
301
|
+
* @property {() => void} open
|
|
302
|
+
* @version 0.0.4
|
|
303
|
+
*/
|
|
304
|
+
open: () => void;
|
|
305
|
+
};
|
|
306
|
+
export type DialogReturn = Promise<boolean> & {
|
|
307
|
+
close: () => void;
|
|
308
|
+
};
|
package/es/footer/index.css
CHANGED
package/es/form-item/index.css
CHANGED
package/es/form-item/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var form_item_default = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
},
|
|
53
53
|
setup(__props, { expose: __expose }) {
|
|
54
54
|
const props = __props;
|
|
55
|
-
const formContext = inject(FORM_PROVIDE);
|
|
55
|
+
const formContext = inject(FORM_PROVIDE, void 0);
|
|
56
56
|
if (!formContext) throwError("FormItem must be used inside Form.");
|
|
57
57
|
const disabledComputed = createProvideComputed("disabled", [formContext, props], "or");
|
|
58
58
|
const readonlyComputed = createProvideComputed("readonly", [formContext, props], "or");
|