@vunk/form 2.3.2 → 2.4.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/components/api-tables-select/index.cjs +1 -9
- package/components/api-tables-select/index.mjs +1 -9
- package/components/api-tables-select/src/ctx.d.ts +4 -7
- package/components/api-tables-select/src/index.vue.d.ts +10 -9
- package/components/button/src/ctx.d.ts +4 -0
- package/components/button/src/index.vue.d.ts +9 -0
- package/components/card-input-collection/index.cjs +5 -10
- package/components/card-input-collection/index.mjs +6 -11
- package/components/card-input-collection/src/ctx.d.ts +4 -7
- package/components/card-input-collection/src/index.vue.d.ts +9 -9
- package/components/cascader/src/ctx.d.ts +5 -1
- package/components/cascader/src/index.vue.d.ts +9 -0
- package/components/checkbox/src/ctx.d.ts +5 -1
- package/components/checkbox/src/index.vue.d.ts +9 -0
- package/components/color-picker/src/ctx.d.ts +4 -0
- package/components/color-picker/src/index.vue.d.ts +9 -0
- package/components/date-picker/src/ctx.d.ts +5 -1
- package/components/date-picker/src/index.vue.d.ts +9 -0
- package/components/date-picker-range/src/ctx.d.ts +4 -0
- package/components/date-picker-range/src/index.vue.d.ts +9 -0
- package/components/download-plus/src/ctx.d.ts +4 -0
- package/components/download-plus/src/index.vue.d.ts +9 -0
- package/components/esri-input-geojson/src/ctx.d.ts +5 -1
- package/components/esri-input-geojson/src/index.vue.d.ts +10 -0
- package/components/form/index.cjs +12 -29
- package/components/form/index.mjs +13 -30
- package/components/form/src/ctx.d.ts +1 -8
- package/components/form/src/index.vue.d.ts +0 -20
- package/components/form-item/index.cjs +6 -1
- package/components/form-item/index.css +3 -0
- package/components/form-item/index.mjs +6 -1
- package/components/form-item/src/ctx.d.ts +5 -1
- package/components/form-item/src/index.vue.d.ts +9 -0
- package/components/form-item-renderer/index.cjs +49 -7
- package/components/form-item-renderer/index.mjs +51 -9
- package/components/form-item-renderer/src/core.vue.d.ts +38 -0
- package/components/form-item-renderer/src/index.vue.d.ts +67 -12
- package/components/information/index.cjs +76 -0
- package/components/information/index.d.ts +4 -0
- package/components/information/index.mjs +70 -0
- package/components/information/src/ctx.d.ts +13 -0
- package/components/information/src/index.vue.d.ts +391 -0
- package/components/information/src/types.d.ts +2 -0
- package/components/information-templates-default/index.cjs +187 -0
- package/components/information-templates-default/index.css +12 -0
- package/components/information-templates-default/index.d.ts +4 -0
- package/components/information-templates-default/index.mjs +181 -0
- package/components/information-templates-default/src/ctx.d.ts +2 -0
- package/components/information-templates-default/src/index.vue.d.ts +52 -0
- package/components/information-templates-default/src/types.d.ts +1 -0
- package/components/input/src/ctx.d.ts +5 -1
- package/components/input/src/index.vue.d.ts +9 -0
- package/components/input-collection/index.cjs +11 -7
- package/components/input-collection/index.mjs +12 -8
- package/components/input-collection/src/ctx.d.ts +8 -4
- package/components/input-collection/src/index.vue.d.ts +16 -7
- package/components/input-link/src/ctx.d.ts +4 -0
- package/components/input-link/src/index.vue.d.ts +9 -0
- package/components/input-number/src/ctx.d.ts +5 -1
- package/components/input-number/src/index.vue.d.ts +9 -0
- package/components/monaco-editor/src/ctx.d.ts +4 -0
- package/components/monaco-editor/src/index.vue.d.ts +9 -0
- package/components/radio/src/ctx.d.ts +4 -0
- package/components/radio/src/index.vue.d.ts +9 -0
- package/components/select/src/ctx.d.ts +5 -1
- package/components/select/src/index.vue.d.ts +9 -0
- package/components/slider/src/ctx.d.ts +4 -0
- package/components/slider/src/index.vue.d.ts +9 -0
- package/components/switch/src/ctx.d.ts +4 -0
- package/components/switch/src/index.vue.d.ts +9 -0
- package/components/tables-select/index.cjs +5 -1
- package/components/tables-select/index.mjs +5 -1
- package/components/tables-select/src/ctx.d.ts +5 -1
- package/components/tables-select/src/index.vue.d.ts +9 -0
- package/components/tag-information/index.cjs +105 -0
- package/components/tag-information/index.css +6 -0
- package/components/tag-information/index.d.ts +4 -0
- package/components/tag-information/index.mjs +99 -0
- package/components/tag-information/src/ctx.d.ts +26 -0
- package/components/tag-information/src/index.vue.d.ts +894 -0
- package/components/tag-information/src/types.d.ts +1 -0
- package/components/template-instances-provider/index.cjs +8 -13
- package/components/template-instances-provider/index.mjs +8 -13
- package/components/template-instances-provider/src/index.vue.d.ts +4 -14
- package/components/upload/src/ctx.d.ts +5 -1
- package/components/upload/src/index.vue.d.ts +9 -0
- package/components/upload-plus/src/ctx.d.ts +4 -0
- package/components/upload-plus/src/index.vue.d.ts +9 -0
- package/components/van-cascader/src/ctx.d.ts +4 -0
- package/components/van-cascader/src/index.vue.d.ts +9 -0
- package/components/var-datetime-picker/src/ctx.d.ts +4 -0
- package/components/var-datetime-picker/src/index.vue.d.ts +9 -0
- package/components/vditor/src/ctx.d.ts +4 -0
- package/components/vditor/src/index.vue.d.ts +9 -0
- package/composables/index.cjs +31 -5
- package/composables/index.mjs +31 -6
- package/composables/useTemplateInstances.d.ts +6 -1
- package/index.css +23 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1 -0
- package/package.json +22 -1
- package/shared/types/index.d.ts +4 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,21 +8,16 @@ var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
|
8
8
|
|
|
9
9
|
var _sfc_main = vue.defineComponent({
|
|
10
10
|
name: "VkfTemplateInstancesProvider",
|
|
11
|
-
props: {
|
|
12
|
-
inheritTemplates: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
11
|
setup(props, { slots }) {
|
|
18
|
-
|
|
19
|
-
const inheritTemplates = composables.useTemplateInstances();
|
|
20
|
-
return () => slots.default?.({
|
|
21
|
-
templateInstances: inheritTemplates
|
|
22
|
-
});
|
|
23
|
-
}
|
|
12
|
+
const perent = composables.useTemplateInstances();
|
|
24
13
|
const templateInstances = composables.initTemplateInstances();
|
|
25
|
-
|
|
14
|
+
if (perent) {
|
|
15
|
+
return () => slots.default?.({ templateInstances });
|
|
16
|
+
}
|
|
17
|
+
return () => [
|
|
18
|
+
slots.default?.({ templateInstances }),
|
|
19
|
+
slots.placeholder?.()
|
|
20
|
+
];
|
|
26
21
|
}
|
|
27
22
|
});
|
|
28
23
|
|
|
@@ -4,21 +4,16 @@ import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
|
4
4
|
|
|
5
5
|
var _sfc_main = defineComponent({
|
|
6
6
|
name: "VkfTemplateInstancesProvider",
|
|
7
|
-
props: {
|
|
8
|
-
inheritTemplates: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: false
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
7
|
setup(props, { slots }) {
|
|
14
|
-
|
|
15
|
-
const inheritTemplates = useTemplateInstances();
|
|
16
|
-
return () => slots.default?.({
|
|
17
|
-
templateInstances: inheritTemplates
|
|
18
|
-
});
|
|
19
|
-
}
|
|
8
|
+
const perent = useTemplateInstances();
|
|
20
9
|
const templateInstances = initTemplateInstances();
|
|
21
|
-
|
|
10
|
+
if (perent) {
|
|
11
|
+
return () => slots.default?.({ templateInstances });
|
|
12
|
+
}
|
|
13
|
+
return () => [
|
|
14
|
+
slots.default?.({ templateInstances }),
|
|
15
|
+
slots.placeholder?.()
|
|
16
|
+
];
|
|
22
17
|
}
|
|
23
18
|
});
|
|
24
19
|
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").
|
|
2
|
-
inheritTemplates: {
|
|
3
|
-
type: BooleanConstructor;
|
|
4
|
-
default: boolean;
|
|
5
|
-
};
|
|
6
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
7
2
|
[key: string]: any;
|
|
8
|
-
}>[]
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
default: boolean;
|
|
12
|
-
};
|
|
13
|
-
}>> & Readonly<{}>, {
|
|
14
|
-
inheritTemplates: boolean;
|
|
15
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
}>[]) | (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}>[][]), {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
6
|
export default _default;
|
|
@@ -152,6 +152,10 @@ export declare const props: {
|
|
|
152
152
|
type: StringConstructor;
|
|
153
153
|
default: any;
|
|
154
154
|
};
|
|
155
|
+
information: {
|
|
156
|
+
type: BooleanConstructor;
|
|
157
|
+
default: boolean;
|
|
158
|
+
};
|
|
155
159
|
label: StringConstructor;
|
|
156
160
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
157
161
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -178,7 +182,7 @@ export declare const props: {
|
|
|
178
182
|
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
179
183
|
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
180
184
|
};
|
|
181
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"disabled", keyof T2> | Extract<"name", keyof T2> | Extract<"data", keyof T2> | Extract<"multiple", keyof T2> | Extract<"onChange", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"drag", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"crossorigin", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"method", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"listType", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"onDownload", keyof T2> | Extract<"preview", keyof T2> | Extract<"tip", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "name" | "data" | "multiple" | "onChange" | "withCredentials" | "drag" | "beforeUpload" | "beforeRemove" | "onRemove" | "onPreview" | "onSuccess" | "onProgress" | "onError" | "onExceed" | "crossorigin" | "action" | "headers" | "method" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "limit" | "onDownload" | "preview" | "tip", keyof T2>, KE> : Extract<"required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "name" | "data" | "multiple" | "onChange" | "withCredentials" | "drag" | "beforeUpload" | "beforeRemove" | "onRemove" | "onPreview" | "onSuccess" | "onProgress" | "onError" | "onExceed" | "crossorigin" | "action" | "headers" | "method" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "limit" | "onDownload" | "preview" | "tip", keyof T2>]: { [k in Extract<"required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "name" | "data" | "multiple" | "onChange" | "withCredentials" | "drag" | "beforeUpload" | "beforeRemove" | "onRemove" | "onPreview" | "onSuccess" | "onProgress" | "onError" | "onExceed" | "crossorigin" | "action" | "headers" | "method" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "limit" | "onDownload" | "preview" | "tip", keyof T2>]: T2[k]; }[P]; }>;
|
|
185
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"information", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"disabled", keyof T2> | Extract<"name", keyof T2> | Extract<"data", keyof T2> | Extract<"multiple", keyof T2> | Extract<"onChange", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"drag", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"crossorigin", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"method", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"listType", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"onDownload", keyof T2> | Extract<"preview", keyof T2> | Extract<"tip", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "information" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "name" | "data" | "multiple" | "onChange" | "withCredentials" | "drag" | "beforeUpload" | "beforeRemove" | "onRemove" | "onPreview" | "onSuccess" | "onProgress" | "onError" | "onExceed" | "crossorigin" | "action" | "headers" | "method" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "limit" | "onDownload" | "preview" | "tip", keyof T2>, KE> : Extract<"required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "information" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "name" | "data" | "multiple" | "onChange" | "withCredentials" | "drag" | "beforeUpload" | "beforeRemove" | "onRemove" | "onPreview" | "onSuccess" | "onProgress" | "onError" | "onExceed" | "crossorigin" | "action" | "headers" | "method" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "limit" | "onDownload" | "preview" | "tip", keyof T2>]: { [k in Extract<"required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "formItemTip" | "formItemTipClass" | "labelTip" | "information" | "label" | "labelWidth" | "labelPosition" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "disabled" | "name" | "data" | "multiple" | "onChange" | "withCredentials" | "drag" | "beforeUpload" | "beforeRemove" | "onRemove" | "onPreview" | "onSuccess" | "onProgress" | "onError" | "onExceed" | "crossorigin" | "action" | "headers" | "method" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "limit" | "onDownload" | "preview" | "tip", keyof T2>]: T2[k]; }[P]; }>;
|
|
182
186
|
export declare const emits: {
|
|
183
187
|
'update:fileList': any;
|
|
184
188
|
remove: (e: UploadFile) => UploadFile;
|
|
@@ -152,6 +152,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
152
152
|
type: StringConstructor;
|
|
153
153
|
default: any;
|
|
154
154
|
};
|
|
155
|
+
information: {
|
|
156
|
+
type: BooleanConstructor;
|
|
157
|
+
default: boolean;
|
|
158
|
+
};
|
|
155
159
|
label: StringConstructor;
|
|
156
160
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
157
161
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -372,6 +376,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
372
376
|
type: StringConstructor;
|
|
373
377
|
default: any;
|
|
374
378
|
};
|
|
379
|
+
information: {
|
|
380
|
+
type: BooleanConstructor;
|
|
381
|
+
default: boolean;
|
|
382
|
+
};
|
|
375
383
|
label: StringConstructor;
|
|
376
384
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
377
385
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -409,6 +417,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
409
417
|
formItemTip: string;
|
|
410
418
|
formItemTipClass: any;
|
|
411
419
|
labelTip: string;
|
|
420
|
+
information: boolean;
|
|
412
421
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
413
422
|
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
414
423
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
@@ -76,6 +76,10 @@ export declare const props: {
|
|
|
76
76
|
type: StringConstructor;
|
|
77
77
|
default: any;
|
|
78
78
|
};
|
|
79
|
+
information: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
79
83
|
label: StringConstructor;
|
|
80
84
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
81
85
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -59,6 +59,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
59
59
|
type: StringConstructor;
|
|
60
60
|
default: any;
|
|
61
61
|
};
|
|
62
|
+
information: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
62
66
|
label: StringConstructor;
|
|
63
67
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
64
68
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -195,6 +199,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
195
199
|
type: StringConstructor;
|
|
196
200
|
default: any;
|
|
197
201
|
};
|
|
202
|
+
information: {
|
|
203
|
+
type: BooleanConstructor;
|
|
204
|
+
default: boolean;
|
|
205
|
+
};
|
|
198
206
|
label: StringConstructor;
|
|
199
207
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
200
208
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -233,6 +241,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
233
241
|
formItemTip: string;
|
|
234
242
|
formItemTipClass: any;
|
|
235
243
|
labelTip: string;
|
|
244
|
+
information: boolean;
|
|
236
245
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
237
246
|
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
238
247
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
@@ -33,6 +33,10 @@ export declare const props: {
|
|
|
33
33
|
type: StringConstructor;
|
|
34
34
|
default: any;
|
|
35
35
|
};
|
|
36
|
+
information: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
36
40
|
label: StringConstructor;
|
|
37
41
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
38
42
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -35,6 +35,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
35
35
|
type: StringConstructor;
|
|
36
36
|
default: any;
|
|
37
37
|
};
|
|
38
|
+
information: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
38
42
|
label: StringConstructor;
|
|
39
43
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
40
44
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -178,6 +182,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
178
182
|
type: StringConstructor;
|
|
179
183
|
default: any;
|
|
180
184
|
};
|
|
185
|
+
information: {
|
|
186
|
+
type: BooleanConstructor;
|
|
187
|
+
default: boolean;
|
|
188
|
+
};
|
|
181
189
|
label: StringConstructor;
|
|
182
190
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
183
191
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -285,6 +293,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
285
293
|
formItemTip: string;
|
|
286
294
|
formItemTipClass: any;
|
|
287
295
|
labelTip: string;
|
|
296
|
+
information: boolean;
|
|
288
297
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
289
298
|
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
290
299
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
@@ -42,6 +42,10 @@ export declare const props: {
|
|
|
42
42
|
type: StringConstructor;
|
|
43
43
|
default: any;
|
|
44
44
|
};
|
|
45
|
+
information: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
45
49
|
label: StringConstructor;
|
|
46
50
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
47
51
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -44,6 +44,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
44
44
|
type: StringConstructor;
|
|
45
45
|
default: any;
|
|
46
46
|
};
|
|
47
|
+
information: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
47
51
|
label: StringConstructor;
|
|
48
52
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
49
53
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -124,6 +128,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
124
128
|
type: StringConstructor;
|
|
125
129
|
default: any;
|
|
126
130
|
};
|
|
131
|
+
information: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: boolean;
|
|
134
|
+
};
|
|
127
135
|
label: StringConstructor;
|
|
128
136
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
129
137
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -161,6 +169,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
161
169
|
formItemTip: string;
|
|
162
170
|
formItemTipClass: any;
|
|
163
171
|
labelTip: string;
|
|
172
|
+
information: boolean;
|
|
164
173
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
165
174
|
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
166
175
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
@@ -49,6 +49,10 @@ export declare const props: {
|
|
|
49
49
|
type: StringConstructor;
|
|
50
50
|
default: any;
|
|
51
51
|
};
|
|
52
|
+
information: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
52
56
|
label: StringConstructor;
|
|
53
57
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
54
58
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -49,6 +49,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
49
49
|
type: StringConstructor;
|
|
50
50
|
default: any;
|
|
51
51
|
};
|
|
52
|
+
information: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
52
56
|
label: StringConstructor;
|
|
53
57
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
54
58
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -135,6 +139,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
135
139
|
type: StringConstructor;
|
|
136
140
|
default: any;
|
|
137
141
|
};
|
|
142
|
+
information: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
138
146
|
label: StringConstructor;
|
|
139
147
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
140
148
|
labelPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "top" | "left" | "right", unknown, "", boolean>;
|
|
@@ -174,6 +182,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
174
182
|
formItemTip: string;
|
|
175
183
|
formItemTipClass: any;
|
|
176
184
|
labelTip: string;
|
|
185
|
+
information: boolean;
|
|
177
186
|
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
178
187
|
labelPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "top" | "left" | "right", unknown>;
|
|
179
188
|
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
package/composables/index.cjs
CHANGED
|
@@ -86,11 +86,7 @@ const useComputedReadonly = (props) => {
|
|
|
86
86
|
return readonly;
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
const
|
|
90
|
-
const templateInstances = vue.shallowReactive({});
|
|
91
|
-
vue.provide("vkTemplateInstances", templateInstances);
|
|
92
|
-
return templateInstances;
|
|
93
|
-
};
|
|
89
|
+
const PARENT_KEY = Symbol("PARENT_KEY");
|
|
94
90
|
const useTemplateInstances = () => {
|
|
95
91
|
const templateInstances = vue.inject(
|
|
96
92
|
"vkTemplateInstances",
|
|
@@ -98,6 +94,35 @@ const useTemplateInstances = () => {
|
|
|
98
94
|
);
|
|
99
95
|
return templateInstances;
|
|
100
96
|
};
|
|
97
|
+
const useTemplateInstancesContext = () => {
|
|
98
|
+
const templateInstances = useTemplateInstances();
|
|
99
|
+
const getParent = (ins) => {
|
|
100
|
+
return ins?.[PARENT_KEY];
|
|
101
|
+
};
|
|
102
|
+
const getTemplateInstance = (key) => {
|
|
103
|
+
let instance = templateInstances?.[key];
|
|
104
|
+
if (instance) return instance;
|
|
105
|
+
let parent = getParent(templateInstances);
|
|
106
|
+
while (parent) {
|
|
107
|
+
instance = parent?.[key];
|
|
108
|
+
if (instance) return instance;
|
|
109
|
+
parent = getParent(parent);
|
|
110
|
+
}
|
|
111
|
+
return null;
|
|
112
|
+
};
|
|
113
|
+
return {
|
|
114
|
+
templateInstances,
|
|
115
|
+
getTemplateInstance,
|
|
116
|
+
getParent
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
const initTemplateInstances = () => {
|
|
120
|
+
const perent = useTemplateInstances();
|
|
121
|
+
const templateInstances = vue.shallowReactive({});
|
|
122
|
+
templateInstances[PARENT_KEY] = perent;
|
|
123
|
+
vue.provide("vkTemplateInstances", templateInstances);
|
|
124
|
+
return templateInstances;
|
|
125
|
+
};
|
|
101
126
|
|
|
102
127
|
const initRendererData = (props, ctx) => {
|
|
103
128
|
const data = vue.computed(() => props.data);
|
|
@@ -133,3 +158,4 @@ exports.useForm = useForm;
|
|
|
133
158
|
exports.useRendererData = useRendererData;
|
|
134
159
|
exports.useSourceManager = useSourceManager;
|
|
135
160
|
exports.useTemplateInstances = useTemplateInstances;
|
|
161
|
+
exports.useTemplateInstancesContext = useTemplateInstancesContext;
|
package/composables/index.mjs
CHANGED
|
@@ -84,11 +84,7 @@ const useComputedReadonly = (props) => {
|
|
|
84
84
|
return readonly;
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
const
|
|
88
|
-
const templateInstances = shallowReactive({});
|
|
89
|
-
provide("vkTemplateInstances", templateInstances);
|
|
90
|
-
return templateInstances;
|
|
91
|
-
};
|
|
87
|
+
const PARENT_KEY = Symbol("PARENT_KEY");
|
|
92
88
|
const useTemplateInstances = () => {
|
|
93
89
|
const templateInstances = inject(
|
|
94
90
|
"vkTemplateInstances",
|
|
@@ -96,6 +92,35 @@ const useTemplateInstances = () => {
|
|
|
96
92
|
);
|
|
97
93
|
return templateInstances;
|
|
98
94
|
};
|
|
95
|
+
const useTemplateInstancesContext = () => {
|
|
96
|
+
const templateInstances = useTemplateInstances();
|
|
97
|
+
const getParent = (ins) => {
|
|
98
|
+
return ins?.[PARENT_KEY];
|
|
99
|
+
};
|
|
100
|
+
const getTemplateInstance = (key) => {
|
|
101
|
+
let instance = templateInstances?.[key];
|
|
102
|
+
if (instance) return instance;
|
|
103
|
+
let parent = getParent(templateInstances);
|
|
104
|
+
while (parent) {
|
|
105
|
+
instance = parent?.[key];
|
|
106
|
+
if (instance) return instance;
|
|
107
|
+
parent = getParent(parent);
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
templateInstances,
|
|
113
|
+
getTemplateInstance,
|
|
114
|
+
getParent
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
const initTemplateInstances = () => {
|
|
118
|
+
const perent = useTemplateInstances();
|
|
119
|
+
const templateInstances = shallowReactive({});
|
|
120
|
+
templateInstances[PARENT_KEY] = perent;
|
|
121
|
+
provide("vkTemplateInstances", templateInstances);
|
|
122
|
+
return templateInstances;
|
|
123
|
+
};
|
|
99
124
|
|
|
100
125
|
const initRendererData = (props, ctx) => {
|
|
101
126
|
const data = computed(() => props.data);
|
|
@@ -124,4 +149,4 @@ const useRendererData = () => {
|
|
|
124
149
|
return rendererData;
|
|
125
150
|
};
|
|
126
151
|
|
|
127
|
-
export { initRendererData, initTemplateInstances, useComputedReadonly, useForm, useRendererData, useSourceManager, useTemplateInstances };
|
|
152
|
+
export { initRendererData, initTemplateInstances, useComputedReadonly, useForm, useRendererData, useSourceManager, useTemplateInstances, useTemplateInstancesContext };
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { TemplateInstances } from '@vunk/form/shared';
|
|
2
|
-
export declare const initTemplateInstances: () => import("vue").ShallowReactive<TemplateInstances>;
|
|
3
2
|
export declare const useTemplateInstances: () => TemplateInstances;
|
|
3
|
+
export declare const useTemplateInstancesContext: () => {
|
|
4
|
+
templateInstances: TemplateInstances;
|
|
5
|
+
getTemplateInstance: (key: string) => import("vue").ComponentInternalInstance;
|
|
6
|
+
getParent: (ins: TemplateInstances | null) => any;
|
|
7
|
+
};
|
|
8
|
+
export declare const initTemplateInstances: () => import("vue").ShallowReactive<TemplateInstances>;
|
package/index.css
CHANGED
|
@@ -182,6 +182,9 @@
|
|
|
182
182
|
flex: 1;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
.vkf-form-item.is-information{
|
|
186
|
+
margin-bottom: 0;
|
|
187
|
+
}
|
|
185
188
|
.vkf-form-item--inline{
|
|
186
189
|
display: inline-flex;
|
|
187
190
|
}
|
|
@@ -202,6 +205,19 @@
|
|
|
202
205
|
display: none;
|
|
203
206
|
}
|
|
204
207
|
|
|
208
|
+
.vkf-information-templates-default-main .el-form-item__label {
|
|
209
|
+
color: var(--el-text-color-secondary);
|
|
210
|
+
font-weight: normal;
|
|
211
|
+
}
|
|
212
|
+
.vkf-information-templates-default-main .el-select__wrapper.el-select__wrapper {
|
|
213
|
+
padding: 0;
|
|
214
|
+
border: none;
|
|
215
|
+
box-shadow: none;
|
|
216
|
+
}
|
|
217
|
+
.vkf-information-templates-default-main .el-select__selected-item {
|
|
218
|
+
user-select: text;
|
|
219
|
+
}
|
|
220
|
+
|
|
205
221
|
.vkf-input-collection-options{
|
|
206
222
|
width: 100%;
|
|
207
223
|
display: flex;
|
|
@@ -294,6 +310,13 @@
|
|
|
294
310
|
display: none;
|
|
295
311
|
}
|
|
296
312
|
|
|
313
|
+
.vkf-tag-information__tag{
|
|
314
|
+
cursor: pointer;
|
|
315
|
+
}
|
|
316
|
+
.vkf-tag-information__tag + .vkf-tag-information__tag {
|
|
317
|
+
margin-left: 0.5em;
|
|
318
|
+
}
|
|
319
|
+
|
|
297
320
|
.vkf-flex {
|
|
298
321
|
display: flex;
|
|
299
322
|
}
|
package/index.d.ts
CHANGED
package/index.esm.js
CHANGED
|
@@ -21,6 +21,7 @@ export * from '@vunk/form/components/date-picker';
|
|
|
21
21
|
export * from '@vunk/form/components/button';
|
|
22
22
|
export * from '@vunk/form/components/cascader';
|
|
23
23
|
export * from '@vunk/form/components/input-link';
|
|
24
|
+
export * from '@vunk/form/components/information';
|
|
24
25
|
|
|
25
26
|
var Components = [
|
|
26
27
|
VkfForm,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vunk/form",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.esm.js",
|
|
6
6
|
"scripts": {
|
|
@@ -145,6 +145,11 @@
|
|
|
145
145
|
"types": "./components/template-instances-provider/index.d.ts",
|
|
146
146
|
"require": "./components/template-instances-provider/index.cjs"
|
|
147
147
|
},
|
|
148
|
+
"./components/tag-information": {
|
|
149
|
+
"import": "./components/tag-information/index.mjs",
|
|
150
|
+
"types": "./components/tag-information/index.d.ts",
|
|
151
|
+
"require": "./components/tag-information/index.cjs"
|
|
152
|
+
},
|
|
148
153
|
"./components/tables-select": {
|
|
149
154
|
"import": "./components/tables-select/index.mjs",
|
|
150
155
|
"types": "./components/tables-select/index.d.ts",
|
|
@@ -200,6 +205,16 @@
|
|
|
200
205
|
"types": "./components/input/index.d.ts",
|
|
201
206
|
"require": "./components/input/index.cjs"
|
|
202
207
|
},
|
|
208
|
+
"./components/information-templates-default": {
|
|
209
|
+
"import": "./components/information-templates-default/index.mjs",
|
|
210
|
+
"types": "./components/information-templates-default/index.d.ts",
|
|
211
|
+
"require": "./components/information-templates-default/index.cjs"
|
|
212
|
+
},
|
|
213
|
+
"./components/information": {
|
|
214
|
+
"import": "./components/information/index.mjs",
|
|
215
|
+
"types": "./components/information/index.d.ts",
|
|
216
|
+
"require": "./components/information/index.cjs"
|
|
217
|
+
},
|
|
203
218
|
"./components/form-item-renderer-template": {
|
|
204
219
|
"import": "./components/form-item-renderer-template/index.mjs",
|
|
205
220
|
"types": "./components/form-item-renderer-template/index.d.ts",
|
|
@@ -288,6 +303,9 @@
|
|
|
288
303
|
"./components/templates-layout/index.css": {
|
|
289
304
|
"import": "./components/templates-layout/index.css"
|
|
290
305
|
},
|
|
306
|
+
"./components/tag-information/index.css": {
|
|
307
|
+
"import": "./components/tag-information/index.css"
|
|
308
|
+
},
|
|
291
309
|
"./components/tables-select/index.css": {
|
|
292
310
|
"import": "./components/tables-select/index.css"
|
|
293
311
|
},
|
|
@@ -312,6 +330,9 @@
|
|
|
312
330
|
"./components/input-collection/index.css": {
|
|
313
331
|
"import": "./components/input-collection/index.css"
|
|
314
332
|
},
|
|
333
|
+
"./components/information-templates-default/index.css": {
|
|
334
|
+
"import": "./components/information-templates-default/index.css"
|
|
335
|
+
},
|
|
315
336
|
"./components/form-item/index.css": {
|
|
316
337
|
"import": "./components/form-item/index.css"
|
|
317
338
|
},
|
package/shared/types/index.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ import { Arrayable } from 'element-plus/es/utils';
|
|
|
4
4
|
import { ComponentInternalInstance, ComputedRef } from 'vue';
|
|
5
5
|
export * from './source';
|
|
6
6
|
export * from './source-manager';
|
|
7
|
-
export type TemplateInstances =
|
|
7
|
+
export type TemplateInstances = {
|
|
8
|
+
[key: string]: ComponentInternalInstance;
|
|
9
|
+
[key: symbol]: any;
|
|
10
|
+
};
|
|
8
11
|
export interface RendererData {
|
|
9
12
|
data: ComputedRef<NormalObject>;
|
|
10
13
|
emitSetData: (e: SetDataEvent) => void;
|