@silver-formily/element-plus 0.0.1-alpha.0 → 0.0.1-alpha.1
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/package.json +1 -1
- package/esm/__builtins__/configs/index.d.ts +0 -1
- package/esm/__builtins__/configs/index.mjs +0 -5
- package/esm/__builtins__/configs/index.mjs.map +0 -1
- package/esm/__builtins__/index.d.ts +0 -2
- package/esm/__builtins__/index.mjs +0 -27
- package/esm/__builtins__/index.mjs.map +0 -1
- package/esm/__builtins__/shared/hooks.d.ts +0 -7
- package/esm/__builtins__/shared/hooks.mjs +0 -59
- package/esm/__builtins__/shared/hooks.mjs.map +0 -1
- package/esm/__builtins__/shared/index.d.ts +0 -7
- package/esm/__builtins__/shared/index.mjs +0 -25
- package/esm/__builtins__/shared/index.mjs.map +0 -1
- package/esm/__builtins__/shared/load-config-provider.d.ts +0 -2
- package/esm/__builtins__/shared/load-config-provider.mjs +0 -13
- package/esm/__builtins__/shared/load-config-provider.mjs.map +0 -1
- package/esm/__builtins__/shared/loading.d.ts +0 -12
- package/esm/__builtins__/shared/loading.mjs +0 -49
- package/esm/__builtins__/shared/loading.mjs.map +0 -1
- package/esm/__builtins__/shared/simple-version-compare.d.ts +0 -2
- package/esm/__builtins__/shared/simple-version-compare.mjs +0 -18
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +0 -1
- package/esm/__builtins__/shared/transform-component.d.ts +0 -8
- package/esm/__builtins__/shared/transform-component.mjs +0 -50
- package/esm/__builtins__/shared/transform-component.mjs.map +0 -1
- package/esm/__builtins__/shared/types.d.ts +0 -2
- package/esm/__builtins__/shared/types.mjs +0 -2
- package/esm/__builtins__/shared/types.mjs.map +0 -1
- package/esm/__builtins__/shared/utils.d.ts +0 -8
- package/esm/__builtins__/shared/utils.mjs +0 -34
- package/esm/__builtins__/shared/utils.mjs.map +0 -1
- package/esm/array-base/array-base-addition.d.ts +0 -5
- package/esm/array-base/array-base-index.d.ts +0 -19
- package/esm/array-base/array-base-inner.d.ts +0 -18
- package/esm/array-base/array-base-item.d.ts +0 -18
- package/esm/array-base/array-base-move-down.d.ts +0 -18
- package/esm/array-base/array-base-move-up.d.ts +0 -18
- package/esm/array-base/array-base-remove.d.ts +0 -18
- package/esm/array-base/array-base-sort-handle.d.ts +0 -2
- package/esm/array-base/index.d.ts +0 -114
- package/esm/array-base/index.mjs +0 -225
- package/esm/array-base/index.mjs.map +0 -1
- package/esm/array-base/symbols.d.ts +0 -4
- package/esm/array-base/symbols.mjs +0 -6
- package/esm/array-base/symbols.mjs.map +0 -1
- package/esm/array-base/types.d.ts +0 -28
- package/esm/array-base/types.mjs +0 -2
- package/esm/array-base/types.mjs.map +0 -1
- package/esm/array-base/utils.d.ts +0 -18
- package/esm/array-base/utils.mjs +0 -88
- package/esm/array-base/utils.mjs.map +0 -1
- package/esm/array-cards/array-cards.d.ts +0 -13
- package/esm/array-cards/index.d.ts +0 -122
- package/esm/array-cards/index.mjs +0 -119
- package/esm/array-cards/index.mjs.map +0 -1
- package/esm/array-collapse/array-collapse-item.d.ts +0 -18
- package/esm/array-collapse/array-collapse.d.ts +0 -16
- package/esm/array-collapse/index.d.ts +0 -134
- package/esm/array-collapse/index.mjs +0 -180
- package/esm/array-collapse/index.mjs.map +0 -1
- package/esm/array-collapse/utils.d.ts +0 -1
- package/esm/array-collapse/utils.mjs +0 -12
- package/esm/array-collapse/utils.mjs.map +0 -1
- package/esm/array-items/array-items-item.d.ts +0 -30
- package/esm/array-items/array-items.d.ts +0 -2
- package/esm/array-items/index.d.ts +0 -130
- package/esm/array-items/index.mjs +0 -105
- package/esm/array-items/index.mjs.map +0 -1
- package/esm/array-list-tabs/array-list-tabs.d.ts +0 -31
- package/esm/array-list-tabs/index.d.ts +0 -83
- package/esm/array-list-tabs/index.mjs +0 -183
- package/esm/array-list-tabs/index.mjs.map +0 -1
- package/esm/array-list-tabs/utils.d.ts +0 -3
- package/esm/array-list-tabs/utils.mjs +0 -16
- package/esm/array-list-tabs/utils.mjs.map +0 -1
- package/esm/array-table/index.mjs +0 -230
- package/esm/array-table/index.mjs.map +0 -1
- package/esm/array-table/types.d.ts +0 -6
- package/esm/array-table/types.mjs +0 -2
- package/esm/array-table/types.mjs.map +0 -1
- package/esm/array-table/utils.d.ts +0 -5
- package/esm/array-table/utils.mjs +0 -26
- package/esm/array-table/utils.mjs.map +0 -1
- package/esm/array-tabs/array-tabs.d.ts +0 -2
- package/esm/array-tabs/index.d.ts +0 -2
- package/esm/array-tabs/index.mjs +0 -88
- package/esm/array-tabs/index.mjs.map +0 -1
- package/esm/cascader/cascader.d.ts +0 -30
- package/esm/cascader/index.d.ts +0 -41
- package/esm/cascader/index.mjs +0 -54
- package/esm/cascader/index.mjs.map +0 -1
- package/esm/checkbox/checkbox-group.d.ts +0 -58
- package/esm/checkbox/index.d.ts +0 -716
- package/esm/checkbox/index.mjs +0 -86
- package/esm/checkbox/index.mjs.map +0 -1
- package/esm/date-picker/index.d.ts +0 -2
- package/esm/date-picker/index.mjs +0 -57
- package/esm/date-picker/index.mjs.map +0 -1
- package/esm/editable/editable-popover.d.ts +0 -25
- package/esm/editable/editable.d.ts +0 -187
- package/esm/editable/index.d.ts +0 -147
- package/esm/editable/index.mjs +0 -231
- package/esm/editable/index.mjs.map +0 -1
- package/esm/form/form.d.ts +0 -46
- package/esm/form/form.mjs +0 -77
- package/esm/form/form.mjs.map +0 -1
- package/esm/form/index.d.ts +0 -1
- package/esm/form/index.mjs +0 -6
- package/esm/form/index.mjs.map +0 -1
- package/esm/form-button-group/form-button-group-sticky.d.ts +0 -17
- package/esm/form-button-group/form-button-group.d.ts +0 -48
- package/esm/form-button-group/index.d.ts +0 -87
- package/esm/form-button-group/index.mjs +0 -90
- package/esm/form-button-group/index.mjs.map +0 -1
- package/esm/form-button-group/utils.d.ts +0 -1
- package/esm/form-button-group/utils.mjs +0 -12
- package/esm/form-button-group/utils.mjs.map +0 -1
- package/esm/form-collapse/form-collapse.d.ts +0 -18
- package/esm/form-collapse/index.d.ts +0 -45
- package/esm/form-collapse/index.mjs +0 -103
- package/esm/form-collapse/index.mjs.map +0 -1
- package/esm/form-collapse/utils.d.ts +0 -31
- package/esm/form-collapse/utils.mjs +0 -54
- package/esm/form-collapse/utils.mjs.map +0 -1
- package/esm/form-dialog/dialog-content.d.ts +0 -60
- package/esm/form-dialog/index.d.ts +0 -4
- package/esm/form-dialog/index.mjs +0 -209
- package/esm/form-dialog/index.mjs.map +0 -1
- package/esm/form-dialog/types.d.ts +0 -32
- package/esm/form-dialog/types.mjs +0 -2
- package/esm/form-dialog/types.mjs.map +0 -1
- package/esm/form-drawer/drawer-content.d.ts +0 -60
- package/esm/form-drawer/index.d.ts +0 -4
- package/esm/form-drawer/index.mjs +0 -203
- package/esm/form-drawer/index.mjs.map +0 -1
- package/esm/form-drawer/types.d.ts +0 -32
- package/esm/form-drawer/types.mjs +0 -2
- package/esm/form-drawer/types.mjs.map +0 -1
- package/esm/form-grid/form-grid-column.d.ts +0 -29
- package/esm/form-grid/form-grid.d.ts +0 -101
- package/esm/form-grid/hooks.d.ts +0 -4
- package/esm/form-grid/hooks.mjs +0 -7
- package/esm/form-grid/hooks.mjs.map +0 -1
- package/esm/form-grid/index.d.ts +0 -182
- package/esm/form-grid/index.mjs +0 -106
- package/esm/form-grid/index.mjs.map +0 -1
- package/esm/form-item/form-item.d.ts +0 -18
- package/esm/form-item/index.d.ts +0 -70
- package/esm/form-item/index.mjs +0 -346
- package/esm/form-item/index.mjs.map +0 -1
- package/esm/form-item/types.d.ts +0 -25
- package/esm/form-item/types.mjs +0 -2
- package/esm/form-item/types.mjs.map +0 -1
- package/esm/form-item/utils.d.ts +0 -3
- package/esm/form-item/utils.mjs +0 -18
- package/esm/form-item/utils.mjs.map +0 -1
- package/esm/form-layout/form-layout.d.ts +0 -32
- package/esm/form-layout/form-layout.mjs +0 -86
- package/esm/form-layout/form-layout.mjs.map +0 -1
- package/esm/form-layout/index.d.ts +0 -1
- package/esm/form-layout/index.mjs +0 -6
- package/esm/form-layout/index.mjs.map +0 -1
- package/esm/form-layout/types.d.ts +0 -43
- package/esm/form-layout/types.mjs +0 -2
- package/esm/form-layout/types.mjs.map +0 -1
- package/esm/form-layout/utils.d.ts +0 -57
- package/esm/form-layout/utils.mjs +0 -109
- package/esm/form-layout/utils.mjs.map +0 -1
- package/esm/form-step/form-step-pane.d.ts +0 -2
- package/esm/form-step/form-step.d.ts +0 -5
- package/esm/form-step/index.d.ts +0 -24
- package/esm/form-step/index.mjs +0 -96
- package/esm/form-step/index.mjs.map +0 -1
- package/esm/form-step/types.d.ts +0 -21
- package/esm/form-step/types.mjs +0 -2
- package/esm/form-step/types.mjs.map +0 -1
- package/esm/form-step/utils.d.ts +0 -11
- package/esm/form-step/utils.mjs +0 -66
- package/esm/form-step/utils.mjs.map +0 -1
- package/esm/form-tab/form-tab.d.ts +0 -7
- package/esm/form-tab/hooks.d.ts +0 -7
- package/esm/form-tab/hooks.mjs +0 -32
- package/esm/form-tab/hooks.mjs.map +0 -1
- package/esm/form-tab/index.d.ts +0 -28
- package/esm/form-tab/index.mjs +0 -80
- package/esm/form-tab/index.mjs.map +0 -1
- package/esm/form-tab/types.d.ts +0 -12
- package/esm/form-tab/types.mjs +0 -2
- package/esm/form-tab/types.mjs.map +0 -1
- package/esm/form-tab/utils.d.ts +0 -4
- package/esm/form-tab/utils.mjs +0 -14
- package/esm/form-tab/utils.mjs.map +0 -1
- package/esm/index.d.ts +0 -37
- package/esm/index.mjs +0 -81
- package/esm/index.mjs.map +0 -1
- package/esm/input/index.d.ts +0 -84
- package/esm/input/index.mjs +0 -77
- package/esm/input/index.mjs.map +0 -1
- package/esm/input/input.d.ts +0 -32
- package/esm/input-number/index.d.ts +0 -4
- package/esm/input-number/index.mjs +0 -30
- package/esm/input-number/index.mjs.map +0 -1
- package/esm/pagination/components/jumper.d.ts +0 -16
- package/esm/pagination/components/jumper.mjs +0 -12
- package/esm/pagination/components/jumper.mjs.map +0 -1
- package/esm/pagination/components/next.d.ts +0 -42
- package/esm/pagination/components/next.mjs +0 -23
- package/esm/pagination/components/next.mjs.map +0 -1
- package/esm/pagination/components/pager.d.ts +0 -42
- package/esm/pagination/components/pager.mjs +0 -23
- package/esm/pagination/components/pager.mjs.map +0 -1
- package/esm/pagination/components/prev.d.ts +0 -39
- package/esm/pagination/components/prev.mjs +0 -22
- package/esm/pagination/components/prev.mjs.map +0 -1
- package/esm/pagination/components/sizes.d.ts +0 -56
- package/esm/pagination/components/sizes.mjs +0 -7
- package/esm/pagination/components/sizes.mjs.map +0 -1
- package/esm/pagination/components/total.d.ts +0 -8
- package/esm/pagination/components/total.mjs +0 -11
- package/esm/pagination/components/total.mjs.map +0 -1
- package/esm/pagination/pagination.d.ts +0 -128
- package/esm/pagination/pagination.mjs +0 -631
- package/esm/pagination/pagination.mjs.map +0 -1
- package/esm/password/index.d.ts +0 -86
- package/esm/password/index.mjs +0 -14
- package/esm/password/index.mjs.map +0 -1
- package/esm/preview-text/cascader.d.ts +0 -5
- package/esm/preview-text/date-picker.d.ts +0 -5
- package/esm/preview-text/index.d.ts +0 -102
- package/esm/preview-text/index.mjs +0 -321
- package/esm/preview-text/index.mjs.map +0 -1
- package/esm/preview-text/input.d.ts +0 -28
- package/esm/preview-text/preview.d.ts +0 -18
- package/esm/preview-text/select.d.ts +0 -5
- package/esm/preview-text/time-picker.d.ts +0 -5
- package/esm/preview-text/tree.d.ts +0 -22
- package/esm/preview-text/utils.d.ts +0 -14
- package/esm/preview-text/utils.mjs +0 -16
- package/esm/preview-text/utils.mjs.map +0 -1
- package/esm/radio/index.d.ts +0 -634
- package/esm/radio/index.mjs +0 -80
- package/esm/radio/index.mjs.map +0 -1
- package/esm/radio/radio-group.d.ts +0 -44
- package/esm/reset/index.d.ts +0 -63
- package/esm/reset/index.mjs +0 -48
- package/esm/reset/index.mjs.map +0 -1
- package/esm/reset/reset.d.ts +0 -45
- package/esm/select/index.d.ts +0 -142
- package/esm/select/index.mjs +0 -132
- package/esm/select/index.mjs.map +0 -1
- package/esm/select/select.d.ts +0 -50
- package/esm/select-table/index.mjs +0 -204
- package/esm/select-table/index.mjs.map +0 -1
- package/esm/select-table/types.d.ts +0 -14
- package/esm/select-table/types.mjs +0 -2
- package/esm/select-table/types.mjs.map +0 -1
- package/esm/space/index.d.ts +0 -1
- package/esm/space/index.mjs +0 -6
- package/esm/space/index.mjs.map +0 -1
- package/esm/styles/array-base/index.css +0 -1
- package/esm/styles/array-cards/index.css +0 -1
- package/esm/styles/array-collapse/index.css +0 -1
- package/esm/styles/array-items/index.css +0 -1
- package/esm/styles/array-list-tabs/index.css +0 -1
- package/esm/styles/array-table/index.css +0 -1
- package/esm/styles/array-tabs/index.css +0 -1
- package/esm/styles/editable/index.css +0 -1
- package/esm/styles/form-button-group/index.css +0 -1
- package/esm/styles/form-collapse/index.css +0 -1
- package/esm/styles/form-grid/index.css +0 -1
- package/esm/styles/form-item/index.css +0 -1
- package/esm/styles/form-tab/index.css +0 -1
- package/esm/styles/preview-text/index.css +0 -1
- package/esm/styles/radio/index.css +0 -1
- package/esm/styles/select-table/index.css +0 -1
- package/esm/submit/index.d.ts +0 -48
- package/esm/submit/index.mjs +0 -47
- package/esm/submit/index.mjs.map +0 -1
- package/esm/submit/submit.d.ts +0 -36
- package/esm/switch/index.d.ts +0 -4
- package/esm/switch/index.mjs +0 -19
- package/esm/switch/index.mjs.map +0 -1
- package/esm/time-picker/index.d.ts +0 -4
- package/esm/time-picker/index.mjs +0 -21
- package/esm/time-picker/index.mjs.map +0 -1
- package/esm/time-select/index.d.ts +0 -2
- package/esm/time-select/index.mjs +0 -21
- package/esm/time-select/index.mjs.map +0 -1
- package/esm/transfer/index.d.ts +0 -1509
- package/esm/transfer/index.mjs +0 -11
- package/esm/transfer/index.mjs.map +0 -1
- package/esm/tree/index.d.ts +0 -42
- package/esm/tree/index.mjs +0 -105
- package/esm/tree/index.mjs.map +0 -1
- package/esm/tree/tree.d.ts +0 -20
- package/esm/tree/types.d.ts +0 -13
- package/esm/tree/types.mjs +0 -2
- package/esm/tree/types.mjs.map +0 -1
- package/esm/tree/utils.d.ts +0 -45
- package/esm/tree/utils.mjs +0 -161
- package/esm/tree/utils.mjs.map +0 -1
- package/esm/tree-select/index.d.ts +0 -32
- package/esm/tree-select/index.mjs +0 -51
- package/esm/tree-select/index.mjs.map +0 -1
- package/esm/tree-select/tree-select.d.ts +0 -17
- package/esm/upload/index.d.ts +0 -889
- package/esm/upload/index.mjs +0 -185
- package/esm/upload/index.mjs.map +0 -1
- package/esm/upload/upload.d.ts +0 -1613
- package/esm/vendor/icon.mjs +0 -11
- package/esm/vendor/icon.mjs.map +0 -1
- package/esm/vendor/lodash.mjs +0 -1400
- package/esm/vendor/lodash.mjs.map +0 -1
- package/esm/vendor/runtime.mjs +0 -29
- package/esm/vendor/runtime.mjs.map +0 -1
- package/esm/vendor/shared.esm-bundler.mjs +0 -14
- package/esm/vendor/shared.esm-bundler.mjs.map +0 -1
- package/esm/vendor/sizes.mjs +0 -27
- package/esm/vendor/sizes.mjs.map +0 -1
- package/esm/vendor/types.mjs +0 -19
- package/esm/vendor/types.mjs.map +0 -1
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Form } from '@formily/core';
|
|
2
|
-
import { PropType } from 'vue';
|
|
3
|
-
import { FormDrawerSlots, IFormDrawerProps } from './types';
|
|
4
|
-
declare function __VLS_template(): {
|
|
5
|
-
attrs: Partial<{}>;
|
|
6
|
-
slots: Readonly<FormDrawerSlots> & FormDrawerSlots;
|
|
7
|
-
refs: {};
|
|
8
|
-
rootEl: any;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
12
|
-
drawerProps: {
|
|
13
|
-
type: PropType<IFormDrawerProps>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
visible: {
|
|
17
|
-
type: BooleanConstructor;
|
|
18
|
-
required: true;
|
|
19
|
-
};
|
|
20
|
-
form: {
|
|
21
|
-
type: PropType<Form>;
|
|
22
|
-
required: true;
|
|
23
|
-
};
|
|
24
|
-
resolve: {
|
|
25
|
-
type: PropType<(type?: string) => void>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
reject: {
|
|
29
|
-
type: PropType<() => void>;
|
|
30
|
-
required: true;
|
|
31
|
-
};
|
|
32
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
33
|
-
drawerProps: {
|
|
34
|
-
type: PropType<IFormDrawerProps>;
|
|
35
|
-
required: true;
|
|
36
|
-
};
|
|
37
|
-
visible: {
|
|
38
|
-
type: BooleanConstructor;
|
|
39
|
-
required: true;
|
|
40
|
-
};
|
|
41
|
-
form: {
|
|
42
|
-
type: PropType<Form>;
|
|
43
|
-
required: true;
|
|
44
|
-
};
|
|
45
|
-
resolve: {
|
|
46
|
-
type: PropType<(type?: string) => void>;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
reject: {
|
|
50
|
-
type: PropType<() => void>;
|
|
51
|
-
required: true;
|
|
52
|
-
};
|
|
53
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
54
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
55
|
-
export default _default;
|
|
56
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
57
|
-
new (): {
|
|
58
|
-
$slots: S;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
import { FormDrawerSlotContent, IFormDrawer, IFormDrawerProps } from './types';
|
|
3
|
-
export declare function FormDrawer(title: IFormDrawerProps | string, content?: Component | FormDrawerSlotContent, dynamicMiddlewareNames?: string[]): IFormDrawer;
|
|
4
|
-
export default FormDrawer;
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { createForm as T } from "@formily/core";
|
|
2
|
-
import { toJS as V } from "@formily/reactive";
|
|
3
|
-
import { observer as q } from "@formily/reactive-vue";
|
|
4
|
-
import { isFn as u, isArr as $, isStr as h, pascalCase as j, applyMiddleware as w, isValid as z } from "@formily/shared";
|
|
5
|
-
import { defineComponent as N, useSlots as O, createBlock as A, openBlock as k, unref as n, mergeProps as C, createSlots as I, withCtx as c, createElementVNode as J, normalizeClass as R, renderSlot as P, createElementBlock as U, Fragment as G, createVNode as b, createTextVNode as x, toDisplayString as M, normalizeProps as H, guardReactiveProps as K, ref as L, h as D, createApp as Q } from "vue";
|
|
6
|
-
import { ElDrawer as W, ElButton as E, ElConfigProvider as X } from "element-plus";
|
|
7
|
-
import { useDebonceSubmitting as Y, loading as F, getTransitionDuration as Z } from "../__builtins__/shared/loading.mjs";
|
|
8
|
-
import { FormProvider as _ } from "@formily/vue";
|
|
9
|
-
import { isVueOptions as ee } from "../__builtins__/shared/utils.mjs";
|
|
10
|
-
import { stylePrefix as re } from "../__builtins__/configs/index.mjs";
|
|
11
|
-
import { loadElConfigProvider as oe } from "../__builtins__/shared/load-config-provider.mjs";
|
|
12
|
-
import { o as te, c as S } from "../vendor/lodash.mjs";
|
|
13
|
-
const ne = /* @__PURE__ */ N({
|
|
14
|
-
name: "FormDrawerContent",
|
|
15
|
-
__name: "drawer-content",
|
|
16
|
-
props: {
|
|
17
|
-
drawerProps: {
|
|
18
|
-
type: Object,
|
|
19
|
-
required: !0
|
|
20
|
-
},
|
|
21
|
-
visible: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
required: !0
|
|
24
|
-
},
|
|
25
|
-
form: {
|
|
26
|
-
type: Object,
|
|
27
|
-
required: !0
|
|
28
|
-
},
|
|
29
|
-
resolve: {
|
|
30
|
-
type: Function,
|
|
31
|
-
required: !0
|
|
32
|
-
},
|
|
33
|
-
reject: {
|
|
34
|
-
type: Function,
|
|
35
|
-
required: !0
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
setup(t) {
|
|
39
|
-
const l = t, f = O(), e = `${re}-form-drawer`, d = oe(), { internalSubmitting: p } = Y(l.form), a = te(l.drawerProps, ["modelValue", "onUpdate:modelValue", "beforeClose"]);
|
|
40
|
-
return (i, r) => (k(), A(n(W), C({
|
|
41
|
-
class: e,
|
|
42
|
-
"z-index": n(d).zIndex
|
|
43
|
-
}, n(a), {
|
|
44
|
-
"model-value": t.visible,
|
|
45
|
-
"before-close": (o) => {
|
|
46
|
-
t.reject(), n(u)(l.drawerProps.beforeClose) ? l.drawerProps.beforeClose(o) : o();
|
|
47
|
-
}
|
|
48
|
-
}), I({
|
|
49
|
-
default: c(() => [
|
|
50
|
-
b(n(_), { form: t.form }, {
|
|
51
|
-
default: c(() => [
|
|
52
|
-
b(n(X), H(K(n(d))), {
|
|
53
|
-
default: c(() => [
|
|
54
|
-
P(i.$slots, "default", {
|
|
55
|
-
resolve: t.resolve,
|
|
56
|
-
reject: t.reject,
|
|
57
|
-
form: t.form
|
|
58
|
-
})
|
|
59
|
-
]),
|
|
60
|
-
_: 3
|
|
61
|
-
}, 16)
|
|
62
|
-
]),
|
|
63
|
-
_: 3
|
|
64
|
-
}, 8, ["form"])
|
|
65
|
-
]),
|
|
66
|
-
footer: c(() => [
|
|
67
|
-
J("div", {
|
|
68
|
-
class: R(`${e}-footer`)
|
|
69
|
-
}, [
|
|
70
|
-
f.footer ? P(i.$slots, "footer", {
|
|
71
|
-
key: 0,
|
|
72
|
-
resolve: t.resolve,
|
|
73
|
-
reject: t.reject,
|
|
74
|
-
form: t.form
|
|
75
|
-
}) : (k(), U(G, { key: 1 }, [
|
|
76
|
-
b(n(E), C(n(a).cancelButtonProps, {
|
|
77
|
-
onClick: r[0] || (r[0] = (o) => t.reject())
|
|
78
|
-
}), {
|
|
79
|
-
default: c(() => [
|
|
80
|
-
x(M(n(a).cancelText || "取消"), 1)
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
}, 16),
|
|
84
|
-
b(n(E), C({ type: "primary" }, n(a).okButtonProps, {
|
|
85
|
-
loading: n(p),
|
|
86
|
-
onClick: r[1] || (r[1] = (o) => t.resolve())
|
|
87
|
-
}), {
|
|
88
|
-
default: c(() => [
|
|
89
|
-
x(M(n(a).okText || "确定"), 1)
|
|
90
|
-
]),
|
|
91
|
-
_: 1
|
|
92
|
-
}, 16, ["loading"])
|
|
93
|
-
], 64))
|
|
94
|
-
], 2)
|
|
95
|
-
]),
|
|
96
|
-
_: 2
|
|
97
|
-
}, [
|
|
98
|
-
f.header ? {
|
|
99
|
-
name: "header",
|
|
100
|
-
fn: c(() => [
|
|
101
|
-
P(i.$slots, "header", {
|
|
102
|
-
resolve: t.resolve,
|
|
103
|
-
reject: t.reject,
|
|
104
|
-
form: t.form
|
|
105
|
-
})
|
|
106
|
-
]),
|
|
107
|
-
key: "0"
|
|
108
|
-
} : void 0
|
|
109
|
-
]), 1040, ["z-index", "model-value", "before-close"]));
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
function be(t, l, f) {
|
|
113
|
-
const e = {
|
|
114
|
-
root: document.createElement("div"),
|
|
115
|
-
form: null,
|
|
116
|
-
promise: null,
|
|
117
|
-
app: null,
|
|
118
|
-
instance: null,
|
|
119
|
-
openMiddlewares: [],
|
|
120
|
-
confirmMiddlewares: [],
|
|
121
|
-
cancelMiddlewares: []
|
|
122
|
-
};
|
|
123
|
-
if ($(f))
|
|
124
|
-
for (const r of f) {
|
|
125
|
-
/* istanbul ignore if -- @preserve */
|
|
126
|
-
if (!h(r))
|
|
127
|
-
return;
|
|
128
|
-
const o = S(r);
|
|
129
|
-
/* istanbul ignore if -- @preserve */
|
|
130
|
-
if (["open", "cancel", "confirm"].includes(o))
|
|
131
|
-
throw new Error(`for${j(o)} is presved`);
|
|
132
|
-
e[`${o}Middlewares`] = [];
|
|
133
|
-
}
|
|
134
|
-
document.body.append(e.root);
|
|
135
|
-
const d = h(t) ? { title: t } : t;
|
|
136
|
-
function p(r, o, s) {
|
|
137
|
-
const m = ee(l) ? { default: () => D(l) } : l;
|
|
138
|
-
if (!e.instance) {
|
|
139
|
-
const v = q({
|
|
140
|
-
setup(g, { expose: B }) {
|
|
141
|
-
const y = L(!1);
|
|
142
|
-
return B({
|
|
143
|
-
visible: y
|
|
144
|
-
}), () => D(ne, {
|
|
145
|
-
drawerProps: d,
|
|
146
|
-
form: e.form,
|
|
147
|
-
resolve: o,
|
|
148
|
-
reject: s,
|
|
149
|
-
visible: y.value
|
|
150
|
-
}, m);
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
e.app = Q(v), e.instance = e.app.mount(e.root);
|
|
154
|
-
}
|
|
155
|
-
e.instance.visible = r;
|
|
156
|
-
}
|
|
157
|
-
function a() {
|
|
158
|
-
const r = Z();
|
|
159
|
-
setTimeout(() => {
|
|
160
|
-
var o, s, m;
|
|
161
|
-
(s = (o = e.app) == null ? void 0 : o.unmount) == null || s.call(o), e.app = null, e.instance = null, (m = e.root) == null || m.remove(), e.root = void 0;
|
|
162
|
-
}, r);
|
|
163
|
-
}
|
|
164
|
-
const i = {
|
|
165
|
-
forOpen: (r) => (u(r) && e.openMiddlewares.push(r), i),
|
|
166
|
-
forConfirm: (r) => (u(r) && e.confirmMiddlewares.push(r), i),
|
|
167
|
-
forCancel: (r) => (u(r) && e.cancelMiddlewares.push(r), i),
|
|
168
|
-
open: (r) => {
|
|
169
|
-
/* istanbul ignore if -- @preserve */
|
|
170
|
-
return e.promise || (e.promise = new Promise((o, s) => {
|
|
171
|
-
F(d.loadingText, () => w(r, e.openMiddlewares)).then((m) => {
|
|
172
|
-
e.form = e.form || T(m), p(!0, (v) => {
|
|
173
|
-
e.form.submit(async () => {
|
|
174
|
-
await (z(v) ? w(e.form, e[`${v}Middlewares`]) : w(e.form, e.confirmMiddlewares)), o(V(e.form.values)), i.close(), a();
|
|
175
|
-
}).catch((g) => {
|
|
176
|
-
console.warn(g);
|
|
177
|
-
});
|
|
178
|
-
}, async () => {
|
|
179
|
-
await F(d.loadingText, () => w(e.form, e.cancelMiddlewares)), i.close(), a(), s(new Error("cancel"));
|
|
180
|
-
});
|
|
181
|
-
}).catch(
|
|
182
|
-
/* istanbul ignore next -- @preserve */
|
|
183
|
-
(m) => s(m)
|
|
184
|
-
);
|
|
185
|
-
})), e.promise;
|
|
186
|
-
},
|
|
187
|
-
close: () => {
|
|
188
|
-
/* istanbul ignore if -- @preserve */
|
|
189
|
-
e.root && p(!1);
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
if ($(f))
|
|
193
|
-
for (const r of f) {
|
|
194
|
-
const o = S(r);
|
|
195
|
-
i[`for${j(o)}`] = (s) => (u(s) && e[`${o}Middlewares`].push(s), i);
|
|
196
|
-
}
|
|
197
|
-
return i;
|
|
198
|
-
}
|
|
199
|
-
export {
|
|
200
|
-
be as FormDrawer,
|
|
201
|
-
be as default
|
|
202
|
-
};
|
|
203
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/form-drawer/drawer-content.vue","../../src/form-drawer/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Form } from '@formily/core'\nimport type { PropType } from 'vue'\nimport type { FormDrawerSlots, IFormDrawerProps } from './types'\nimport { isFn } from '@formily/shared'\nimport { FormProvider } from '@formily/vue'\nimport { ElButton, ElConfigProvider, ElDrawer } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { loadElConfigProvider, stylePrefix, useDebonceSubmitting } from '../__builtins__'\n\ndefineOptions({\n name: 'FormDrawerContent',\n})\n\nconst props = defineProps({\n drawerProps: {\n type: Object as PropType<IFormDrawerProps>,\n required: true,\n },\n visible: {\n type: Boolean,\n required: true,\n },\n form: {\n type: Object as PropType<Form>,\n required: true,\n },\n resolve: {\n type: Function as PropType<(type?: string) => void>,\n required: true,\n },\n reject: {\n type: Function as PropType<() => void>,\n required: true,\n },\n})\nconst slots = defineSlots<FormDrawerSlots>()\nconst prefixCls = `${stylePrefix}-form-drawer`\nconst elConfig = loadElConfigProvider()\n\nconst { internalSubmitting } = useDebonceSubmitting(props.form)\nconst _drawerProps = omit(props.drawerProps, ['modelValue', 'onUpdate:modelValue', 'beforeClose'])\n</script>\n\n<template>\n <ElDrawer\n :class=\"prefixCls\"\n :z-index=\"elConfig.zIndex\"\n v-bind=\"_drawerProps\"\n :model-value=\"visible\"\n :before-close=\"(done) => {\n reject()\n if (isFn(props.drawerProps.beforeClose)) {\n props.drawerProps.beforeClose(done)\n }\n else {\n done()\n }\n }\"\n >\n <template v-if=\"slots.header\" #header>\n <slot name=\"header\" :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </template>\n\n <template #default>\n <FormProvider :form=\"form\">\n <ElConfigProvider v-bind=\"elConfig\">\n <slot :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </ElConfigProvider>\n </FormProvider>\n </template>\n\n <template #footer>\n <div :class=\"`${prefixCls}-footer`\">\n <template v-if=\"slots.footer\">\n <slot name=\"footer\" :resolve=\"resolve\" :reject=\"reject\" :form=\"form\" />\n </template>\n <template v-else>\n <ElButton\n v-bind=\"_drawerProps.cancelButtonProps\"\n @click=\"reject()\"\n >\n {{ _drawerProps.cancelText || '取消' }}\n </ElButton>\n <ElButton\n type=\"primary\"\n v-bind=\"_drawerProps.okButtonProps\"\n :loading=\"internalSubmitting\"\n @click=\"resolve()\"\n >\n {{ _drawerProps.okText || '确定' }}\n </ElButton>\n </template>\n </div>\n </template>\n </ElDrawer>\n</template>\n","import type { Form, IFormProps } from '@formily/core'\nimport type { IMiddleware } from '@formily/shared'\nimport type { App, Component } from 'vue'\nimport type { FormDrawerSlotContent, IFormDrawer, IFormDrawerProps } from './types'\nimport { createForm } from '@formily/core'\nimport { toJS } from '@formily/reactive'\nimport { observer } from '@formily/reactive-vue'\nimport { applyMiddleware, isArr, isFn, isStr, isValid, pascalCase } from '@formily/shared'\nimport { camelCase } from 'lodash-es'\nimport { createApp, h, ref } from 'vue'\nimport { getTransitionDuration, isVueOptions, loading } from '../__builtins__'\nimport DrawerContent from './drawer-content.vue'\n\nexport function FormDrawer(\n title: IFormDrawerProps | string,\n content?: Component | FormDrawerSlotContent,\n dynamicMiddlewareNames?: string[],\n): IFormDrawer {\n const env: {\n root?: HTMLElement\n form?: Form\n promise?: Promise<any>\n instance?: any\n app?: App<Element>\n openMiddlewares: IMiddleware<IFormProps>[]\n confirmMiddlewares: IMiddleware<Form>[]\n cancelMiddlewares: IMiddleware<Form>[]\n [key: `${string}Middlewares`]: IMiddleware<Form>[] | IMiddleware<IFormProps>[] | undefined\n } = {\n root: document.createElement('div'),\n form: null,\n promise: null,\n app: null,\n instance: null,\n openMiddlewares: [],\n confirmMiddlewares: [],\n cancelMiddlewares: [],\n }\n\n if (isArr(dynamicMiddlewareNames)) {\n for (const middlewareName of dynamicMiddlewareNames) {\n /* istanbul ignore if -- @preserve */\n if (!isStr(middlewareName))\n return\n const _middlewareName = camelCase(middlewareName)\n /* istanbul ignore if -- @preserve */\n if (['open', 'cancel', 'confirm'].includes(_middlewareName)) {\n throw new Error(`for${pascalCase(_middlewareName)} is presved`)\n }\n (env[`${_middlewareName}Middlewares`] = [])\n }\n }\n\n document.body.append(env.root)\n\n const props = (isStr(title) ? ({ title }) : title) as IFormDrawerProps\n\n function render(visible: boolean, resolve?: (type?: string) => any, reject?: () => any) {\n const _content = isVueOptions(content) ? { default: () => h(content) } : content\n if (!env.instance) {\n const ComponentConstructor = observer({\n setup(_, { expose }) {\n const visible = ref(false)\n expose({\n visible,\n })\n return () => h(DrawerContent, {\n drawerProps: props,\n form: env.form,\n resolve,\n reject,\n visible: visible.value,\n }, _content)\n },\n })\n env.app = createApp(ComponentConstructor)\n env.instance = env.app.mount(env.root)\n }\n env.instance.visible = visible\n }\n\n function disposeDrawer() {\n const animationDuration = getTransitionDuration()\n setTimeout(() => {\n env.app?.unmount?.()\n env.app = null\n env.instance = null\n env.root?.remove()\n env.root = undefined\n }, animationDuration)\n }\n\n const formDrawer = {\n forOpen: (middleware: IMiddleware<IFormProps>) => {\n isFn(middleware) && env.openMiddlewares.push(middleware)\n return formDrawer\n },\n forConfirm: (middleware: IMiddleware<Form>) => {\n isFn(middleware) && env.confirmMiddlewares.push(middleware)\n return formDrawer\n },\n forCancel: (middleware: IMiddleware<Form>) => {\n isFn(middleware) && env.cancelMiddlewares.push(middleware)\n return formDrawer\n },\n open: (payload: IFormProps) => {\n /* istanbul ignore if -- @preserve */\n if (env.promise)\n return env.promise\n\n env.promise = new Promise((res, rej) => {\n loading(props.loadingText, () => applyMiddleware(payload, env.openMiddlewares))\n .then((resPayload) => {\n env.form = env.form || createForm(resPayload)\n render(true, (type: string) => {\n env.form.submit(async () => {\n await (isValid(type) ? applyMiddleware(env.form, env[`${type}Middlewares`]) : applyMiddleware(env.form, env.confirmMiddlewares))\n res(toJS(env.form.values))\n formDrawer.close()\n disposeDrawer()\n }).catch((error) => {\n console.warn(error)\n })\n }, async () => {\n await loading(props.loadingText, () =>\n applyMiddleware(env.form, env.cancelMiddlewares))\n formDrawer.close()\n disposeDrawer()\n rej(new Error('cancel'))\n })\n })\n .catch(/* istanbul ignore next -- @preserve */ error => rej(error))\n })\n return env.promise\n },\n close: () => {\n /* istanbul ignore if -- @preserve */\n if (!env.root)\n return\n render(false)\n },\n }\n\n if (isArr(dynamicMiddlewareNames)) {\n for (const middlewareName of dynamicMiddlewareNames) {\n const _middlewareName = camelCase(middlewareName)\n formDrawer[`for${pascalCase(_middlewareName)}`] = (middleware: IMiddleware<Form>) => {\n isFn(middleware) && env[`${_middlewareName}Middlewares`].push(middleware)\n return formDrawer\n }\n }\n }\n\n return formDrawer as never\n}\n\nexport default FormDrawer\n"],"names":["props","__props","slots","_useSlots","prefixCls","stylePrefix","elConfig","loadElConfigProvider","internalSubmitting","useDebonceSubmitting","_drawerProps","omit","_openBlock","_createBlock","_unref","_mergeProps","done","isFn","_createVNode","FormProvider","_renderSlot","_ctx","_createElementVNode","_createElementBlock","_Fragment","ElButton","_createTextVNode","_toDisplayString","FormDrawer","title","content","dynamicMiddlewareNames","env","isArr","middlewareName","isStr","_middlewareName","camelCase","pascalCase","render","visible","resolve","reject","_content","isVueOptions","h","ComponentConstructor","observer","_","expose","ref","DrawerContent","createApp","disposeDrawer","animationDuration","getTransitionDuration","_b","_a","_c","formDrawer","middleware","payload","res","rej","loading","applyMiddleware","resPayload","createForm","type","isValid","toJS","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,UAAMA,IAAQC,GAsBRC,IAAQC,EAAA,GACRC,IAAY,GAAGC,EAAW,gBAC1BC,IAAWC,GAAA,GAEX,EAAE,oBAAAC,EAAA,IAAuBC,EAAqBT,EAAM,IAAI,GACxDU,IAAeC,GAAKX,EAAM,aAAa,CAAC,cAAc,uBAAuB,aAAa,CAAC;sBAI/FY,KAAAC,EAkDWC,MAlDXC,EAkDW;AAAA,MAjDR,OAAOX;AAAA,MACP,WAASU,EAAAR,CAAA,EAAS;AAAA,IAAA,GACXQ,EAAAJ,CAAA,GAAY;AAAA,MACnB,eAAaT,EAAA;AAAA,MACb,iBAAee,MAAI;AAAa,QAAAf,EAAA,OAAA,GAAmBa,EAAAG,CAAA,EAAKjB,EAAM,YAAY,WAAW,IAAaA,EAAM,YAAY,YAAYgB,CAAI,IAA+BA,EAAA;AAAA;;MAczJ,WACT,MAIe;AAAA,QAJfE,EAIeJ,EAAAK,CAAA,GAAA,EAJA,MAAMlB,EAAA,QAAI;AAAA,qBACvB,MAEmB;AAAA,YAFnBiB,EAEmBJ,UAFOA,EAAAR,CAAA,CAAQ,CAAA,GAAA;AAAA,yBAChC,MAAyD;AAAA,gBAAzDc,EAAyDC,EAAA,QAAA,WAAA;AAAA,kBAAlD,SAASpB,EAAA;AAAA,kBAAU,QAAQA,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AAW,MAAA,GACXN,EAAA,GACAU,EAAI,IAAI,MAAM,QAAQ,CAAC;AAAA,UACzB,CAAC;AAAA,QACH,CAAC,EACA;AAAA;AAAA,UAA8C,CAAAQ,MAASR,EAAIQ,CAAK;AAAA,QAAA;AAAA,MACrE,CAAC,IACMvC,EAAI;AAAA,IACb;AAAA,IACA,OAAO,MAAM;AAAA,MAAA;AAEX,MAAKA,EAAI,QAETO,EAAO,EAAK;AAAA,IACd;AAAA,EAAA;AAGF,MAAIN,EAAMF,CAAsB;AAC9B,eAAWG,KAAkBH,GAAwB;AACnD,YAAMK,IAAkBC,EAAUH,CAAc;AAChD,MAAAyB,EAAW,MAAMrB,EAAWF,CAAe,CAAC,EAAE,IAAI,CAACwB,OACjD3C,EAAK2C,CAAU,KAAK5B,EAAI,GAAGI,CAAe,aAAa,EAAE,KAAKwB,CAAU,GACjED;AAAA,IAEX;AAGF,SAAOA;AACT;"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Form, IFormProps } from '@formily/core';
|
|
2
|
-
import { IMiddleware } from '@formily/shared';
|
|
3
|
-
import { ButtonProps, DrawerProps } from 'element-plus';
|
|
4
|
-
import { SlotsType, VNode } from 'vue';
|
|
5
|
-
export type IFormDrawerProps = Partial<DrawerProps> & {
|
|
6
|
-
cancelText?: string;
|
|
7
|
-
cancelButtonProps?: ButtonProps;
|
|
8
|
-
okText?: string;
|
|
9
|
-
okButtonProps?: ButtonProps;
|
|
10
|
-
loadingText?: string;
|
|
11
|
-
};
|
|
12
|
-
export interface FormDrawerSlotProps {
|
|
13
|
-
resolve: (type?: string) => void;
|
|
14
|
-
reject: () => void;
|
|
15
|
-
form: Form;
|
|
16
|
-
}
|
|
17
|
-
export interface FormDrawerSlots {
|
|
18
|
-
header?: (props: FormDrawerSlotProps) => VNode;
|
|
19
|
-
default?: () => VNode;
|
|
20
|
-
footer?: (props: FormDrawerSlotProps) => VNode;
|
|
21
|
-
}
|
|
22
|
-
export type FormDrawerSlotContent = SlotsType<FormDrawerSlots> | {
|
|
23
|
-
[key in keyof FormDrawerSlots]?: FormDrawerSlots[key];
|
|
24
|
-
};
|
|
25
|
-
export interface IFormDrawer {
|
|
26
|
-
forOpen: (middleware: IMiddleware<IFormProps>) => IFormDrawer;
|
|
27
|
-
forConfirm: (middleware: IMiddleware<Form>) => IFormDrawer;
|
|
28
|
-
forCancel: (middleware: IMiddleware<Form>) => IFormDrawer;
|
|
29
|
-
[key: `for${string}`]: (middleware: IMiddleware<IFormProps>) => IFormDrawer;
|
|
30
|
-
open: (props?: IFormProps) => Promise<any>;
|
|
31
|
-
close: () => void;
|
|
32
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: any;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
11
|
-
gridSpan: {
|
|
12
|
-
type: NumberConstructor;
|
|
13
|
-
default: number;
|
|
14
|
-
};
|
|
15
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
-
gridSpan: {
|
|
17
|
-
type: NumberConstructor;
|
|
18
|
-
default: number;
|
|
19
|
-
};
|
|
20
|
-
}>> & Readonly<{}>, {
|
|
21
|
-
gridSpan: number;
|
|
22
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
-
export default _default;
|
|
25
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
-
new (): {
|
|
27
|
-
$slots: S;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { IGridOptions, Grid } from '@formily/grid';
|
|
2
|
-
import { PropType } from 'vue';
|
|
3
|
-
declare function __VLS_template(): {
|
|
4
|
-
attrs: Partial<{}>;
|
|
5
|
-
slots: {
|
|
6
|
-
default?(_: {}): any;
|
|
7
|
-
};
|
|
8
|
-
refs: {
|
|
9
|
-
rootRef: HTMLDivElement;
|
|
10
|
-
};
|
|
11
|
-
rootEl: HTMLDivElement;
|
|
12
|
-
};
|
|
13
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
15
|
-
columnGap: {
|
|
16
|
-
type: NumberConstructor;
|
|
17
|
-
};
|
|
18
|
-
rowGap: {
|
|
19
|
-
type: NumberConstructor;
|
|
20
|
-
};
|
|
21
|
-
minColumns: {
|
|
22
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
23
|
-
};
|
|
24
|
-
minWidth: {
|
|
25
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
26
|
-
};
|
|
27
|
-
maxColumns: {
|
|
28
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
29
|
-
};
|
|
30
|
-
maxWidth: {
|
|
31
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
32
|
-
};
|
|
33
|
-
breakpoints: {
|
|
34
|
-
type: PropType<number[]>;
|
|
35
|
-
};
|
|
36
|
-
colWrap: {
|
|
37
|
-
type: BooleanConstructor;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
|
-
strictAutoFit: {
|
|
41
|
-
type: BooleanConstructor;
|
|
42
|
-
default: boolean;
|
|
43
|
-
};
|
|
44
|
-
shouldVisible: {
|
|
45
|
-
type: PropType<IGridOptions["shouldVisible"]>;
|
|
46
|
-
default(): () => true;
|
|
47
|
-
};
|
|
48
|
-
grid: {
|
|
49
|
-
type: PropType<Grid<HTMLElement>>;
|
|
50
|
-
};
|
|
51
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
52
|
-
columnGap: {
|
|
53
|
-
type: NumberConstructor;
|
|
54
|
-
};
|
|
55
|
-
rowGap: {
|
|
56
|
-
type: NumberConstructor;
|
|
57
|
-
};
|
|
58
|
-
minColumns: {
|
|
59
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
60
|
-
};
|
|
61
|
-
minWidth: {
|
|
62
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
63
|
-
};
|
|
64
|
-
maxColumns: {
|
|
65
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
66
|
-
};
|
|
67
|
-
maxWidth: {
|
|
68
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
69
|
-
};
|
|
70
|
-
breakpoints: {
|
|
71
|
-
type: PropType<number[]>;
|
|
72
|
-
};
|
|
73
|
-
colWrap: {
|
|
74
|
-
type: BooleanConstructor;
|
|
75
|
-
default: boolean;
|
|
76
|
-
};
|
|
77
|
-
strictAutoFit: {
|
|
78
|
-
type: BooleanConstructor;
|
|
79
|
-
default: boolean;
|
|
80
|
-
};
|
|
81
|
-
shouldVisible: {
|
|
82
|
-
type: PropType<IGridOptions["shouldVisible"]>;
|
|
83
|
-
default(): () => true;
|
|
84
|
-
};
|
|
85
|
-
grid: {
|
|
86
|
-
type: PropType<Grid<HTMLElement>>;
|
|
87
|
-
};
|
|
88
|
-
}>> & Readonly<{}>, {
|
|
89
|
-
colWrap: boolean;
|
|
90
|
-
strictAutoFit: boolean;
|
|
91
|
-
shouldVisible: (node: import('@formily/grid').GridNode, grid: Grid<HTMLElement>) => boolean;
|
|
92
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
93
|
-
rootRef: HTMLDivElement;
|
|
94
|
-
}, HTMLDivElement>;
|
|
95
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
96
|
-
export default _default;
|
|
97
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
98
|
-
new (): {
|
|
99
|
-
$slots: S;
|
|
100
|
-
};
|
|
101
|
-
};
|
package/esm/form-grid/hooks.d.ts
DELETED
package/esm/form-grid/hooks.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.mjs","sources":["../../src/form-grid/hooks.ts"],"sourcesContent":["import type { Grid as IGrid } from '@formily/grid'\nimport type { InjectionKey, Ref } from 'vue'\nimport { inject } from 'vue'\n\nexport const FormGridSymbol: InjectionKey<Ref<IGrid<HTMLElement>>> = Symbol('FormGridContext')\n\nexport const useFormGrid = (): Ref<IGrid<HTMLElement>> => inject(FormGridSymbol)\n"],"names":["FormGridSymbol","useFormGrid","inject"],"mappings":";AAIO,MAAMA,IAAwD,OAAO,iBAAiB,GAEhFC,IAAc,MAA+BC,EAAOF,CAAc;"}
|
package/esm/form-grid/index.d.ts
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
export declare const FormGrid: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
-
columnGap: {
|
|
4
|
-
type: NumberConstructor;
|
|
5
|
-
};
|
|
6
|
-
rowGap: {
|
|
7
|
-
type: NumberConstructor;
|
|
8
|
-
};
|
|
9
|
-
minColumns: {
|
|
10
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
11
|
-
};
|
|
12
|
-
minWidth: {
|
|
13
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
14
|
-
};
|
|
15
|
-
maxColumns: {
|
|
16
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
17
|
-
};
|
|
18
|
-
maxWidth: {
|
|
19
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
20
|
-
};
|
|
21
|
-
breakpoints: {
|
|
22
|
-
type: import('vue').PropType<number[]>;
|
|
23
|
-
};
|
|
24
|
-
colWrap: {
|
|
25
|
-
type: BooleanConstructor;
|
|
26
|
-
default: boolean;
|
|
27
|
-
};
|
|
28
|
-
strictAutoFit: {
|
|
29
|
-
type: BooleanConstructor;
|
|
30
|
-
default: boolean;
|
|
31
|
-
};
|
|
32
|
-
shouldVisible: {
|
|
33
|
-
type: import('vue').PropType<import('@formily/grid').IGridOptions["shouldVisible"]>;
|
|
34
|
-
default(): () => true;
|
|
35
|
-
};
|
|
36
|
-
grid: {
|
|
37
|
-
type: import('vue').PropType<import('@formily/grid').Grid<HTMLElement>>;
|
|
38
|
-
};
|
|
39
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
40
|
-
colWrap: boolean;
|
|
41
|
-
strictAutoFit: boolean;
|
|
42
|
-
shouldVisible: (node: import('@formily/grid').GridNode, grid: import('@formily/grid').Grid<HTMLElement>) => boolean;
|
|
43
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
44
|
-
rootRef: HTMLDivElement;
|
|
45
|
-
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
46
|
-
P: {};
|
|
47
|
-
B: {};
|
|
48
|
-
D: {};
|
|
49
|
-
C: {};
|
|
50
|
-
M: {};
|
|
51
|
-
Defaults: {};
|
|
52
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
53
|
-
columnGap: {
|
|
54
|
-
type: NumberConstructor;
|
|
55
|
-
};
|
|
56
|
-
rowGap: {
|
|
57
|
-
type: NumberConstructor;
|
|
58
|
-
};
|
|
59
|
-
minColumns: {
|
|
60
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
61
|
-
};
|
|
62
|
-
minWidth: {
|
|
63
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
64
|
-
};
|
|
65
|
-
maxColumns: {
|
|
66
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
67
|
-
};
|
|
68
|
-
maxWidth: {
|
|
69
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
70
|
-
};
|
|
71
|
-
breakpoints: {
|
|
72
|
-
type: import('vue').PropType<number[]>;
|
|
73
|
-
};
|
|
74
|
-
colWrap: {
|
|
75
|
-
type: BooleanConstructor;
|
|
76
|
-
default: boolean;
|
|
77
|
-
};
|
|
78
|
-
strictAutoFit: {
|
|
79
|
-
type: BooleanConstructor;
|
|
80
|
-
default: boolean;
|
|
81
|
-
};
|
|
82
|
-
shouldVisible: {
|
|
83
|
-
type: import('vue').PropType<import('@formily/grid').IGridOptions["shouldVisible"]>;
|
|
84
|
-
default(): () => true;
|
|
85
|
-
};
|
|
86
|
-
grid: {
|
|
87
|
-
type: import('vue').PropType<import('@formily/grid').Grid<HTMLElement>>;
|
|
88
|
-
};
|
|
89
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
90
|
-
colWrap: boolean;
|
|
91
|
-
strictAutoFit: boolean;
|
|
92
|
-
shouldVisible: (node: import('@formily/grid').GridNode, grid: import('@formily/grid').Grid<HTMLElement>) => boolean;
|
|
93
|
-
}>;
|
|
94
|
-
__isFragment?: never;
|
|
95
|
-
__isTeleport?: never;
|
|
96
|
-
__isSuspense?: never;
|
|
97
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
98
|
-
columnGap: {
|
|
99
|
-
type: NumberConstructor;
|
|
100
|
-
};
|
|
101
|
-
rowGap: {
|
|
102
|
-
type: NumberConstructor;
|
|
103
|
-
};
|
|
104
|
-
minColumns: {
|
|
105
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
106
|
-
};
|
|
107
|
-
minWidth: {
|
|
108
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
109
|
-
};
|
|
110
|
-
maxColumns: {
|
|
111
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
112
|
-
};
|
|
113
|
-
maxWidth: {
|
|
114
|
-
type: (ArrayConstructor | NumberConstructor)[];
|
|
115
|
-
};
|
|
116
|
-
breakpoints: {
|
|
117
|
-
type: import('vue').PropType<number[]>;
|
|
118
|
-
};
|
|
119
|
-
colWrap: {
|
|
120
|
-
type: BooleanConstructor;
|
|
121
|
-
default: boolean;
|
|
122
|
-
};
|
|
123
|
-
strictAutoFit: {
|
|
124
|
-
type: BooleanConstructor;
|
|
125
|
-
default: boolean;
|
|
126
|
-
};
|
|
127
|
-
shouldVisible: {
|
|
128
|
-
type: import('vue').PropType<import('@formily/grid').IGridOptions["shouldVisible"]>;
|
|
129
|
-
default(): () => true;
|
|
130
|
-
};
|
|
131
|
-
grid: {
|
|
132
|
-
type: import('vue').PropType<import('@formily/grid').Grid<HTMLElement>>;
|
|
133
|
-
};
|
|
134
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
135
|
-
colWrap: boolean;
|
|
136
|
-
strictAutoFit: boolean;
|
|
137
|
-
shouldVisible: (node: import('@formily/grid').GridNode, grid: import('@formily/grid').Grid<HTMLElement>) => boolean;
|
|
138
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
139
|
-
$slots: {
|
|
140
|
-
default?(_: {}): any;
|
|
141
|
-
};
|
|
142
|
-
}) & {
|
|
143
|
-
GridColumn: {
|
|
144
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
145
|
-
gridSpan: {
|
|
146
|
-
type: NumberConstructor;
|
|
147
|
-
default: number;
|
|
148
|
-
};
|
|
149
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
150
|
-
gridSpan: number;
|
|
151
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
152
|
-
P: {};
|
|
153
|
-
B: {};
|
|
154
|
-
D: {};
|
|
155
|
-
C: {};
|
|
156
|
-
M: {};
|
|
157
|
-
Defaults: {};
|
|
158
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
159
|
-
gridSpan: {
|
|
160
|
-
type: NumberConstructor;
|
|
161
|
-
default: number;
|
|
162
|
-
};
|
|
163
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
164
|
-
gridSpan: number;
|
|
165
|
-
}>;
|
|
166
|
-
__isFragment?: never;
|
|
167
|
-
__isTeleport?: never;
|
|
168
|
-
__isSuspense?: never;
|
|
169
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
170
|
-
gridSpan: {
|
|
171
|
-
type: NumberConstructor;
|
|
172
|
-
default: number;
|
|
173
|
-
};
|
|
174
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
175
|
-
gridSpan: number;
|
|
176
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
177
|
-
$slots: {
|
|
178
|
-
default?(_: {}): any;
|
|
179
|
-
};
|
|
180
|
-
});
|
|
181
|
-
};
|
|
182
|
-
export default FormGrid;
|