@done-coding/admin-core 0.21.0 → 0.22.0
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/app-layout/AppLayout.vue.mjs +1 -1
- package/es/components/app-layout/AppLayout.vue2.mjs +51 -6
- package/es/components/app-layout/AppPage.vue.mjs +1 -1
- package/es/components/app-layout/AppPage.vue2.mjs +16 -9
- package/es/components/display/ShadowClone.vue.mjs +32 -0
- package/es/components/display/ShadowClone.vue2.mjs +4 -0
- package/es/components/display/use-shadow-target.mjs +76 -0
- package/es/components/form/FormActiveFilter.vue.mjs +7 -0
- package/es/components/form/FormActiveFilter.vue2.mjs +62 -0
- package/es/components/form/FormInput.vue.mjs +27 -0
- package/es/components/form/FormInput.vue2.mjs +4 -0
- package/es/components/form/FormInputShadowClone.vue.mjs +47 -0
- package/es/components/form/FormInputShadowClone.vue2.mjs +4 -0
- package/es/components/form/FormMain.vue.mjs +1 -1
- package/es/components/form/FormMain.vue2.mjs +5 -25
- package/es/components/form/FormSelectShadowClone.vue.mjs +57 -0
- package/es/components/form/FormSelectShadowClone.vue2.mjs +4 -0
- package/es/components/form/FormShadowCloneDispatch.vue.mjs +7 -0
- package/es/components/form/FormShadowCloneDispatch.vue2.mjs +74 -0
- package/es/components/form/FormSortSwitch.vue.mjs +7 -0
- package/es/components/form/FormSortSwitch.vue2.mjs +188 -0
- package/es/components/form/FormSortSwitchGroup.vue.mjs +7 -0
- package/es/components/form/FormSortSwitchGroup.vue2.mjs +68 -0
- package/es/components/form/FormUpload.vue.mjs +8 -0
- package/es/components/form/FormUpload.vue2.mjs +112 -0
- package/es/components/form/FormUploadAudio.vue.mjs +7 -0
- package/es/components/form/FormUploadAudio.vue2.mjs +88 -0
- package/es/components/form/FormUploadCard.vue.mjs +7 -0
- package/es/components/form/FormUploadCard.vue2.mjs +56 -0
- package/es/components/form/FormUploadFileInfo.vue.mjs +7 -0
- package/es/components/form/FormUploadFileInfo.vue2.mjs +36 -0
- package/es/components/form/FormUploadImage.vue.mjs +7 -0
- package/es/components/form/FormUploadImage.vue2.mjs +77 -0
- package/es/components/form/FormUploadTrigger.vue.mjs +7 -0
- package/es/components/form/FormUploadTrigger.vue2.mjs +34 -0
- package/es/components/form/FormUploadVideo.vue.mjs +7 -0
- package/es/components/form/FormUploadVideo.vue2.mjs +74 -0
- package/es/components/form/use-password-autofill.mjs +34 -0
- package/es/components/form/use-upload-state.mjs +98 -0
- package/es/components/list-layout/ListLayout.vue.mjs +1 -1
- package/es/components/list-layout/ListLayout.vue2.mjs +36 -9
- package/es/components/list-layout/use-active-filter.mjs +133 -0
- package/es/components/modal/ImagePreviewTrigger.vue.mjs +34 -0
- package/es/components/modal/ImagePreviewTrigger.vue2.mjs +4 -0
- package/es/components/modal/ModalImagePreview.vue.mjs +52 -0
- package/es/components/modal/ModalImagePreview.vue2.mjs +4 -0
- package/es/components/modal/ModalPorter.vue.mjs +49 -2
- package/es/components/modal/ModalShelf.vue.mjs +13 -4
- package/es/components/modal/ModalVideoPreview.vue.mjs +8 -0
- package/es/components/modal/ModalVideoPreview.vue2.mjs +93 -0
- package/es/components/modal/VideoPreviewTrigger.vue.mjs +7 -0
- package/es/components/modal/VideoPreviewTrigger.vue2.mjs +96 -0
- package/es/components/modal/modal-global-keys.mjs +11 -0
- package/es/components/modal/modal-global-symbol.mjs +6 -0
- package/es/components/modal/modal-shelf-core.mjs +53 -4
- package/es/components/table/TableEmpty.vue.mjs +36 -0
- package/es/components/table/TableEmpty.vue2.mjs +4 -0
- package/es/components/table/TableMain.vue.mjs +1 -1
- package/es/components/table/TableMain.vue2.mjs +21 -8
- package/es/components/view-layout/ViewLayout.vue.mjs +1 -1
- package/es/components/view-layout/ViewLayout.vue2.mjs +1 -1
- package/es/hooks/menus-dispatch.mjs +8 -3
- package/es/index.mjs +127 -91
- package/es/style.css +412 -33
- package/package.json +2 -2
- package/src/components/app-layout/docs/README-AppLayout.md +48 -0
- package/src/components/app-layout/docs/README-AppPage.md +40 -2
- package/src/components/display/README.md +9 -3
- package/src/components/display/docs/README-ShadowClone.md +75 -0
- package/src/components/form/README.md +15 -2
- package/src/components/form/docs/README-FormActiveFilter.md +57 -0
- package/src/components/form/docs/README-FormInput.md +66 -0
- package/src/components/form/docs/README-FormSelect.md +77 -0
- package/src/components/form/docs/README-FormShadowCloneDispatch.md +65 -0
- package/src/components/form/docs/README-FormSortSwitchGroup.md +131 -0
- package/src/components/form/docs/README-FormUpload.md +108 -0
- package/src/components/form/docs/README-FormUploadAudio.md +80 -0
- package/src/components/form/docs/README-FormUploadImage.md +83 -0
- package/src/components/form/docs/README-FormUploadVideo.md +82 -0
- package/src/components/list-layout/README.md +6 -2
- package/src/components/list-layout/docs/README-ListLayout.md +1 -0
- package/src/components/modal/README.md +7 -2
- package/src/components/modal/docs/README-ImagePreviewTrigger.md +78 -0
- package/src/components/modal/docs/README-ModalImagePreview.md +78 -0
- package/src/components/modal/docs/README-ModalPorter.md +10 -0
- package/src/components/modal/docs/README-ModalShelf.md +11 -2
- package/src/components/modal/docs/README-ModalVideoPreview.md +89 -0
- package/src/components/modal/docs/README-VideoPreviewTrigger.md +91 -0
- package/src/components/table/docs/README-TableMain.md +3 -0
- package/types/components/app-layout/AppLayout.vue.d.ts +31 -1
- package/types/components/app-layout/AppPage.vue.d.ts +7 -2
- package/types/components/app-layout/types.d.ts +25 -0
- package/types/components/display/ShadowClone.vue.d.ts +20 -0
- package/types/components/display/TabsTile.vue.d.ts +2 -2
- package/types/components/display/index.d.ts +8 -1
- package/types/components/display/types.d.ts +7 -0
- package/types/components/display/use-shadow-target.d.ts +9 -0
- package/types/components/form/FormActiveFilter.vue.d.ts +9 -0
- package/types/components/form/FormInput.vue.d.ts +3 -0
- package/types/components/form/FormInputShadowClone.vue.d.ts +7 -0
- package/types/components/form/FormSearch.vue.d.ts +1 -1
- package/types/components/form/FormSelectShadowClone.vue.d.ts +39 -0
- package/types/components/form/FormShadowCloneDispatch.vue.d.ts +44 -0
- package/types/components/form/FormSortSwitch.vue.d.ts +17 -0
- package/types/components/form/FormSortSwitchGroup.vue.d.ts +15 -0
- package/types/components/form/FormUpload.vue.d.ts +57 -0
- package/types/components/form/FormUploadAudio.vue.d.ts +30 -0
- package/types/components/form/FormUploadCard.vue.d.ts +24 -0
- package/types/components/form/FormUploadFileInfo.vue.d.ts +10 -0
- package/types/components/form/FormUploadImage.vue.d.ts +34 -0
- package/types/components/form/FormUploadTrigger.vue.d.ts +11 -0
- package/types/components/form/FormUploadVideo.vue.d.ts +34 -0
- package/types/components/form/index.d.ts +12 -1
- package/types/components/form/types.d.ts +158 -0
- package/types/components/form/use-password-autofill.d.ts +11 -0
- package/types/components/form/use-upload-state.d.ts +29 -0
- package/types/components/list-layout/ListLayout.vue.d.ts +3 -0
- package/types/components/list-layout/types.d.ts +16 -0
- package/types/components/list-layout/use-active-filter.d.ts +27 -0
- package/types/components/modal/ImagePreviewTrigger.vue.d.ts +41 -0
- package/types/components/modal/ModalConfirm.vue.d.ts +1 -1
- package/types/components/modal/ModalImagePreview.vue.d.ts +31 -0
- package/types/components/modal/ModalPorter.vue.d.ts +7 -0
- package/types/components/modal/ModalShelf.vue.d.ts +12 -3
- package/types/components/modal/ModalVideoPreview.vue.d.ts +40 -0
- package/types/components/modal/VideoPreviewTrigger.vue.d.ts +43 -0
- package/types/components/modal/index.d.ts +6 -1
- package/types/components/modal/modal-global-keys.d.ts +25 -0
- package/types/components/modal/modal-global-symbol.d.ts +8 -0
- package/types/components/modal/modal-shelf-core.d.ts +11 -3
- package/types/components/modal/modal-shelf-types.d.ts +50 -0
- package/types/components/table/TableEmpty.vue.d.ts +11 -0
- package/types/components/table/types.d.ts +11 -0
- package/types/components/view-layout/types.d.ts +1 -1
- package/types/injectInfo.json.d.ts +1 -1
- package/types/store/app.d.ts +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UploadFile } from 'element-plus';
|
|
2
|
+
import { FormUploadProps } from './types';
|
|
3
|
+
type __VLS_Props = FormUploadProps;
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue?: string[] | undefined;
|
|
6
|
+
} & __VLS_Props;
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
tip?(_: {}): any;
|
|
12
|
+
file?(_: {
|
|
13
|
+
file: UploadFile;
|
|
14
|
+
index: number;
|
|
15
|
+
remove: () => void;
|
|
16
|
+
}): any;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: any;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
"update:modelValue": (value: string[] | undefined) => any;
|
|
24
|
+
} & {
|
|
25
|
+
uploadSuccess: (payload: {
|
|
26
|
+
file: UploadFile;
|
|
27
|
+
url: string;
|
|
28
|
+
}) => any;
|
|
29
|
+
uploadError: (payload: {
|
|
30
|
+
file: UploadFile;
|
|
31
|
+
error: Error;
|
|
32
|
+
}) => any;
|
|
33
|
+
triggerChangeLink: (value: string[], attachInfo?: unknown) => any;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
35
|
+
"onUpdate:modelValue"?: ((value: string[] | undefined) => any) | undefined;
|
|
36
|
+
onUploadSuccess?: ((payload: {
|
|
37
|
+
file: UploadFile;
|
|
38
|
+
url: string;
|
|
39
|
+
}) => any) | undefined;
|
|
40
|
+
onUploadError?: ((payload: {
|
|
41
|
+
file: UploadFile;
|
|
42
|
+
error: Error;
|
|
43
|
+
}) => any) | undefined;
|
|
44
|
+
onTriggerChangeLink?: ((value: string[], attachInfo?: unknown) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
drag: boolean;
|
|
48
|
+
showProgress: boolean;
|
|
49
|
+
maxCount: number;
|
|
50
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FormUploadProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
tip?(_: {}): any;
|
|
7
|
+
file?(_: {
|
|
8
|
+
file: import('element-plus').UploadFile;
|
|
9
|
+
index: number;
|
|
10
|
+
remove: () => void;
|
|
11
|
+
}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<FormUploadProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FormUploadProps> & Readonly<{}>, {
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
drag: boolean;
|
|
20
|
+
showProgress: boolean;
|
|
21
|
+
maxCount: number;
|
|
22
|
+
accept: string;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UploadFile } from 'element-plus';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 当前文件条目(status/percentage 驱动遮罩与删除显隐) */
|
|
4
|
+
file: UploadFile;
|
|
5
|
+
/** 删除当前项(FormUpload 基座 remove scope) */
|
|
6
|
+
remove: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: {
|
|
11
|
+
default?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UploadFile } from 'element-plus';
|
|
2
|
+
/**
|
|
3
|
+
* 私有:媒体上传列表项信息列(文件名 + 大小/上传进度)——
|
|
4
|
+
* FormUploadVideo / FormUploadAudio 默认 #file 共用。不出桶导出。
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
file: UploadFile;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FormUploadProps } from './types';
|
|
2
|
+
type __VLS_Props = FormUploadProps & {
|
|
3
|
+
listType?: string;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
tip?(_: {}): any;
|
|
10
|
+
file?(_: {
|
|
11
|
+
file: import('element-plus').UploadFile;
|
|
12
|
+
index: number;
|
|
13
|
+
remove: () => void;
|
|
14
|
+
}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: any;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
drag: boolean;
|
|
23
|
+
showProgress: boolean;
|
|
24
|
+
maxCount: number;
|
|
25
|
+
accept: string;
|
|
26
|
+
listType: string;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 触发区文案(text 形态) */
|
|
3
|
+
text?: string;
|
|
4
|
+
/** 卡片形态(picture-card 方形触发区,仅 "+" 图标) */
|
|
5
|
+
card?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8
|
+
text: string;
|
|
9
|
+
card: boolean;
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FormUploadProps } from './types';
|
|
2
|
+
type __VLS_Props = FormUploadProps & {
|
|
3
|
+
listType?: string;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
tip?(_: {}): any;
|
|
10
|
+
file?(_: {
|
|
11
|
+
file: import('element-plus').UploadFile;
|
|
12
|
+
index: number;
|
|
13
|
+
remove: () => void;
|
|
14
|
+
}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: any;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
drag: boolean;
|
|
23
|
+
showProgress: boolean;
|
|
24
|
+
maxCount: number;
|
|
25
|
+
accept: string;
|
|
26
|
+
listType: string;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
import { default as FormActiveFilter } from './FormActiveFilter.vue';
|
|
2
|
+
import { default as FormShadowCloneDispatch } from './FormShadowCloneDispatch.vue';
|
|
3
|
+
import { default as FormInput } from './FormInput.vue';
|
|
4
|
+
import { default as FormInputShadowClone } from './FormInputShadowClone.vue';
|
|
1
5
|
import { default as FormMain } from './FormMain.vue';
|
|
6
|
+
import { default as FormSortSwitch } from './FormSortSwitch.vue';
|
|
7
|
+
import { default as FormSortSwitchGroup } from './FormSortSwitchGroup.vue';
|
|
2
8
|
import { default as FormSelect } from './FormSelect.vue';
|
|
9
|
+
import { default as FormSelectShadowClone } from './FormSelectShadowClone.vue';
|
|
3
10
|
import { default as FormRadioGroup } from './FormRadioGroup.vue';
|
|
4
11
|
import { default as FormTree } from './FormTree.vue';
|
|
12
|
+
import { default as FormUpload } from './FormUpload.vue';
|
|
13
|
+
import { default as FormUploadImage } from './FormUploadImage.vue';
|
|
14
|
+
import { default as FormUploadVideo } from './FormUploadVideo.vue';
|
|
15
|
+
import { default as FormUploadAudio } from './FormUploadAudio.vue';
|
|
5
16
|
import { default as FormSearch } from './FormSearch.vue';
|
|
6
17
|
import { default as FormSubmitBtn } from './FormSubmitBtn.vue';
|
|
7
18
|
import { default as FormSubmitPanel } from './FormSubmitPanel.vue';
|
|
@@ -17,4 +28,4 @@ export * from './nest-form-item';
|
|
|
17
28
|
export * from './use-nest-form-list';
|
|
18
29
|
export * from './nest-form-item-list';
|
|
19
30
|
export * from './use-nest-layout-scale';
|
|
20
|
-
export { FormMain, FormSelect, FormSearch, FormSubmitBtn, FormSubmitPanel, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode, FormItemNestForm, FormItemNestFormList, };
|
|
31
|
+
export { FormActiveFilter, FormShadowCloneDispatch, FormInput, FormInputShadowClone, FormMain, FormSortSwitch, FormSortSwitchGroup, FormSelect, FormSelectShadowClone, FormSearch, FormSubmitBtn, FormSubmitPanel, FormRadioGroup, FormTree, FormUpload, FormUploadImage, FormUploadVideo, FormUploadAudio, FormVerifyImage, FormVerifyCode, FormItemNestForm, FormItemNestFormList, };
|
|
@@ -77,6 +77,12 @@ SV extends PK extends keyof SO ? SO[PK] : PV = PK extends keyof SO ? SO[PK] : PV
|
|
|
77
77
|
parse?: (value: any, parseData: Partial<PO>, originData: ExtractFormStringifyFromObject<PO, SO>) => PV | void;
|
|
78
78
|
/** 表单序列化处理 */
|
|
79
79
|
stringify?: (value: any, stringifyData: Partial<ExtractFormStringifyFromObject<PO, SO>>, originData: PO) => SV | void;
|
|
80
|
+
/**
|
|
81
|
+
* 本表单项 stringify 拆分出的 query 字段名(如 daterange → createdStart/createdEnd)。
|
|
82
|
+
* 视图层(生效条件条等)按**表单项维度**聚合展示 + 移除联动清值的映射桥——
|
|
83
|
+
* 数据层(query 拆分字段)与视图层(表单项)分离的显式声明,缺它拆分字段无法反查归属。
|
|
84
|
+
*/
|
|
85
|
+
splitKeys?: string[];
|
|
80
86
|
/**
|
|
81
87
|
* 是否在初始化数据、解析数据、序列化数据时忽略处理
|
|
82
88
|
*/
|
|
@@ -357,4 +363,156 @@ export type FormSubmitPanelProps<PO extends Record<string, any>, SO extends Reco
|
|
|
357
363
|
*/
|
|
358
364
|
rootClass?: string | string[] | Record<string, boolean>;
|
|
359
365
|
};
|
|
366
|
+
/** FormInput 密码自动填充治理取值
|
|
367
|
+
* ----
|
|
368
|
+
* 实测结论(2026-08-04,Chrome + 已存密码域名):
|
|
369
|
+
* - 加载自动填充主触发 = `<form>` 包裹的「账号+密码」字段对;`autocomplete="off"` 被 Chrome 有意无视
|
|
370
|
+
* - 规范外自定义词条("api-key")实测全程未触发直接填充,最可靠;"new-password" 实测出现过直接填充
|
|
371
|
+
* - number = 时序方案(初始 text 避开加载期探测窗口后恢复 password),实测 3s 在加载填充场景有效
|
|
372
|
+
*/
|
|
373
|
+
export type FormInputPasswordAutoComplete = "api-key" | "new-password" | "off" | number;
|
|
374
|
+
/** FormInput props
|
|
375
|
+
* ----
|
|
376
|
+
* 仅显式声明 type / showPassword / passwordAutoComplete(读密码形态 + 治理),
|
|
377
|
+
* 其余 el-input props / slots 全量经 $attrs 透传(v-model / placeholder / clearable / 插槽等)。
|
|
378
|
+
*/
|
|
379
|
+
export interface FormInputProps {
|
|
380
|
+
/** 透传 el-input 输入框类型(显式声明以判定密码形态) */
|
|
381
|
+
type?: string;
|
|
382
|
+
/** 透传 el-input 显隐切换(显式声明以判定密码形态) */
|
|
383
|
+
showPassword?: boolean;
|
|
384
|
+
/** 密码形态(type=password / show-password)下的浏览器自动填充治理:
|
|
385
|
+
* - 字符串 → 密码输入框 autocomplete 设为此值("api-key" 规范外词条最可靠;"off" 是 el-input
|
|
386
|
+
* 密码形态默认值、Chrome 有意无视不可靠;"new-password" 有过直接填充记录——见类型上方实测结论)
|
|
387
|
+
* - number N → 不设置 autocomplete;透传 el-input 的 type 初始 "text"(无密码语义不触发填充),
|
|
388
|
+
* 延迟 N ms 后恢复 "password"(时序方案;点击填充拦不住,属浏览器正常交互)
|
|
389
|
+
* - 不传 → 不设置 autocomplete(保持 el-input 默认行为) */
|
|
390
|
+
passwordAutoComplete?: FormInputPasswordAutoComplete;
|
|
391
|
+
}
|
|
392
|
+
/** FormInputShadowClone 影分身版 props:完全兼容 FormInput(attrs 全透传)+ 额外影分身参数 +
|
|
393
|
+
* 漏斗高亮判定(实现经内部件 FormShadowCloneDispatch,高亮判定在本组件)。
|
|
394
|
+
* 影分身能力独立成组件而非内嵌原始 FormInput——保持原始薄包装组件的纯粹性(反模式规避) */
|
|
395
|
+
export interface FormInputShadowCloneProps {
|
|
396
|
+
/** v-model(透传 FormInput;本体与分身弹层同源) */
|
|
397
|
+
modelValue?: string | number;
|
|
398
|
+
/** 影分身开关(本体 + 表头漏斗分身双渲染位,点击漏斗 popover 弹输入框,同一 v-model 同源同步) */
|
|
399
|
+
shadowClone?: boolean;
|
|
400
|
+
/** 分身目标容器(表头预埋唯一选择器;`shadowClone` 时生效,未配置不分身) */
|
|
401
|
+
teleportTo?: string | Element;
|
|
402
|
+
/** 分身位字段文字(表头列名;label + 漏斗整块展示、高亮整块——表格 headerRender 只需留 teleportTo 容器) */
|
|
403
|
+
label?: string;
|
|
404
|
+
/** 分身高亮判定方法(非必传),入参 modelValue;默认 = 非 null/undefined/空字符串 → 高亮(label + 漏斗整块) */
|
|
405
|
+
isHighlighted?: (value: unknown) => boolean;
|
|
406
|
+
}
|
|
407
|
+
/** FormSortSwitch 排序规则:字段 + 方向;有序数组的顺序即优先级(左 = 最高) */
|
|
408
|
+
export interface FormSortRule {
|
|
409
|
+
field: string;
|
|
410
|
+
dir: "asc" | "desc";
|
|
411
|
+
}
|
|
412
|
+
/** FormSortSwitch 排序字段选项(业务侧注入,组件不内置业务字段)
|
|
413
|
+
* - `teleportTo`:影分身目标容器(非必传)——shadowClone 开启后本条目分身打到该目标;
|
|
414
|
+
* 未配置的条目不分身(仅本体渲染) */
|
|
415
|
+
export interface FormSortOption {
|
|
416
|
+
field: string;
|
|
417
|
+
label: string;
|
|
418
|
+
teleportTo?: string | Element;
|
|
419
|
+
}
|
|
420
|
+
/** FormSortSwitch 交互模式:
|
|
421
|
+
* - `"cycle"`(默认,对齐主流):点击整块三态循环——未激活 → 升序 → 降序 → 取消
|
|
422
|
+
* (首击升序与 Element Plus / Ant Design 表头排序同构;点击 = `NEXT[当前值]` 查表,
|
|
423
|
+
* 不依赖点击次数——状态可能被影分身另一处/外部改写)
|
|
424
|
+
* - `"dual-arrow"`:上下双三角独立点击(点 ↑ = 升序/再点取消、点 ↓ = 降序/再点取消、
|
|
425
|
+
* 方向互斥切换)——「点一次即确定方向」的显式命令模式
|
|
426
|
+
* 两模式 v-model 协议一致,纯 UI 交互层差异,切换零迁移。 */
|
|
427
|
+
export type FormSortMode = "cycle" | "dual-arrow";
|
|
428
|
+
/** FormSortSwitch v-model 方向值:undefined = 默认无排序(非 null) */
|
|
429
|
+
export type FormSortSwitchModelValue = "asc" | "desc" | undefined;
|
|
430
|
+
/** FormSortSwitch 展示文本模式:
|
|
431
|
+
* - `"state"`(默认):展示状态文字「默认 / 升序 / 降序」——独立作为表单元素(自身即状态展示)
|
|
432
|
+
* - `"label"`:展示字段名(options 的 label)——group 的 item 即此模式(group 显式设置) */
|
|
433
|
+
export type FormSortTextType = "label" | "state";
|
|
434
|
+
/** FormSortSwitch 单字段排序切换器 props(v-model: "asc" | "desc" | undefined,无 key——
|
|
435
|
+
* 不知道自己的字段;作 group 的 item 时 field 映射在 group 组装闭包内。
|
|
436
|
+
* 影分身能力内聚于本组件:独立使用也能分身(shadowClone + teleportTo),
|
|
437
|
+
* group 只是把 option.teleportTo 透传) */
|
|
438
|
+
export interface FormSortSwitchProps {
|
|
439
|
+
/** v-model 方向值(三态:undefined=默认 / asc / desc;默认 undefined 非 null) */
|
|
440
|
+
modelValue?: FormSortSwitchModelValue;
|
|
441
|
+
/** 交互模式(默认 "cycle";"dual-arrow" 双三角独立命令) */
|
|
442
|
+
mode?: FormSortMode;
|
|
443
|
+
/** 展示文本(默认 "state" 状态文字;"label" 字段名) */
|
|
444
|
+
textType?: FormSortTextType;
|
|
445
|
+
/** 字段显示名(仅 textType="label" 时需要) */
|
|
446
|
+
label?: string;
|
|
447
|
+
/** 是否显示优先级序号(group 在 options>1 时传 true) */
|
|
448
|
+
showOrder?: boolean;
|
|
449
|
+
/** 优先级序号值(1-based,showOrder 时显示) */
|
|
450
|
+
order?: number;
|
|
451
|
+
/** 影分身开关(ShadowClone 双渲染位:本体就地 + 分身 teleport 到 teleportTo,同一 v-model 同源同步)。
|
|
452
|
+
* 未配置 teleportTo 时分身无从打起(仅本体渲染) */
|
|
453
|
+
shadowClone?: boolean;
|
|
454
|
+
/** 分身目标容器(CSS 选择器 / DOM 元素;shadowClone 时生效) */
|
|
455
|
+
teleportTo?: string | Element;
|
|
456
|
+
/** 分身位交互模式(独立于本体 mode;默认 "dual-arrow" = 点小箭头升/降序) */
|
|
457
|
+
teleportMode?: FormSortMode;
|
|
458
|
+
}
|
|
459
|
+
/** FormSortSwitchGroup 复合排序组 props(v-model: 有序 FormSortRule[],key 视角在 group;
|
|
460
|
+
* 依赖 FormSortSwitch 组装,自身零内部状态) */
|
|
461
|
+
export interface FormSortSwitchGroupProps {
|
|
462
|
+
/** 排序字段选项集(业务注入;条目可带非必传 teleportTo 影分身目标) */
|
|
463
|
+
options: FormSortOption[];
|
|
464
|
+
/** 本体 item 交互模式(默认 "cycle") */
|
|
465
|
+
mode?: FormSortMode;
|
|
466
|
+
/** 影分身开关:配置了 teleportTo 的条目分身到目标(同 model 同源同步)、未配置的不分身 */
|
|
467
|
+
shadowClone?: boolean;
|
|
468
|
+
/** 分身 item 交互模式(独立于本体;默认 "dual-arrow" = 点小箭头升/降序) */
|
|
469
|
+
teleportMode?: FormSortMode;
|
|
470
|
+
}
|
|
471
|
+
/** FormActiveFilter 生效条件条目:query 字段投影(× 移除事件载荷 = 整个条目)。
|
|
472
|
+
* 展示维度 = 表单配置项(拆分字段经 config.splitKeys 聚合回所属表单项,见 use-active-filter) */
|
|
473
|
+
export interface FormActiveFilterEntry {
|
|
474
|
+
/** query 字段名(单字段条目);聚合条为所属表单项 config.key */
|
|
475
|
+
field: string;
|
|
476
|
+
/** 聚合条的多个 query 字段(拆分字段合成一条时;单字段条目为空) */
|
|
477
|
+
fields?: string[];
|
|
478
|
+
/** 展示 label(表单字段 config.label,无直配 config 用字段名) */
|
|
479
|
+
label: string;
|
|
480
|
+
/** 展示值(枚举类应传 options 匹配后的 label,取不到原值兜底;聚合条为拆分值拼接) */
|
|
481
|
+
displayValue: string;
|
|
482
|
+
}
|
|
483
|
+
/** FormActiveFilter 生效筛选条件条 props(纯 UI——投影逻辑在消费方 hook) */
|
|
484
|
+
export interface FormActiveFilterProps {
|
|
485
|
+
/** 生效条件条目(空数组不渲染) */
|
|
486
|
+
filters: FormActiveFilterEntry[];
|
|
487
|
+
/** 显示「清除全部」按钮(默认 false) */
|
|
488
|
+
allowClear?: boolean;
|
|
489
|
+
}
|
|
490
|
+
/** FormUpload 上传原语 props(媒体三组件 FormUploadImage / FormUploadVideo /
|
|
491
|
+
* FormUploadAudio 继承复用:覆写 accept 默认 + 追加专属 prop) */
|
|
492
|
+
export interface FormUploadProps {
|
|
493
|
+
/** 上传接口注入:入参 File、返回 Promise<URL>(数据职责,不焊后端;[MUST] 必填)。
|
|
494
|
+
* 可选第二参 onProgress(percent) 驱动进度条(0–100;不调则进度条静态)——真实后端
|
|
495
|
+
* 经 XHR upload.onprogress 转发,mock 可分片模拟推进。 */
|
|
496
|
+
uploadFn: (file: File, onProgress?: (percent: number) => void) => Promise<string>;
|
|
497
|
+
/** 表单字段 key——上传期间经 FORM_ITEM_CHANGE_LOADING 拦提交(FormMain 配置化场景传;裸用可不传) */
|
|
498
|
+
loadingKey?: string;
|
|
499
|
+
/**
|
|
500
|
+
* 文件数量上限(默认 1 = 单文件替换语义;>1 = 多文件追加,兼数量上限——业界主流
|
|
501
|
+
* maxCount 即多文件判定)。v-model 恒为 `string[]`(单文件也是数组),配置表单
|
|
502
|
+
* 提交转换经 stringify/parse。
|
|
503
|
+
*/
|
|
504
|
+
maxCount?: number;
|
|
505
|
+
/** 单文件大小上限(单位 MB;超限上传前校验 reject + 提示——EP 无原生 size 限制,本组件拓展) */
|
|
506
|
+
maxSize?: number;
|
|
507
|
+
/** 文件类型过滤(透传 ElUpload) */
|
|
508
|
+
accept?: string;
|
|
509
|
+
/** 拖拽上传(透传 ElUpload) */
|
|
510
|
+
drag?: boolean;
|
|
511
|
+
/** 禁用(透传 ElUpload) */
|
|
512
|
+
disabled?: boolean;
|
|
513
|
+
/** 上传进度条(ElUpload 内置 show-progress) */
|
|
514
|
+
showProgress?: boolean;
|
|
515
|
+
/** 空态提示文字(render 契约字段) */
|
|
516
|
+
placeholder?: string;
|
|
517
|
+
}
|
|
360
518
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormInputPasswordAutoComplete } from './types';
|
|
2
|
+
export interface UsePasswordAutofillProps {
|
|
3
|
+
type?: string;
|
|
4
|
+
showPassword?: boolean;
|
|
5
|
+
passwordAutoComplete?: FormInputPasswordAutoComplete;
|
|
6
|
+
}
|
|
7
|
+
export declare function usePasswordAutofill(props: UsePasswordAutofillProps): {
|
|
8
|
+
inputType: import('vue').ComputedRef<string | undefined>;
|
|
9
|
+
autocompleteOut: import('vue').ComputedRef<"api-key" | "new-password" | "off" | undefined>;
|
|
10
|
+
showPasswordOut: import('vue').ComputedRef<boolean | undefined>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { UploadFile, UploadFiles, UploadRawFile, UploadRequestOptions } from 'element-plus';
|
|
3
|
+
/** useUploadState 入参——组件的响应式接线点(getter 惰性读取,保留响应式) */
|
|
4
|
+
export interface UseUploadStateOptions {
|
|
5
|
+
/** 文件数量上限(惰性读取 props.maxCount):默认 1 = 单文件替换;>1 = 多文件追加兼数量上限 */
|
|
6
|
+
maxCount: () => number;
|
|
7
|
+
/** 单文件大小上限 MB(惰性读取 props.maxSize):超限上传前校验 reject(EP 无原生 size 限制) */
|
|
8
|
+
maxSize: () => number | undefined;
|
|
9
|
+
/** 上传接口注入(惰性读取 props.uploadFn):入参 File、返回 URL;可选 onProgress 驱动进度 */
|
|
10
|
+
uploadFn: () => (file: File, onProgress?: (percent: number) => void) => Promise<string>;
|
|
11
|
+
/** 表单字段 key(惰性读取 props.loadingKey):上传期间拦提交;未传 → no-op */
|
|
12
|
+
loadingKey: () => string | undefined;
|
|
13
|
+
/** 单文件上传成功(URL 已入值) */
|
|
14
|
+
onUploadSuccess: (url: string, file: UploadRawFile) => void;
|
|
15
|
+
/** 单文件上传失败(值不变) */
|
|
16
|
+
onUploadError: (error: unknown, file: UploadRawFile) => void;
|
|
17
|
+
}
|
|
18
|
+
/** useUploadState 返回——FormUpload 内部受控面 */
|
|
19
|
+
export interface UseUploadStateReturn {
|
|
20
|
+
/** ElUpload 受控文件列表(与 modelValue 双向同步) */
|
|
21
|
+
fileList: Ref<UploadFiles>;
|
|
22
|
+
/** 上传在途数(0→1 拦提交 / →0 放行,覆盖并发) */
|
|
23
|
+
uploadingCount: Ref<number>;
|
|
24
|
+
/** ElUpload http-request 内部固定实现:调 uploadFn 拿 URL → URL 入值 → 在途计数对称 */
|
|
25
|
+
handleUpload: (options: UploadRequestOptions) => Promise<string>;
|
|
26
|
+
/** 移除文件 → URL 出值(单文件清空 / 多文件过滤) */
|
|
27
|
+
handleRemove: (file: UploadFile) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare function useUploadState(modelValue: Ref<string[] | undefined>, options: UseUploadStateOptions): UseUploadStateReturn;
|
|
@@ -25,10 +25,13 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
|
|
|
25
25
|
injectInfo?: F | undefined;
|
|
26
26
|
beforeSearch?: ((data: import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>>, type: FormSearchSearchType) => import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>>) | undefined;
|
|
27
27
|
clearTableFilterOnReset?: boolean;
|
|
28
|
+
initialSearch?: boolean;
|
|
28
29
|
separateSearch?: boolean;
|
|
29
30
|
separateSearchConfig?: Pick<import('../slot-layout').SlotLayoutFlowAsideProps, "type" | "gap" | "asideWidth">;
|
|
30
31
|
searchSticky?: boolean;
|
|
31
32
|
toolbarSticky?: boolean;
|
|
33
|
+
formActiveFilter?: boolean;
|
|
34
|
+
allowClear?: boolean;
|
|
32
35
|
pagerSticky?: boolean;
|
|
33
36
|
headerObserveResize?: boolean;
|
|
34
37
|
operationObserveResize?: boolean;
|
|
@@ -34,6 +34,12 @@ F extends Record<string, any>> = Partial<Pick<FormSearchProps<PO, SO, {}>, FormS
|
|
|
34
34
|
beforeSearch?: (data: ExtractFormStringifyFromObject<PO, SO>, type: FormSearchSearchType) => ExtractFormStringifyFromObject<PO, SO>;
|
|
35
35
|
/** 在点击搜索重置按钮时,是否同时调用清空表格表头过滤 */
|
|
36
36
|
clearTableFilterOnReset?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 挂载后是否立即触发初始化查询(默认 true 查)。
|
|
39
|
+
* - false:进入页面不自动拉数——表格空态显示「欢迎触发查询」(TableMain 经 hasRequested
|
|
40
|
+
* 自判),KeepAlive 激活也不自动刷新,用户手动查询后恢复。
|
|
41
|
+
*/
|
|
42
|
+
initialSearch?: boolean;
|
|
37
43
|
/**
|
|
38
44
|
* 搜索是否分离为侧栏。
|
|
39
45
|
* - false(默认):header/搜索/operation 纵向内联在表格上方(与旧版逐像素一致)。
|
|
@@ -58,6 +64,16 @@ F extends Record<string, any>> = Partial<Pick<FormSearchProps<PO, SO, {}>, FormS
|
|
|
58
64
|
* 与 searchSticky 同开(非分离态)时自动叠钉在粘住的搜索区正下方。
|
|
59
65
|
*/
|
|
60
66
|
toolbarSticky?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* 生效筛选条件条(Active Filter Bar):表单卡片顶部一行显示当前已生效查询条件
|
|
69
|
+
* (query 投影,≠ 表单输入值),每条件 × 移除(同步清表单值防「删了又加回来」)。
|
|
70
|
+
* 默认 false 不渲染——存量页面 0 影响。业界对标 SAP Fiori Filter Feedback Bar。
|
|
71
|
+
*/
|
|
72
|
+
formActiveFilter?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 允许一键清空生效条件(仅 formActiveFilter 开启时有意义;默认 false 不展示「清除全部」)。
|
|
75
|
+
*/
|
|
76
|
+
allowClear?: boolean;
|
|
61
77
|
/**
|
|
62
78
|
* 表格分页器粘性:容器/页面滚动时 TableMain 的分页器钉在滚动视口底部
|
|
63
79
|
* (默认 false 不开启)。与 separateSearch 无关——分离与否表格都在主滚动流里。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FormActiveFilterEntry, FormItemConfigList } from '../form';
|
|
2
|
+
/** 条件条单条(= FormActiveFilterEntry + 直配 config key,供表单值同步清除) */
|
|
3
|
+
export interface ActiveFilterEntry extends FormActiveFilterEntry {
|
|
4
|
+
/** 所属 config key(可同步清表单值时;直配字段与聚合条都有,纯拆分无归属时 undefined) */
|
|
5
|
+
configKey?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface UseActiveFilterOptions {
|
|
8
|
+
/** 开关 getter(ListLayout formActiveFilter prop);false 时全短路零副作用 */
|
|
9
|
+
enabled: () => boolean;
|
|
10
|
+
/** 已生效条件投影(ListLayout query ref) */
|
|
11
|
+
query: {
|
|
12
|
+
value: Record<string, any>;
|
|
13
|
+
};
|
|
14
|
+
/** 表单字段 config(value→label 与表单值清除的依据) */
|
|
15
|
+
list: FormItemConfigList;
|
|
16
|
+
/** 表单数据模型(FormMain 同范式:外部持有响应式对象,直改属性即联动表单) */
|
|
17
|
+
formData: {
|
|
18
|
+
value: Record<string, any>;
|
|
19
|
+
};
|
|
20
|
+
/** 重查(query 变更后触发表格 reload) */
|
|
21
|
+
reload: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function useActiveFilter(options: UseActiveFilterOptions): {
|
|
24
|
+
activeFilters: import('vue').ComputedRef<ActiveFilterEntry[]>;
|
|
25
|
+
remove: (entry: ActiveFilterEntry) => void;
|
|
26
|
+
clearAll: () => void;
|
|
27
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImagePreviewTrigger —— 图片预览触发原语(ElImage 落地 + 懒加载 + 占位兜底)。
|
|
3
|
+
* 点击直达:preview 开启时绑定 preview-src-list(= [previewSrc ?? src])+
|
|
4
|
+
* preview-teleported——el-image-viewer 原生全屏放大,不经弹窗(两层嵌套已废弃);
|
|
5
|
+
* 命令式开图走 ModalImagePreview(ElImageViewer 薄适配),两入口各司其职。
|
|
6
|
+
* $attrs 只落自身 ElImage(alt / fit / loading 等;width/height 无效——EP 2.13
|
|
7
|
+
* ElImage 未声明该 props,透传落根 div attribute 无渲染效果,尺寸走外层
|
|
8
|
+
* CSS / style + fit="cover")。
|
|
9
|
+
* 详见 docs/README-ImagePreviewTrigger.md。
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
/** 缩略图路径(ElImage.src) */
|
|
13
|
+
src: string;
|
|
14
|
+
/** 原图路径(点击放大打开的大图);缺省降级为 src */
|
|
15
|
+
previewSrc?: string;
|
|
16
|
+
/** 图片懒加载(ElImage.lazy,原生 loading 优先) */
|
|
17
|
+
lazy?: boolean;
|
|
18
|
+
/** 是否可点击放大(false = 纯展示缩略图,仍保留懒加载 + 占位兜底) */
|
|
19
|
+
preview?: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare function __VLS_template(): {
|
|
22
|
+
attrs: Partial<{}>;
|
|
23
|
+
slots: {
|
|
24
|
+
placeholder?(_: {}): any;
|
|
25
|
+
error?(_: {}): any;
|
|
26
|
+
};
|
|
27
|
+
refs: {};
|
|
28
|
+
rootEl: any;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
31
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
32
|
+
lazy: boolean;
|
|
33
|
+
preview: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -78,7 +78,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
78
78
|
}>, {
|
|
79
79
|
reverse: boolean;
|
|
80
80
|
width: number | string;
|
|
81
|
-
type: "" | "
|
|
81
|
+
type: "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger";
|
|
82
82
|
direction: "rtl" | "ltr" | "ttb" | "btt";
|
|
83
83
|
showClose: boolean;
|
|
84
84
|
cancelText: string | (() => VNode);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModalImagePreview —— 图片预览弹窗·命令式入口(ElImageViewer 薄适配)。
|
|
3
|
+
* 注册形态(ModalShelf/Porter):架子渲染只传 show/payload/closeFn/removeFn——
|
|
4
|
+
* payload/closeFn/removeFn 显式声明(不泄漏进 $attrs 落 viewer DOM),
|
|
5
|
+
* 业务值双输入源:`src` = `props.src ?? payload.src`(一行合并)。
|
|
6
|
+
* 多图经 $attrs 的 `url-list` 显式覆盖(透传面),否则单图 = [src]。
|
|
7
|
+
* 详见 docs/README-ModalImagePreview.md。
|
|
8
|
+
*/
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
/** 图片地址(双输入源:props.src ?? payload.src);单图 = url-list [src] */
|
|
11
|
+
src: string;
|
|
12
|
+
/** 注册形态注入(ModalShelf/Porter 渲染只传 payload;原语用法无需传) */
|
|
13
|
+
payload?: {
|
|
14
|
+
src?: string;
|
|
15
|
+
};
|
|
16
|
+
/** 注册形态注入的关闭出口(本组件不消费,仅声明避免泄漏进 $attrs) */
|
|
17
|
+
closeFn?: () => void;
|
|
18
|
+
/** 注册形态注入的移除出口(同上) */
|
|
19
|
+
removeFn?: () => void;
|
|
20
|
+
/** 关闭回调(ElImageViewer @close 触发) */
|
|
21
|
+
onClose?: (status?: boolean) => void;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_PublicProps = {
|
|
24
|
+
"show": boolean;
|
|
25
|
+
} & __VLS_Props;
|
|
26
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
27
|
+
"update:show": (value: boolean) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
export default _default;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { EvokeHandle, ModalShelfMap, RegisterEntry } from './modal-shelf-types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
modalList: RegisterEntry[];
|
|
4
|
+
/**
|
|
5
|
+
* 专用模式标识(core 内部):=== `APP_GLOBAL_MODAL_PORTER_SYMBOL` 时本 Porter 为
|
|
6
|
+
* AppLayout 内部全局弹窗专用——只接受 shelf:"app" 条目,非 app 条目 console.error +
|
|
7
|
+
* 过滤;配置经架子 `registerConfig` 推送(挂载进 globalModalRemote)。外部拿不到
|
|
8
|
+
* Symbol 即无法误用。[MUST NOT] 业务侧传入。
|
|
9
|
+
*/
|
|
10
|
+
globalOnly?: symbol;
|
|
4
11
|
};
|
|
5
12
|
declare function evoke<K extends keyof ModalShelfMap>(key: K, payload: ModalShelfMap[K]): EvokeHandle | null;
|
|
6
13
|
declare function __VLS_template(): {
|