vft 0.0.442 → 0.0.445
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/attributes.json +1 -1
- package/dist/index.css +2 -2
- package/es/components/affix/affix.d.ts +1 -1
- package/es/components/affix/affix.vue.d.ts +3 -3
- package/es/components/affix/index.d.ts +6 -6
- package/es/components/autocomplete/autocomplete.vue.d.ts +22 -22
- package/es/components/autocomplete/index.d.ts +64 -64
- package/es/components/avatar/index.d.ts +3 -3
- package/es/components/button/button.vue.d.ts +1 -1
- package/es/components/button/index.d.ts +33 -33
- package/es/components/button/use-button.d.ts +1 -1
- package/es/components/cascader/cascader.d.ts +2 -2
- package/es/components/cascader/cascader.vue.d.ts +9 -9
- package/es/components/checkbox/index.d.ts +54 -54
- package/es/components/col/col.vue.d.ts +1 -1
- package/es/components/col/index.d.ts +9 -9
- package/es/components/collapse/collapse-item.vue.d.ts +1 -1
- package/es/components/color-picker/index.d.ts +12 -12
- package/es/components/config-provider/config-provider.vue.d.ts +1 -1
- package/es/components/config-provider/config-provider.vue2.js +8 -9
- package/es/components/date-picker/date-picker.d.ts +6 -6
- package/es/components/date-picker/index.d.ts +12 -12
- package/es/components/date-picker/props/date-picker.d.ts +2 -2
- package/es/components/divider/index.d.ts +3 -3
- package/es/components/dropdown/dropdown.vue.d.ts +2 -2
- package/es/components/dropdown/index.d.ts +39 -39
- package/es/components/form/index.d.ts +27 -27
- package/es/components/input/index.d.ts +13 -13
- package/es/components/input/input.vue.d.ts +4 -4
- package/es/components/input-number/index.d.ts +4 -4
- package/es/components/input-number/input-number.vue.d.ts +2 -2
- package/es/components/input-tag/input-tag.d.ts +1 -1
- package/es/components/input-tag/input-tag.vue.d.ts +9 -9
- package/es/components/md-container/md-container.vue2.js +15 -15
- package/es/components/message/message.vue.d.ts +1 -18
- package/es/components/message/message.vue2.js +62 -54
- package/es/components/message/types.d.ts +23 -7
- package/es/components/modal/index.d.ts +15 -15
- package/es/components/modal/modal.vue.d.ts +1 -1
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/popper/composables/use-content.d.ts +3 -3
- package/es/components/radio/index.d.ts +60 -60
- package/es/components/radio/radio.d.ts +1 -1
- package/es/components/radio/radio.vue.d.ts +5 -5
- package/es/components/search/index.d.ts +9 -9
- package/es/components/search/search.vue.d.ts +2 -2
- package/es/components/segmented/index.d.ts +6 -6
- package/es/components/segmented/segmented.d.ts +1 -1
- package/es/components/segmented/segmented.vue.d.ts +3 -3
- package/es/components/select/index.d.ts +45 -45
- package/es/components/select/select.vue.d.ts +45 -45
- package/es/components/select/useSelect.d.ts +36 -36
- package/es/components/slider/index.d.ts +2 -2
- package/es/components/slider/slider.vue.d.ts +2 -2
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/space.d.ts +4 -4
- package/es/components/steps/index.d.ts +3 -3
- package/es/components/super-form/component-map.js +25 -25
- package/es/components/super-form/index.d.ts +3 -3
- package/es/components/super-form/super-form-item.vue2.js +184 -184
- package/es/components/super-form/use/helper.js +34 -34
- package/es/components/super-form/use/use-auto-focus.js +4 -4
- package/es/components/super-form/use/use-form-events.js +56 -56
- package/es/components/switch/index.d.ts +21 -21
- package/es/components/switch/switch.vue.d.ts +3 -3
- package/es/components/table/table.vue.d.ts +1 -1
- package/es/components/table/table.vue2.js +18 -18
- package/es/components/tabs/index.d.ts +4 -4
- package/es/components/tabs/tabs.vue.d.ts +2 -2
- package/es/components/time-picker/common/picker-range-trigger.vue.d.ts +2 -2
- package/es/components/time-picker/common/picker.vue.d.ts +8 -8
- package/es/components/time-picker/common/props.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +12 -12
- package/es/components/time-picker/time-picker.d.ts +6 -6
- package/es/components/time-select/time-select.vue.d.ts +1 -1
- package/es/components/timeline/index.d.ts +6 -6
- package/es/components/tooltip/index.d.ts +5 -5
- package/es/components/tooltip/tooltip.vue.d.ts +2 -2
- package/es/components/tree/tree-node.vue.d.ts +39 -39
- package/es/components/upload/index.d.ts +18 -18
- package/es/components/verify-code/useImageVerify.js +1 -1
- package/es/components/verify-code/verify-code.vue2.js +16 -16
- package/es/hooks/use-popper/index.d.ts +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +28 -28
- package/es/utils/form-register.js +44 -44
- package/lib/components/affix/affix.d.ts +1 -1
- package/lib/components/affix/affix.vue.d.ts +3 -3
- package/lib/components/affix/index.d.ts +6 -6
- package/lib/components/autocomplete/autocomplete.vue.d.ts +22 -22
- package/lib/components/autocomplete/index.d.ts +64 -64
- package/lib/components/avatar/index.d.ts +3 -3
- package/lib/components/button/button.vue.d.ts +1 -1
- package/lib/components/button/index.d.ts +33 -33
- package/lib/components/button/use-button.d.ts +1 -1
- package/lib/components/cascader/cascader.d.ts +2 -2
- package/lib/components/cascader/cascader.vue.d.ts +9 -9
- package/lib/components/checkbox/index.d.ts +54 -54
- package/lib/components/col/col.vue.d.ts +1 -1
- package/lib/components/col/index.d.ts +9 -9
- package/lib/components/collapse/collapse-item.vue.d.ts +1 -1
- package/lib/components/color-picker/index.d.ts +12 -12
- package/lib/components/config-provider/config-provider.vue.d.ts +1 -1
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +6 -6
- package/lib/components/date-picker/index.d.ts +12 -12
- package/lib/components/date-picker/props/date-picker.d.ts +2 -2
- package/lib/components/divider/index.d.ts +3 -3
- package/lib/components/dropdown/dropdown.vue.d.ts +2 -2
- package/lib/components/dropdown/index.d.ts +39 -39
- package/lib/components/form/index.d.ts +27 -27
- package/lib/components/input/index.d.ts +13 -13
- package/lib/components/input/input.vue.d.ts +4 -4
- package/lib/components/input-number/index.d.ts +4 -4
- package/lib/components/input-number/input-number.vue.d.ts +2 -2
- package/lib/components/input-tag/input-tag.d.ts +1 -1
- package/lib/components/input-tag/input-tag.vue.d.ts +9 -9
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/message/message.vue.d.ts +1 -18
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/message/types.d.ts +23 -7
- package/lib/components/modal/index.d.ts +15 -15
- package/lib/components/modal/modal.vue.d.ts +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/popper/composables/use-content.d.ts +3 -3
- package/lib/components/radio/index.d.ts +60 -60
- package/lib/components/radio/radio.d.ts +1 -1
- package/lib/components/radio/radio.vue.d.ts +5 -5
- package/lib/components/search/index.d.ts +9 -9
- package/lib/components/search/search.vue.d.ts +2 -2
- package/lib/components/segmented/index.d.ts +6 -6
- package/lib/components/segmented/segmented.d.ts +1 -1
- package/lib/components/segmented/segmented.vue.d.ts +3 -3
- package/lib/components/select/index.d.ts +45 -45
- package/lib/components/select/select.vue.d.ts +45 -45
- package/lib/components/select/useSelect.d.ts +36 -36
- package/lib/components/slider/index.d.ts +2 -2
- package/lib/components/slider/slider.vue.d.ts +2 -2
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/space.d.ts +4 -4
- package/lib/components/steps/index.d.ts +3 -3
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/index.d.ts +3 -3
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/use-auto-focus.cjs +1 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/switch/index.d.ts +21 -21
- package/lib/components/switch/switch.vue.d.ts +3 -3
- package/lib/components/table/table.vue.d.ts +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/index.d.ts +4 -4
- package/lib/components/tabs/tabs.vue.d.ts +2 -2
- package/lib/components/time-picker/common/picker-range-trigger.vue.d.ts +2 -2
- package/lib/components/time-picker/common/picker.vue.d.ts +8 -8
- package/lib/components/time-picker/common/props.d.ts +2 -2
- package/lib/components/time-picker/index.d.ts +12 -12
- package/lib/components/time-picker/time-picker.d.ts +6 -6
- package/lib/components/time-select/time-select.vue.d.ts +1 -1
- package/lib/components/timeline/index.d.ts +6 -6
- package/lib/components/tooltip/index.d.ts +5 -5
- package/lib/components/tooltip/tooltip.vue.d.ts +2 -2
- package/lib/components/tree/tree-node.vue.d.ts +39 -39
- package/lib/components/upload/index.d.ts +18 -18
- package/lib/components/verify-code/useImageVerify.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/hooks/use-popper/index.d.ts +3 -3
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/form-register.cjs +1 -1
- package/lib/utils/form-register.d.ts +28 -28
- package/package.json +5 -5
- package/tags.json +1 -1
- package/theme-style/base.css +1 -1
- package/theme-style/dark/css-vars.css +1 -1
- package/theme-style/index.css +2 -2
- package/theme-style/src/common/var.scss +7 -7
- package/theme-style/src/dark/css-vars.scss +7 -1
- package/theme-style/src/icon.scss +1 -0
- package/theme-style/src/md-container.scss +1 -1
- package/theme-style/src/message.scss +8 -14
- package/theme-style/src/mixins/_var.scss +9 -0
- package/theme-style/src/var.scss +2 -1
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-icon.css +1 -1
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-message.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/theme-style/vft-var.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { isNumber as
|
|
2
|
-
import { isInput as
|
|
3
|
-
import { FormCompEnum as
|
|
1
|
+
import { isNumber as n } from "@vft/utils";
|
|
2
|
+
import { isInput as u } from "../component-map.js";
|
|
3
|
+
import { FormCompEnum as e } from "../../../utils/form-register.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "../../config-provider/hooks/use-global-config.js";
|
|
6
6
|
import "vue";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../../form/index.js";
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
].includes(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
].includes(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
].includes(
|
|
9
|
+
function l(r, i = "") {
|
|
10
|
+
return i = (i || "").replace(":", "") || "", [
|
|
11
|
+
e.Input,
|
|
12
|
+
e.InputNumber,
|
|
13
|
+
e.Textarea,
|
|
14
|
+
e.AutoComplete
|
|
15
|
+
].includes(r) ? "请输入" + i : [e.Password].includes(r) ? "请输入密码" : [
|
|
16
|
+
e.Select,
|
|
17
|
+
e.Radio,
|
|
18
|
+
e.RadioSingle,
|
|
19
|
+
e.RadioButton,
|
|
20
|
+
e.Cascader,
|
|
21
|
+
e.ColorPicker,
|
|
22
|
+
e.Checkbox,
|
|
23
|
+
e.CheckboxButton
|
|
24
|
+
].includes(r) ? "请选择" + i : [e.CheckboxSingle].includes(r) ? "请勾选" + i : [e.Search].includes(r) ? "请输入要搜索的内容" : [e.InputTag].includes(r) ? "请输入标签内容" : [e.Upload].includes(r) ? "请选择上传文件" : [e.Slider].includes(r) ? "请拖动滑块" : [
|
|
25
|
+
e.TimePicker,
|
|
26
|
+
e.YearPicker,
|
|
27
|
+
e.MonthPicker,
|
|
28
|
+
e.DatePicker,
|
|
29
|
+
e.DatesPicker,
|
|
30
|
+
e.DateTimePicker,
|
|
31
|
+
e.WeekPicker,
|
|
32
|
+
e.DateTimeRangePicker,
|
|
33
|
+
e.DateRangePicker,
|
|
34
|
+
e.MonthRangePicker
|
|
35
|
+
].includes(r) ? "请选择时间" : "";
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return
|
|
37
|
+
function k(r, i) {
|
|
38
|
+
return r && u(r) && i && n(i) ? `${i}` : i;
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
l as createPlaceholderMessage,
|
|
42
|
+
k as handleInputNumberValue
|
|
43
43
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FormCompEnum as
|
|
1
|
+
import { FormCompEnum as u } from "../../../utils/form-register.js";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../../config-provider/hooks/use-global-config.js";
|
|
5
|
-
import { watchEffect as
|
|
5
|
+
import { watchEffect as f, unref as t, nextTick as p } from "vue";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../form/index.js";
|
|
8
8
|
async function x({
|
|
@@ -11,12 +11,12 @@ async function x({
|
|
|
11
11
|
formElRef: m,
|
|
12
12
|
isInitedDefault: s
|
|
13
13
|
}) {
|
|
14
|
-
|
|
14
|
+
f(async () => {
|
|
15
15
|
if (t(s) || !t(c).autoFocusFirstItem)
|
|
16
16
|
return;
|
|
17
17
|
await p();
|
|
18
18
|
const r = t(n), o = t(m), i = o?.$el;
|
|
19
|
-
if (!o || !i || !r || r.length === 0 || r[0].type !==
|
|
19
|
+
if (!o || !i || !r || r.length === 0 || r[0].type !== u.Input)
|
|
20
20
|
return;
|
|
21
21
|
const e = i.querySelector(
|
|
22
22
|
".vft-row:first-child input"
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { FormCompEnum as j } from "../../../utils/form-register.js";
|
|
2
2
|
import "@vueuse/core";
|
|
3
|
-
import { isDef as H, isFunction as A, isString as x, isObject as
|
|
3
|
+
import { isDef as H, isFunction as A, isString as x, isObject as m, isArray as V, deepMerge as nt, findDifferentValuesForObj as rt, isNullOrUndefined as J, isEmpty as st, isEmptyObject as lt } from "@vft/utils";
|
|
4
4
|
import "../../config-provider/hooks/use-global-config.js";
|
|
5
5
|
import { unref as n, toRaw as S, nextTick as Q } from "vue";
|
|
6
|
-
import { get as ot, cloneDeep as
|
|
6
|
+
import { get as ot, cloneDeep as B, uniqBy as at, isEqual as ft, set as X } from "lodash-es";
|
|
7
7
|
import "../../form/index.js";
|
|
8
8
|
import { formatToDate as W } from "@vft/utils/date";
|
|
9
9
|
import { isInput as ct, isDatePicker as ut } from "../component-map.js";
|
|
10
10
|
import { handleInputNumberValue as dt } from "./helper.js";
|
|
11
|
-
function _(p,
|
|
11
|
+
function _(p, v) {
|
|
12
12
|
const { show: o, ifShow: f } = p;
|
|
13
13
|
let h = !0, c = !0;
|
|
14
14
|
return typeof o == "boolean" ? h = o : typeof o == "function" && (h = o({
|
|
15
15
|
field: p.field,
|
|
16
|
-
model:
|
|
16
|
+
model: v,
|
|
17
17
|
values: {
|
|
18
|
-
...
|
|
18
|
+
...v
|
|
19
19
|
},
|
|
20
20
|
schema: p
|
|
21
21
|
})), typeof f == "boolean" ? c = f : typeof f == "function" && (c = f({
|
|
22
22
|
field: p.field,
|
|
23
|
-
model:
|
|
23
|
+
model: v,
|
|
24
24
|
values: {
|
|
25
|
-
...
|
|
25
|
+
...v
|
|
26
26
|
},
|
|
27
27
|
schema: p
|
|
28
28
|
})), h && c;
|
|
29
29
|
}
|
|
30
|
-
function pt(p,
|
|
30
|
+
function pt(p, v = {}) {
|
|
31
31
|
const o = /^\[(.+)\]$/;
|
|
32
32
|
if (o.test(p)) {
|
|
33
33
|
const f = p.match(o);
|
|
@@ -36,13 +36,13 @@ function pt(p, y = {}) {
|
|
|
36
36
|
if (!h.length)
|
|
37
37
|
return;
|
|
38
38
|
const c = [];
|
|
39
|
-
return h.forEach((
|
|
40
|
-
X(c,
|
|
39
|
+
return h.forEach((y, O) => {
|
|
40
|
+
X(c, O, v[y.trim()]);
|
|
41
41
|
}), c.filter(Boolean).length ? c : void 0;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
function ht(p,
|
|
45
|
+
function ht(p, v = {}) {
|
|
46
46
|
const o = /^\{(.+)\}$/;
|
|
47
47
|
if (o.test(p)) {
|
|
48
48
|
const f = p.match(o);
|
|
@@ -51,32 +51,32 @@ function ht(p, y = {}) {
|
|
|
51
51
|
if (!h.length)
|
|
52
52
|
return;
|
|
53
53
|
const c = {};
|
|
54
|
-
return h.forEach((
|
|
55
|
-
X(c,
|
|
54
|
+
return h.forEach((y) => {
|
|
55
|
+
X(c, y.trim(), v[y.trim()]);
|
|
56
56
|
}), Object.values(c).filter(Boolean).length ? c : void 0;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Ot({
|
|
61
61
|
emit: p,
|
|
62
|
-
getProps:
|
|
62
|
+
getProps: v,
|
|
63
63
|
formModel: o,
|
|
64
64
|
getSchema: f,
|
|
65
65
|
defaultValueRef: h,
|
|
66
66
|
formElRef: c,
|
|
67
|
-
schemaRef:
|
|
68
|
-
handleFormValues:
|
|
67
|
+
schemaRef: y,
|
|
68
|
+
handleFormValues: O,
|
|
69
69
|
initValues: T
|
|
70
70
|
}) {
|
|
71
71
|
async function Y(t) {
|
|
72
|
-
const { resetFunc: e, submitOnReset: s } = n(
|
|
72
|
+
const { resetFunc: e, submitOnReset: s } = n(v);
|
|
73
73
|
e && A(e) && await e();
|
|
74
74
|
const r = n(c);
|
|
75
75
|
if (r) {
|
|
76
76
|
if (t?.length)
|
|
77
77
|
return r.resetFields(t);
|
|
78
78
|
Object.keys(o).forEach((a) => {
|
|
79
|
-
const l = n(f).find((u) => u.field === a), i =
|
|
79
|
+
const l = n(f).find((u) => u.field === a), i = B(h.value[a]);
|
|
80
80
|
o[a] = ct(l?.type) ? i || "" : i;
|
|
81
81
|
}), Q(() => D()), p("reset", S(o)), s && await U();
|
|
82
82
|
}
|
|
@@ -88,20 +88,20 @@ function Bt({
|
|
|
88
88
|
s.forEach((i) => {
|
|
89
89
|
const u = n(f).find((d) => d.field === i);
|
|
90
90
|
let b = ot(t, i);
|
|
91
|
-
const
|
|
91
|
+
const I = Reflect.has(t, i);
|
|
92
92
|
b = dt(u?.type, b);
|
|
93
93
|
const { componentProps: z } = u || {};
|
|
94
94
|
let w = z;
|
|
95
95
|
typeof z == "function" && (w = w({ formModel: n(o) }));
|
|
96
96
|
const G = pt(i, t) || ht(i, t);
|
|
97
|
-
if (
|
|
97
|
+
if (I || G) {
|
|
98
98
|
const d = G || b;
|
|
99
99
|
if (M(i))
|
|
100
100
|
if (Array.isArray(d)) {
|
|
101
|
-
const
|
|
101
|
+
const F = [];
|
|
102
102
|
for (const E of d)
|
|
103
|
-
|
|
104
|
-
n(o)[i] =
|
|
103
|
+
F.push(E ? W(E) : null);
|
|
104
|
+
n(o)[i] = F;
|
|
105
105
|
} else
|
|
106
106
|
n(o)[i] = d ? w?.valueFormat ? d : W(d) : null;
|
|
107
107
|
else
|
|
@@ -110,10 +110,10 @@ function Bt({
|
|
|
110
110
|
} else
|
|
111
111
|
a.forEach((d) => {
|
|
112
112
|
try {
|
|
113
|
-
const
|
|
114
|
-
H(
|
|
113
|
+
const F = d.split(".").reduce((E, it) => E[it], t);
|
|
114
|
+
H(F) && (n(o)[d] = n(F), l.push(d));
|
|
115
115
|
} catch {
|
|
116
|
-
H(h.value[d]) && (n(o)[d] =
|
|
116
|
+
H(h.value[d]) && (n(o)[d] = B(
|
|
117
117
|
n(h.value[d])
|
|
118
118
|
));
|
|
119
119
|
}
|
|
@@ -124,14 +124,14 @@ function Bt({
|
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
async function Z(t) {
|
|
127
|
-
const e =
|
|
127
|
+
const e = B(n(f));
|
|
128
128
|
if (!t)
|
|
129
129
|
return;
|
|
130
130
|
let s = x(t) ? [t] : t;
|
|
131
131
|
x(t) && (s = [t]);
|
|
132
132
|
for (const r of s)
|
|
133
133
|
L(r, e);
|
|
134
|
-
|
|
134
|
+
y.value = e;
|
|
135
135
|
}
|
|
136
136
|
function L(t, e) {
|
|
137
137
|
if (x(t)) {
|
|
@@ -140,29 +140,29 @@ function Bt({
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
async function K(t, e, s = !1) {
|
|
143
|
-
const r =
|
|
143
|
+
const r = B(n(f)), a = r.findIndex((i) => i.field === e), l = m(t) ? [t] : t;
|
|
144
144
|
if (!e || a === -1 || s) {
|
|
145
|
-
s ? r.unshift(...l) : r.push(...l),
|
|
145
|
+
s ? r.unshift(...l) : r.push(...l), y.value = r, g(t);
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
-
a !== -1 && r.splice(a + 1, 0, ...l),
|
|
148
|
+
a !== -1 && r.splice(a + 1, 0, ...l), g(t), y.value = r;
|
|
149
149
|
}
|
|
150
|
-
async function
|
|
150
|
+
async function k(t) {
|
|
151
151
|
let e = [];
|
|
152
|
-
if (
|
|
153
|
-
(r) => r.type === j.
|
|
152
|
+
if (m(t) && e.push(t), V(t) && (e = [...t]), !e.every(
|
|
153
|
+
(r) => r.type === j.Divider || Reflect.has(r, "field") && r.field
|
|
154
154
|
)) {
|
|
155
155
|
console.error(
|
|
156
156
|
"All children of the form Schema array that need to be updated must contain the `field` field"
|
|
157
157
|
);
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
y.value = e;
|
|
161
161
|
}
|
|
162
162
|
async function N(t) {
|
|
163
163
|
let e = [];
|
|
164
|
-
if (
|
|
165
|
-
(l) => l.type === j.
|
|
164
|
+
if (m(t) && e.push(t), V(t) && (e = [...t]), !e.every(
|
|
165
|
+
(l) => l.type === j.Divider || Reflect.has(l, "field") && l.field
|
|
166
166
|
)) {
|
|
167
167
|
console.error(
|
|
168
168
|
"All children of the form Schema array that need to be updated must contain the `field` field"
|
|
@@ -179,21 +179,21 @@ function Bt({
|
|
|
179
179
|
a.push(u);
|
|
180
180
|
} else
|
|
181
181
|
a.push(l);
|
|
182
|
-
}),
|
|
182
|
+
}), g(a, r), y.value = at(a, "field");
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
if (
|
|
184
|
+
function g(t, e, s = !0) {
|
|
185
|
+
if (V(e) && e?.length === 0)
|
|
186
186
|
return;
|
|
187
187
|
let r = [];
|
|
188
|
-
|
|
189
|
-
const a = {}, l =
|
|
188
|
+
m(t) && r.push(t), V(t) && (r = [...t]);
|
|
189
|
+
const a = {}, l = C();
|
|
190
190
|
r.forEach((i) => {
|
|
191
|
-
i.type !== j.
|
|
191
|
+
i.type !== j.Divider && Reflect.has(i, "field") && i.field && !J(i.defaultValue) && (!(i.field in l) || J(l[i.field]) || st(l[i.field])) && (a[i.field] = i.defaultValue);
|
|
192
192
|
}), lt(a) || q(a, s);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function C(t = !1) {
|
|
195
195
|
if (!n(c)) return {};
|
|
196
|
-
const s =
|
|
196
|
+
const s = O(S(n(o)));
|
|
197
197
|
if (t)
|
|
198
198
|
return s;
|
|
199
199
|
const r = n(f).filter((l) => _(l, n(o))).map((l) => l.field).filter(Boolean), a = {};
|
|
@@ -201,7 +201,7 @@ function Bt({
|
|
|
201
201
|
l in s && (a[l] = s[l]);
|
|
202
202
|
}), a;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function R(t) {
|
|
205
205
|
return n(c) ? S(n(o))[t] : {};
|
|
206
206
|
}
|
|
207
207
|
function M(t) {
|
|
@@ -224,9 +224,9 @@ function Bt({
|
|
|
224
224
|
await n(c)?.scrollToField(t, e);
|
|
225
225
|
}
|
|
226
226
|
async function U(t) {
|
|
227
|
-
const { autoCleanErrorMessage: e, watchDataIsChange: s } = n(
|
|
227
|
+
const { autoCleanErrorMessage: e, watchDataIsChange: s } = n(v);
|
|
228
228
|
t && t.preventDefault(), e && await D();
|
|
229
|
-
const { submitFunc: r, beforeSubmitFunc: a } = n(
|
|
229
|
+
const { submitFunc: r, beforeSubmitFunc: a } = n(v);
|
|
230
230
|
if (a && A(a) && await a(), r && A(r)) {
|
|
231
231
|
await r();
|
|
232
232
|
return;
|
|
@@ -235,10 +235,10 @@ function Bt({
|
|
|
235
235
|
try {
|
|
236
236
|
if (!await P())
|
|
237
237
|
return;
|
|
238
|
-
const u =
|
|
238
|
+
const u = C();
|
|
239
239
|
if (s) {
|
|
240
|
-
const b = ft(T.value, u),
|
|
241
|
-
p("submit", u, !b,
|
|
240
|
+
const b = ft(T.value, u), I = rt(T.value, u);
|
|
241
|
+
p("submit", u, !b, I);
|
|
242
242
|
} else
|
|
243
243
|
p("submit", u);
|
|
244
244
|
} catch (i) {
|
|
@@ -252,18 +252,18 @@ function Bt({
|
|
|
252
252
|
clearValidate: D,
|
|
253
253
|
validate: P,
|
|
254
254
|
validateField: $,
|
|
255
|
-
getFieldsValue:
|
|
255
|
+
getFieldsValue: C,
|
|
256
256
|
updateSchema: N,
|
|
257
|
-
resetSchema:
|
|
257
|
+
resetSchema: k,
|
|
258
258
|
appendSchemaByField: K,
|
|
259
259
|
removeSchemaByField: Z,
|
|
260
260
|
resetFields: Y,
|
|
261
261
|
setFieldsValue: q,
|
|
262
262
|
scrollToField: et,
|
|
263
|
-
getFieldValue:
|
|
263
|
+
getFieldValue: R,
|
|
264
264
|
setFormItemError: tt
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
267
|
export {
|
|
268
|
-
|
|
268
|
+
Ot as useFormEvents
|
|
269
269
|
};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
|
|
3
|
-
type: import("vue").PropType<
|
|
4
|
-
};
|
|
5
|
-
disabled: {
|
|
6
|
-
type: import("vue").PropType<boolean>;
|
|
2
|
+
value: {
|
|
3
|
+
type: import("vue").PropType<string | number | boolean>;
|
|
7
4
|
default: boolean;
|
|
8
5
|
};
|
|
9
6
|
width: {
|
|
10
7
|
type: import("vue").PropType<string | number>;
|
|
11
8
|
};
|
|
12
|
-
value: {
|
|
13
|
-
type: import("vue").PropType<string | number | boolean>;
|
|
14
|
-
default: boolean;
|
|
15
|
-
};
|
|
16
9
|
borderColor: {
|
|
17
10
|
type: import("vue").PropType<string>;
|
|
18
11
|
};
|
|
@@ -22,6 +15,13 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
|
|
|
22
15
|
id: {
|
|
23
16
|
type: import("vue").PropType<string>;
|
|
24
17
|
};
|
|
18
|
+
size: {
|
|
19
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
20
|
+
};
|
|
21
|
+
disabled: {
|
|
22
|
+
type: import("vue").PropType<boolean>;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
25
|
modelValue: {
|
|
26
26
|
type: import("vue").PropType<string | number | boolean>;
|
|
27
27
|
default: boolean;
|
|
@@ -74,24 +74,17 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
|
|
|
74
74
|
focus: () => void;
|
|
75
75
|
checked: import("vue").ComputedRef<boolean>;
|
|
76
76
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
77
|
-
input: (...args: any[]) => void;
|
|
78
77
|
"update:modelValue": (...args: any[]) => void;
|
|
79
78
|
change: (...args: any[]) => void;
|
|
79
|
+
input: (...args: any[]) => void;
|
|
80
80
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
81
|
-
|
|
82
|
-
type: import("vue").PropType<
|
|
83
|
-
};
|
|
84
|
-
disabled: {
|
|
85
|
-
type: import("vue").PropType<boolean>;
|
|
81
|
+
value: {
|
|
82
|
+
type: import("vue").PropType<string | number | boolean>;
|
|
86
83
|
default: boolean;
|
|
87
84
|
};
|
|
88
85
|
width: {
|
|
89
86
|
type: import("vue").PropType<string | number>;
|
|
90
87
|
};
|
|
91
|
-
value: {
|
|
92
|
-
type: import("vue").PropType<string | number | boolean>;
|
|
93
|
-
default: boolean;
|
|
94
|
-
};
|
|
95
88
|
borderColor: {
|
|
96
89
|
type: import("vue").PropType<string>;
|
|
97
90
|
};
|
|
@@ -101,6 +94,13 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
|
|
|
101
94
|
id: {
|
|
102
95
|
type: import("vue").PropType<string>;
|
|
103
96
|
};
|
|
97
|
+
size: {
|
|
98
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
99
|
+
};
|
|
100
|
+
disabled: {
|
|
101
|
+
type: import("vue").PropType<boolean>;
|
|
102
|
+
default: boolean;
|
|
103
|
+
};
|
|
104
104
|
modelValue: {
|
|
105
105
|
type: import("vue").PropType<string | number | boolean>;
|
|
106
106
|
default: boolean;
|
|
@@ -150,12 +150,12 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
|
|
|
150
150
|
type: import("vue").PropType<Function>;
|
|
151
151
|
};
|
|
152
152
|
}>> & Readonly<{
|
|
153
|
-
onInput?: ((...args: any[]) => any) | undefined;
|
|
154
153
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
155
154
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
155
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
|
156
156
|
}>, {
|
|
157
|
-
disabled: boolean;
|
|
158
157
|
value: boolean | string | number;
|
|
158
|
+
disabled: boolean;
|
|
159
159
|
modelValue: boolean | string | number;
|
|
160
160
|
loading: boolean;
|
|
161
161
|
validateEvent: boolean;
|
|
@@ -42,9 +42,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
42
42
|
*/
|
|
43
43
|
checked: import("vue").ComputedRef<boolean>;
|
|
44
44
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
|
-
input: (...args: any[]) => void;
|
|
46
45
|
"update:modelValue": (...args: any[]) => void;
|
|
47
46
|
change: (...args: any[]) => void;
|
|
47
|
+
input: (...args: any[]) => void;
|
|
48
48
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SwitchProps>, {
|
|
49
49
|
modelValue: boolean;
|
|
50
50
|
value: boolean;
|
|
@@ -55,12 +55,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
55
55
|
validateEvent: boolean;
|
|
56
56
|
loading: boolean;
|
|
57
57
|
}>>> & Readonly<{
|
|
58
|
-
onInput?: ((...args: any[]) => any) | undefined;
|
|
59
58
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
60
59
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
60
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
|
61
61
|
}>, {
|
|
62
|
-
disabled: boolean;
|
|
63
62
|
value: boolean | string | number;
|
|
63
|
+
disabled: boolean;
|
|
64
64
|
modelValue: boolean | string | number;
|
|
65
65
|
loading: boolean;
|
|
66
66
|
validateEvent: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PaginationProps } from 'vft/es/components/pagination';
|
|
2
2
|
import type { TableInstance, TableProps } from './types';
|
|
3
3
|
declare function setProps(props: Partial<TableProps>): void;
|
|
4
4
|
declare function __VLS_template(): {
|
|
@@ -21,8 +21,8 @@ import xe from "xe-utils";
|
|
|
21
21
|
import { PageSize as T } from "./constants.js";
|
|
22
22
|
import { useColumns as Se } from "./use/use-columns.js";
|
|
23
23
|
import { useDataSource as Be } from "./use/use-data-source.js";
|
|
24
|
-
import { useLoading as
|
|
25
|
-
import { usePagination as
|
|
24
|
+
import { useLoading as ze } from "./use/use-loading.js";
|
|
25
|
+
import { usePagination as Re } from "./use/use-pagination.js";
|
|
26
26
|
import { EmptyEnum as Pe } from "../empty/constants.js";
|
|
27
27
|
const De = {
|
|
28
28
|
"vft-loading-text": "加载中..."
|
|
@@ -390,17 +390,17 @@ const De = {
|
|
|
390
390
|
"zoom"
|
|
391
391
|
],
|
|
392
392
|
setup(_e, {
|
|
393
|
-
expose:
|
|
394
|
-
emit:
|
|
393
|
+
expose: O,
|
|
394
|
+
emit: V
|
|
395
395
|
}) {
|
|
396
|
-
const l =
|
|
396
|
+
const l = V, g = be("table"), A = ae(), b = s(), C = s(), E = s([]), d = s(), $ = te(), t = P(() => F($.props, e(d))), {
|
|
397
397
|
getLoading: q,
|
|
398
398
|
setLoading: G
|
|
399
|
-
} =
|
|
399
|
+
} = ze(t), {
|
|
400
400
|
getPaginationInfo: i,
|
|
401
401
|
setPagination: u,
|
|
402
402
|
getCurrentPage: I
|
|
403
|
-
} =
|
|
403
|
+
} = Re(t), {
|
|
404
404
|
getViewColumns: K,
|
|
405
405
|
setColumns: L
|
|
406
406
|
} = Se(t);
|
|
@@ -434,7 +434,7 @@ const De = {
|
|
|
434
434
|
getRawDataSource: k,
|
|
435
435
|
tableSearch: x
|
|
436
436
|
} = Be(t, {
|
|
437
|
-
tableData:
|
|
437
|
+
tableData: E,
|
|
438
438
|
setLoading: G,
|
|
439
439
|
getPaginationInfo: i,
|
|
440
440
|
setPagination: u
|
|
@@ -575,7 +575,7 @@ const De = {
|
|
|
575
575
|
});
|
|
576
576
|
const r = P(() => {
|
|
577
577
|
const a = e(w), o = {
|
|
578
|
-
...
|
|
578
|
+
...A,
|
|
579
579
|
...e(t),
|
|
580
580
|
columns: re(e(K)),
|
|
581
581
|
loading: e(q),
|
|
@@ -583,7 +583,7 @@ const De = {
|
|
|
583
583
|
...B
|
|
584
584
|
};
|
|
585
585
|
return ue && (o.maxHeight = e(t)?.maxHeight ? e(t)?.maxHeight : `${window.innerHeight - e(t)?.extraSysHeight - (t.value?.showPager ? t.value?.pageHeight || 40 : 0)}px`, o.minHeight = e(t)?.toolbarConfig?.custom ? 300 : e(t)?.minHeight), o;
|
|
586
|
-
}),
|
|
586
|
+
}), z = {
|
|
587
587
|
setPagination: u,
|
|
588
588
|
emit: l,
|
|
589
589
|
setProps: y,
|
|
@@ -599,14 +599,14 @@ const De = {
|
|
|
599
599
|
getRawDataSource: k,
|
|
600
600
|
tableSearch: x
|
|
601
601
|
};
|
|
602
|
-
l("register",
|
|
602
|
+
l("register", z);
|
|
603
603
|
const Q = {
|
|
604
604
|
field: "_filterTableData",
|
|
605
605
|
label: "",
|
|
606
|
-
type: pe.
|
|
607
|
-
componentProps: (
|
|
606
|
+
type: pe.Search,
|
|
607
|
+
componentProps: () => ({
|
|
608
608
|
onChange: (a) => {
|
|
609
|
-
|
|
609
|
+
R({
|
|
610
610
|
_filterTableData: a
|
|
611
611
|
});
|
|
612
612
|
}
|
|
@@ -630,15 +630,15 @@ const De = {
|
|
|
630
630
|
r.value?.formOptions,
|
|
631
631
|
["showActionForm", "addSearchAllSchema"]
|
|
632
632
|
// 'union' | 'intersection' | 'concat' | 'replace' = 'union'
|
|
633
|
-
), "replace")),
|
|
633
|
+
), "replace")), R = (a) => {
|
|
634
634
|
Reflect.has(a, "_filterTableData") && x(a._filterTableData), l("form-submit", a);
|
|
635
635
|
}, ee = () => {
|
|
636
636
|
v(k()), l("form-reset");
|
|
637
637
|
};
|
|
638
|
-
return
|
|
638
|
+
return O({
|
|
639
639
|
table: b,
|
|
640
640
|
pageRef: C,
|
|
641
|
-
...
|
|
641
|
+
...z
|
|
642
642
|
}), (a, o) => (m(), f(e(Ce), null, {
|
|
643
643
|
fallback: c(() => [p(e(we))]),
|
|
644
644
|
default: c(() => [D("div", {
|
|
@@ -650,7 +650,7 @@ const De = {
|
|
|
650
650
|
toolbarButtons: c(() => [h(a.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (m(), f(e(ve), {
|
|
651
651
|
key: 0,
|
|
652
652
|
onRegister: e(Z),
|
|
653
|
-
onSubmit:
|
|
653
|
+
onSubmit: R,
|
|
654
654
|
onReset: ee
|
|
655
655
|
}, null, 8, ["onRegister"])) : H("", !0), h(a.$slots, "toolbar-right")]),
|
|
656
656
|
empty: c(() => [h(a.$slots, "empty", {}, () => [p(e(ge), ie(se(r.value.emptyCfg)), null, 16)])]),
|
|
@@ -13,7 +13,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
13
13
|
type: import("vue").PropType<boolean>;
|
|
14
14
|
};
|
|
15
15
|
tabPosition: {
|
|
16
|
-
type: import("vue").PropType<"
|
|
16
|
+
type: import("vue").PropType<"left" | "right" | "bottom" | "top">;
|
|
17
17
|
};
|
|
18
18
|
beforeLeave: {
|
|
19
19
|
type: import("vue").PropType<Function>;
|
|
@@ -89,7 +89,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
89
89
|
tabChange: (name: string | number) => void;
|
|
90
90
|
tabRemove: (name: string | number) => void;
|
|
91
91
|
tabAdd: () => void;
|
|
92
|
-
edit: (paneName: string | number | undefined, action: "
|
|
92
|
+
edit: (paneName: string | number | undefined, action: "remove" | "add") => void;
|
|
93
93
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
94
94
|
closable: {
|
|
95
95
|
type: import("vue").PropType<boolean>;
|
|
@@ -104,7 +104,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
104
104
|
type: import("vue").PropType<boolean>;
|
|
105
105
|
};
|
|
106
106
|
tabPosition: {
|
|
107
|
-
type: import("vue").PropType<"
|
|
107
|
+
type: import("vue").PropType<"left" | "right" | "bottom" | "top">;
|
|
108
108
|
};
|
|
109
109
|
beforeLeave: {
|
|
110
110
|
type: import("vue").PropType<Function>;
|
|
@@ -178,7 +178,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
178
178
|
isFocusInsidePane: () => boolean | undefined;
|
|
179
179
|
}, index: number, ev: Event) => any) | undefined;
|
|
180
180
|
onTabChange?: ((name: string | number) => any) | undefined;
|
|
181
|
-
onEdit?: ((paneName: string | number | undefined, action: "
|
|
181
|
+
onEdit?: ((paneName: string | number | undefined, action: "remove" | "add") => any) | undefined;
|
|
182
182
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & {
|
|
183
183
|
TabPane: {
|
|
184
184
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|