@vunk/form 2.19.12 → 2.19.15
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/src/ctx.d.ts +14 -10
- package/components/api-tables-select/src/index.vue.d.ts +30 -21
- package/components/button/src/ctx.d.ts +4 -0
- package/components/button/src/index.vue.d.ts +18 -0
- package/components/card-input-collection/src/core.vue.d.ts +9 -0
- package/components/card-input-collection/src/ctx.d.ts +4 -0
- package/components/card-input-collection/src/index.vue.d.ts +9 -0
- package/components/cascader/src/ctx.d.ts +5 -1
- package/components/cascader/src/index.vue.d.ts +12 -3
- package/components/checkbox/src/ctx.d.ts +5 -1
- package/components/checkbox/src/index.vue.d.ts +19 -1
- package/components/collapse/index.cjs +1 -0
- package/components/collapse/index.d.ts +4 -0
- package/components/collapse/index.mjs +45 -0
- package/components/collapse/src/index.vue.d.ts +15 -0
- package/components/collapse/src/set-attrs.vue.d.ts +23 -0
- package/components/collapse-item/index.cjs +1 -0
- package/components/collapse-item/index.d.ts +6 -0
- package/components/collapse-item/index.mjs +63 -0
- package/components/collapse-item/src/ctx.d.ts +7 -0
- package/components/collapse-item/src/index.vue.d.ts +36 -0
- package/components/collapse-item/src/types.d.ts +1 -0
- package/components/collapse-item/src/use.d.ts +13 -0
- package/components/color-picker/src/ctx.d.ts +4 -0
- package/components/color-picker/src/index.vue.d.ts +10 -1
- package/components/date-picker/src/ctx.d.ts +5 -1
- package/components/date-picker/src/index.vue.d.ts +13 -4
- package/components/date-picker-range/src/ctx.d.ts +90 -86
- package/components/date-picker-range/src/index.vue.d.ts +198 -180
- package/components/dialog/src/ctx.d.ts +1 -1
- package/components/dialog-input-collection/src/ctx.d.ts +4 -0
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -1
- package/components/dialog-input-collection/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 +18 -0
- package/components/editable-text/src/ctx.d.ts +4 -0
- package/components/editable-text/src/index.vue.d.ts +9 -0
- package/components/el-slider/src/slider-core.vue.d.ts +2 -2
- package/components/esri-input-geojson/src/ctx.d.ts +5 -1
- package/components/esri-input-geojson/src/index.vue.d.ts +34 -6
- package/components/form/index.cjs +1 -1
- package/components/form/index.d.ts +1 -0
- package/components/form/index.mjs +115 -80
- package/components/form/src/index.vue.d.ts +1 -1
- package/components/form/src/types.d.ts +2 -1
- package/components/form/src/use.d.ts +206 -0
- package/components/form-item/index.cjs +1 -1
- package/components/form-item/index.mjs +103 -80
- package/components/form-item/src/core.vue.d.ts +4 -0
- package/components/form-item/src/ctx.d.ts +6 -1
- package/components/form-item/src/index.vue.d.ts +9 -0
- package/components/information-collection/src/ctx.d.ts +4 -0
- package/components/information-collection/src/index.vue.d.ts +9 -0
- package/components/information-tag/src/index.vue.d.ts +2 -2
- package/components/input/src/ctx.d.ts +5 -1
- package/components/input/src/index.vue.d.ts +21 -3
- package/components/input-array/src/ctx.d.ts +4 -0
- package/components/input-array/src/index.vue.d.ts +9 -0
- package/components/input-collection/src/core.vue.d.ts +9 -0
- package/components/input-collection/src/ctx.d.ts +4 -0
- package/components/input-collection/src/index.vue.d.ts +9 -0
- package/components/input-file/src/index.vue.d.ts +9 -0
- package/components/input-link/src/ctx.d.ts +4 -0
- package/components/input-link/src/index.vue.d.ts +31 -4
- package/components/input-number/src/ctx.d.ts +5 -1
- package/components/input-number/src/index.vue.d.ts +21 -3
- package/components/input-tag/src/ctx.d.ts +5 -1
- package/components/input-tag/src/index.vue.d.ts +25 -7
- package/components/monaco-editor/src/ctx.d.ts +4 -0
- package/components/monaco-editor/src/index.vue.d.ts +18 -0
- package/components/radio/src/ctx.d.ts +4 -0
- package/components/radio/src/index.vue.d.ts +21 -3
- package/components/radio/src/wraper.vue.d.ts +10 -1
- package/components/select/src/core.vue.d.ts +33 -15
- package/components/select/src/ctx.d.ts +5 -1
- package/components/select/src/index.vue.d.ts +15 -6
- package/components/slider/src/ctx.d.ts +4 -0
- package/components/slider/src/index.vue.d.ts +11 -2
- package/components/switch/src/ctx.d.ts +4 -0
- package/components/switch/src/index.vue.d.ts +9 -0
- package/components/tables-select/src/ctx.d.ts +5 -1
- package/components/tables-select/src/index.vue.d.ts +10 -1
- package/components/templates-default/src/index.vue.d.ts +218 -38
- package/components/templates-esri/src/index.vue.d.ts +34 -6
- package/components/templates-variant/src/index.vue.d.ts +198 -180
- package/components/time-picker/src/ctx.d.ts +5 -1
- package/components/time-picker/src/index.vue.d.ts +13 -4
- package/components/upload/src/ctx.d.ts +5 -1
- package/components/upload/src/index.vue.d.ts +18 -0
- package/components/upload/src/wraper.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 +12 -3
- package/components/var-datetime-picker/src/ctx.d.ts +4 -0
- package/components/var-datetime-picker/src/index.vue.d.ts +18 -0
- package/components/vditor/src/ctx.d.ts +4 -0
- package/components/vditor/src/index.vue.d.ts +18 -0
- package/composables/form-mitt/index.cjs +1 -0
- package/composables/form-mitt/index.d.ts +37 -0
- package/composables/form-mitt/index.mjs +41 -0
- package/composables/index.cjs +1 -1
- package/composables/index.d.ts +1 -0
- package/composables/index.mjs +16 -14
- package/package.json +19 -1
- package/shared/element-plus/ctx.d.ts +14 -13
- package/shared/element-plus/index.cjs +1 -1
- package/shared/element-plus/index.mjs +57 -56
package/composables/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { isRef as
|
|
1
|
+
import { isRef as E, ref as v, computed as i, unref as D, inject as d, watch as k, onBeforeUnmount as A, shallowReactive as B, provide as S } from "vue";
|
|
2
|
+
import { useFormMitt as J } from "@vunk/form/composables/form-mitt";
|
|
2
3
|
import { noop as K } from "@vunk/shared/function";
|
|
3
4
|
import { formContextKey as P } from "element-plus";
|
|
4
5
|
import { getValue as w, defaultIntoUndefined as R } from "@vunk/core";
|
|
5
6
|
const N = (e, n = {}) => {
|
|
6
|
-
|
|
7
|
+
E(e) || (e = v(e));
|
|
7
8
|
const a = {
|
|
8
9
|
...n,
|
|
9
10
|
slotsChildren: ["default"]
|
|
@@ -11,8 +12,8 @@ const N = (e, n = {}) => {
|
|
|
11
12
|
n.slotsChildren && a.slotsChildren.push(...n.slotsChildren);
|
|
12
13
|
const t = i(() => {
|
|
13
14
|
const c = {}, y = {}, g = {};
|
|
14
|
-
function p(
|
|
15
|
-
|
|
15
|
+
function p(T, h = []) {
|
|
16
|
+
T.forEach((s, I) => {
|
|
16
17
|
const u = [...h, I], f = {
|
|
17
18
|
source: s,
|
|
18
19
|
key: u,
|
|
@@ -40,10 +41,10 @@ const N = (e, n = {}) => {
|
|
|
40
41
|
getManagerInfoById: (c) => t.value.idRecord[c]
|
|
41
42
|
}
|
|
42
43
|
];
|
|
43
|
-
},
|
|
44
|
-
const n =
|
|
44
|
+
}, F = () => d("vkfFormVm", null), Y = (e) => {
|
|
45
|
+
const n = F();
|
|
45
46
|
return i(() => e.readonly ?? (n == null ? void 0 : n.props.readonly) ?? !1);
|
|
46
|
-
},
|
|
47
|
+
}, V = (e) => {
|
|
47
48
|
const n = v(0), a = i(() => {
|
|
48
49
|
n.value;
|
|
49
50
|
const r = e.value;
|
|
@@ -70,18 +71,18 @@ const N = (e, n = {}) => {
|
|
|
70
71
|
), A(() => t == null ? void 0 : t.disconnect()), a;
|
|
71
72
|
};
|
|
72
73
|
function _(e, n) {
|
|
73
|
-
const a =
|
|
74
|
+
const a = V(e), t = d(P, null);
|
|
74
75
|
return i(() => {
|
|
75
76
|
K(e.value);
|
|
76
77
|
const o = n.value ?? D(t == null ? void 0 : t.labelPosition);
|
|
77
78
|
return o === "start" ? a.value ? "right" : "left" : o === "end" ? a.value ? "left" : "right" : o;
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
|
-
const C = Symbol("PARENT_KEY"),
|
|
81
|
+
const C = Symbol("PARENT_KEY"), M = () => d(
|
|
81
82
|
"vkTemplateInstances",
|
|
82
83
|
null
|
|
83
84
|
), L = () => {
|
|
84
|
-
const e =
|
|
85
|
+
const e = M(), n = (t) => t == null ? void 0 : t[C];
|
|
85
86
|
return {
|
|
86
87
|
templateInstances: e,
|
|
87
88
|
getTemplateInstance: (t) => {
|
|
@@ -97,7 +98,7 @@ const C = Symbol("PARENT_KEY"), T = () => d(
|
|
|
97
98
|
getParent: n
|
|
98
99
|
};
|
|
99
100
|
}, O = () => {
|
|
100
|
-
const e =
|
|
101
|
+
const e = M(), n = B({});
|
|
101
102
|
return n[C] = e, S("vkTemplateInstances", n), n;
|
|
102
103
|
}, q = (e, n) => {
|
|
103
104
|
const a = i(() => e.data), r = {
|
|
@@ -120,10 +121,11 @@ export {
|
|
|
120
121
|
O as initTemplateInstances,
|
|
121
122
|
_ as useComputedLabelPosition,
|
|
122
123
|
Y as useComputedReadonly,
|
|
123
|
-
|
|
124
|
+
F as useForm,
|
|
125
|
+
J as useFormMitt,
|
|
124
126
|
z as useRendererData,
|
|
125
|
-
|
|
127
|
+
V as useRtl,
|
|
126
128
|
N as useSourceManager,
|
|
127
|
-
|
|
129
|
+
M as useTemplateInstances,
|
|
128
130
|
L as useTemplateInstancesContext
|
|
129
131
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vunk/form",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.esm.js",
|
|
6
6
|
"scripts": {
|
|
@@ -97,6 +97,11 @@
|
|
|
97
97
|
"types": "./composables/index.d.ts",
|
|
98
98
|
"require": "./composables/index.cjs"
|
|
99
99
|
},
|
|
100
|
+
"./composables/form-mitt": {
|
|
101
|
+
"import": "./composables/form-mitt/index.mjs",
|
|
102
|
+
"types": "./composables/form-mitt/index.d.ts",
|
|
103
|
+
"require": "./composables/form-mitt/index.cjs"
|
|
104
|
+
},
|
|
100
105
|
"./composables/element-plus": {
|
|
101
106
|
"import": "./composables/element-plus/index.mjs",
|
|
102
107
|
"types": "./composables/element-plus/index.d.ts",
|
|
@@ -337,6 +342,16 @@
|
|
|
337
342
|
"types": "./components/color-picker/index.d.ts",
|
|
338
343
|
"require": "./components/color-picker/index.cjs"
|
|
339
344
|
},
|
|
345
|
+
"./components/collapse-item": {
|
|
346
|
+
"import": "./components/collapse-item/index.mjs",
|
|
347
|
+
"types": "./components/collapse-item/index.d.ts",
|
|
348
|
+
"require": "./components/collapse-item/index.cjs"
|
|
349
|
+
},
|
|
350
|
+
"./components/collapse": {
|
|
351
|
+
"import": "./components/collapse/index.mjs",
|
|
352
|
+
"types": "./components/collapse/index.d.ts",
|
|
353
|
+
"require": "./components/collapse/index.cjs"
|
|
354
|
+
},
|
|
340
355
|
"./components/checkbox": {
|
|
341
356
|
"import": "./components/checkbox/index.mjs",
|
|
342
357
|
"types": "./components/checkbox/index.d.ts",
|
|
@@ -491,6 +506,9 @@
|
|
|
491
506
|
"./components/color-picker/src/types": {
|
|
492
507
|
"types": "./components/color-picker/src/types.d.ts"
|
|
493
508
|
},
|
|
509
|
+
"./components/collapse-item/src/types": {
|
|
510
|
+
"types": "./components/collapse-item/src/types.d.ts"
|
|
511
|
+
},
|
|
494
512
|
"./components/checkbox/src/types": {
|
|
495
513
|
"types": "./components/checkbox/src/types.d.ts"
|
|
496
514
|
},
|