vft 0.0.119 → 0.0.121

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.
Files changed (81) hide show
  1. package/attributes.json +1 -1
  2. package/es/component.js +25 -23
  3. package/es/components/backtop/backtop.vue2.js +3 -2
  4. package/es/components/button/button.vue2.js +21 -21
  5. package/es/components/context-menu/context-menu.vue2.js +3 -2
  6. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +53 -57
  7. package/es/components/footer-layout/footer-layout.vue2.js +3 -2
  8. package/es/components/header-layout/header-layout.vue2.js +3 -2
  9. package/es/components/index.js +269 -261
  10. package/es/components/md-container/md-container.vue2.js +3 -2
  11. package/es/components/menu/menu-item.vue2.js +3 -2
  12. package/es/components/menu/sub-menu.vue2.js +3 -2
  13. package/es/components/message/message.vue2.js +12 -12
  14. package/es/components/modal/index.js +15 -0
  15. package/es/components/modal/modal.vue.js +4 -0
  16. package/es/components/modal/modal.vue2.js +92 -0
  17. package/es/components/modal/style/css.js +4 -0
  18. package/es/components/modal/style/index.js +4 -0
  19. package/es/components/modal/use/use-modal.js +95 -0
  20. package/es/components/multiple-tabs/multiple-tabs.vue2.js +15 -14
  21. package/es/components/multiple-tabs/tab-content.vue2.js +11 -12
  22. package/es/components/multiple-tabs/use/use-multiple-tabs.js +22 -23
  23. package/es/components/result/result.vue2.js +3 -2
  24. package/es/components/side-menu/side-menu.vue2.js +26 -25
  25. package/es/components/super-form/component-map.js +24 -23
  26. package/es/components/super-form/super-form-action.vue2.js +28 -29
  27. package/es/components/super-form/super-form-item.vue2.js +132 -123
  28. package/es/components/super-form/super-form.vue2.js +139 -136
  29. package/es/components/super-form/use/use-form-events.js +144 -139
  30. package/es/components/table/field.js +90 -52
  31. package/es/components/table/index.js +15 -12
  32. package/es/components/table/types.js +1 -0
  33. package/es/components/tabs/tab-nav.vue2.js +3 -2
  34. package/es/components/upload/upload-content.vue2.js +2 -2
  35. package/es/components/upload/upload.vue2.js +40 -49
  36. package/es/index.js +354 -346
  37. package/es/package.json.js +1 -1
  38. package/lib/component.cjs +1 -1
  39. package/lib/components/backtop/backtop.vue2.cjs +1 -1
  40. package/lib/components/button/button.vue2.cjs +1 -1
  41. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  42. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  43. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  44. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  45. package/lib/components/index.cjs +1 -1
  46. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  47. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  48. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  49. package/lib/components/message/message.vue2.cjs +1 -1
  50. package/lib/components/modal/index.cjs +1 -0
  51. package/lib/components/modal/modal.vue.cjs +1 -0
  52. package/lib/components/modal/modal.vue2.cjs +1 -0
  53. package/lib/components/modal/style/css.cjs +1 -0
  54. package/lib/components/modal/style/index.cjs +1 -0
  55. package/lib/components/modal/use/use-modal.cjs +1 -0
  56. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  57. package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
  58. package/lib/components/multiple-tabs/use/use-multiple-tabs.cjs +1 -1
  59. package/lib/components/result/result.vue2.cjs +1 -1
  60. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  61. package/lib/components/super-form/component-map.cjs +1 -1
  62. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  63. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  64. package/lib/components/super-form/super-form.vue2.cjs +1 -1
  65. package/lib/components/super-form/use/use-form-events.cjs +1 -1
  66. package/lib/components/table/field.cjs +1 -1
  67. package/lib/components/table/index.cjs +1 -1
  68. package/lib/components/table/types.cjs +1 -0
  69. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  70. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  71. package/lib/components/upload/upload.vue2.cjs +1 -1
  72. package/lib/index.cjs +1 -1
  73. package/lib/package.json.cjs +1 -1
  74. package/package.json +3 -3
  75. package/tags.json +1 -1
  76. package/theme-style/src/index.scss +1 -0
  77. package/theme-style/src/modal.scss +0 -0
  78. package/theme-style/vft-modal.css +0 -0
  79. package/web-types.json +1 -1
  80. /package/es/components/{table/type.js → modal/types.js} +0 -0
  81. /package/lib/components/{table/type.cjs → modal/types.cjs} +0 -0
@@ -1,124 +1,125 @@
1
- import { unref as c, nextTick as k, toRaw as A } from "vue";
2
- import { isFunction as B, formatToDate as q, isDef as U, isString as j, isObject as b, isArray as I, deepMerge as M, isNullOrUndefined as z, isEmpty as tt, isEmptyObject as nt } from "@vft/utils";
3
- import { handleInputNumberValue as et } from "./helper.js";
4
- import { cloneDeep as V, get as it, uniqBy as ct, set as G } from "lodash";
5
- import { isInput as ot, FormCompEnum as x, isDatePicker as rt } from "../component-map.js";
6
- function st(y, F = {}) {
7
- const s = /^\[(.+)\]$/;
8
- if (s.test(y)) {
9
- const l = y.match(s);
10
- if (l && l[1]) {
11
- const v = l[1].split(",");
12
- if (!v.length)
1
+ import { unref as c, nextTick as M, toRaw as B } from "vue";
2
+ import { isFunction as g, formatToDate as U, isDef as z, isString as j, isObject as m, isArray as I, deepMerge as tt, isNullOrUndefined as G, isEmpty as nt, isEmptyObject as et } from "@vft/utils";
3
+ import { handleInputNumberValue as it } from "./helper.js";
4
+ import { cloneDeep as w, get as ct, uniqBy as ot, isEqual as rt, set as H } from "lodash";
5
+ import { isInput as st, FormCompEnum as x, isDatePicker as at } from "../component-map.js";
6
+ function ut(v, F = {}) {
7
+ const a = /^\[(.+)\]$/;
8
+ if (a.test(v)) {
9
+ const d = v.match(a);
10
+ if (d && d[1]) {
11
+ const y = d[1].split(",");
12
+ if (!y.length)
13
13
  return;
14
14
  const f = [];
15
- return v.forEach((p, m) => {
16
- G(f, m, F[p.trim()]);
15
+ return y.forEach((p, D) => {
16
+ H(f, D, F[p.trim()]);
17
17
  }), f.filter(Boolean).length ? f : void 0;
18
18
  }
19
19
  }
20
20
  }
21
- function ft(y, F = {}) {
22
- const s = /^\{(.+)\}$/;
23
- if (s.test(y)) {
24
- const l = y.match(s);
25
- if (l && l[1]) {
26
- const v = l[1].split(",");
27
- if (!v.length)
21
+ function ft(v, F = {}) {
22
+ const a = /^\{(.+)\}$/;
23
+ if (a.test(v)) {
24
+ const d = v.match(a);
25
+ if (d && d[1]) {
26
+ const y = d[1].split(",");
27
+ if (!y.length)
28
28
  return;
29
29
  const f = {};
30
- return v.forEach((p) => {
31
- G(f, p.trim(), F[p.trim()]);
30
+ return y.forEach((p) => {
31
+ H(f, p.trim(), F[p.trim()]);
32
32
  }), Object.values(f).filter(Boolean).length ? f : void 0;
33
33
  }
34
34
  }
35
35
  }
36
- function pt({
37
- emit: y,
36
+ function yt({
37
+ emit: v,
38
38
  getProps: F,
39
- formModel: s,
40
- getSchema: l,
41
- defaultValueRef: v,
39
+ formModel: a,
40
+ getSchema: d,
41
+ defaultValueRef: y,
42
42
  formElRef: f,
43
43
  schemaRef: p,
44
- handleFormValues: m
44
+ handleFormValues: D,
45
+ initValues: J
45
46
  }) {
46
- async function H(t) {
47
- const { resetFunc: e, submitOnReset: o } = c(F);
48
- e && B(e) && await e();
47
+ async function P(t) {
48
+ const { resetFunc: n, submitOnReset: s } = c(F);
49
+ n && g(n) && await n();
49
50
  const i = c(f);
50
51
  if (i) {
51
52
  if (t != null && t.length)
52
53
  return i.resetFields(t);
53
- Object.keys(s).forEach((r) => {
54
- const n = c(l).find((d) => d.field === r), u = V(v.value[r]);
55
- s[r] = ot(n == null ? void 0 : n.component) ? u || "" : u;
56
- }), k(() => O()), y("reset", A(s)), o && C();
54
+ Object.keys(a).forEach((o) => {
55
+ const e = c(d).find((u) => u.field === o), r = w(y.value[o]);
56
+ a[o] = st(e == null ? void 0 : e.component) ? r || "" : r;
57
+ }), M(() => O()), v("reset", B(a)), s && q();
57
58
  }
58
59
  }
59
60
  async function S(t) {
60
- const e = c(l).map((n) => n.field).filter(Boolean), o = ".", i = e.filter((n) => String(n).indexOf(o) >= 0), r = [];
61
- e.forEach((n) => {
62
- const u = c(l).find((a) => a.field === n);
63
- let d = it(t, n);
64
- const K = Reflect.has(t, n);
65
- d = et(u == null ? void 0 : u.component, d);
66
- const { componentProps: N } = u || {};
61
+ const n = c(d).map((e) => e.field).filter(Boolean), s = ".", i = n.filter((e) => String(e).indexOf(s) >= 0), o = [];
62
+ n.forEach((e) => {
63
+ const r = c(d).find((l) => l.field === e);
64
+ let u = ct(t, e);
65
+ const A = Reflect.has(t, e);
66
+ u = it(r == null ? void 0 : r.component, u);
67
+ const { componentProps: N } = r || {};
67
68
  let h = N;
68
- typeof N == "function" && (h = h({ formModel: c(s) }));
69
- const $ = st(n, t) || ft(n, t);
70
- if (K || $) {
71
- const a = $ || d;
72
- if (Z(n))
73
- if (Array.isArray(a)) {
69
+ typeof N == "function" && (h = h({ formModel: c(a) }));
70
+ const $ = ut(e, t) || ft(e, t);
71
+ if (A || $) {
72
+ const l = $ || u;
73
+ if (K(e))
74
+ if (Array.isArray(l)) {
74
75
  const E = [];
75
- for (const D of a)
76
- E.push(D ? q(D) : null);
77
- c(s)[n] = E;
76
+ for (const b of l)
77
+ E.push(b ? U(b) : null);
78
+ c(a)[e] = E;
78
79
  } else
79
- c(s)[n] = a ? h != null && h.valueFormat ? a : q(a) : null;
80
+ c(a)[e] = l ? h != null && h.valueFormat ? l : U(l) : null;
80
81
  else
81
- c(s)[n] = a;
82
- h != null && h.onChange && (h == null || h.onChange(a)), r.push(n);
82
+ c(a)[e] = l;
83
+ h != null && h.onChange && (h == null || h.onChange(l)), o.push(e);
83
84
  } else
84
- i.forEach((a) => {
85
+ i.forEach((l) => {
85
86
  try {
86
- const E = a.split(".").reduce((D, R) => D[R], t);
87
- U(E) && (c(s)[a] = c(E), r.push(a));
87
+ const E = l.split(".").reduce((b, k) => b[k], t);
88
+ z(E) && (c(a)[l] = c(E), o.push(l));
88
89
  } catch {
89
- U(v.value[a]) && (c(s)[a] = V(c(v.value[a])));
90
+ z(y.value[l]) && (c(a)[l] = w(c(y.value[l])));
90
91
  }
91
92
  });
92
- }), await g(r).catch((n) => {
93
+ }), await C(o).catch((e) => {
93
94
  });
94
95
  }
95
- async function J(t) {
96
- const e = V(c(l));
96
+ async function Q(t) {
97
+ const n = w(c(d));
97
98
  if (!t)
98
99
  return;
99
- let o = j(t) ? [t] : t;
100
- j(t) && (o = [t]);
101
- for (const i of o)
102
- P(i, e);
103
- p.value = e;
100
+ let s = j(t) ? [t] : t;
101
+ j(t) && (s = [t]);
102
+ for (const i of s)
103
+ W(i, n);
104
+ p.value = n;
104
105
  }
105
- function P(t, e) {
106
+ function W(t, n) {
106
107
  if (j(t)) {
107
- const o = e.findIndex((i) => i.field === t);
108
- o !== -1 && (delete s[t], e.splice(o, 1));
108
+ const s = n.findIndex((i) => i.field === t);
109
+ s !== -1 && (delete a[t], n.splice(s, 1));
109
110
  }
110
111
  }
111
- async function Q(t, e, o = !1) {
112
- const i = V(c(l)), r = i.findIndex((u) => u.field === e), n = b(t) ? [t] : t;
113
- if (!e || r === -1 || o) {
114
- o ? i.unshift(...n) : i.push(...n), p.value = i, w(t);
112
+ async function X(t, n, s = !1) {
113
+ const i = w(c(d)), o = i.findIndex((r) => r.field === n), e = m(t) ? [t] : t;
114
+ if (!n || o === -1 || s) {
115
+ s ? i.unshift(...e) : i.push(...e), p.value = i, V(t);
115
116
  return;
116
117
  }
117
- r !== -1 && i.splice(r + 1, 0, ...n), w(t), p.value = i;
118
+ o !== -1 && i.splice(o + 1, 0, ...e), V(t), p.value = i;
118
119
  }
119
- async function W(t) {
120
- let e = [];
121
- if (b(t) && e.push(t), I(t) && (e = [...t]), !e.every(
120
+ async function Y(t) {
121
+ let n = [];
122
+ if (m(t) && n.push(t), I(t) && (n = [...t]), !n.every(
122
123
  (i) => i.component === x.DIVIDER || Reflect.has(i, "field") && i.field
123
124
  )) {
124
125
  console.error(
@@ -126,99 +127,103 @@ function pt({
126
127
  );
127
128
  return;
128
129
  }
129
- p.value = e;
130
+ p.value = n;
130
131
  }
131
- async function X(t) {
132
- let e = [];
133
- if (b(t) && e.push(t), I(t) && (e = [...t]), !e.every(
134
- (n) => n.component === x.DIVIDER || Reflect.has(n, "field") && n.field
132
+ async function Z(t) {
133
+ let n = [];
134
+ if (m(t) && n.push(t), I(t) && (n = [...t]), !n.every(
135
+ (e) => e.component === x.DIVIDER || Reflect.has(e, "field") && e.field
135
136
  )) {
136
137
  console.error(
137
138
  "All children of the form Schema array that need to be updated must contain the `field` field"
138
139
  );
139
140
  return;
140
141
  }
141
- const i = [], r = [];
142
- c(l).forEach((n) => {
143
- let u;
144
- if (e.forEach((d) => {
145
- n.field === d.field && (u = d), d.defaultValue && d.field && i.push(d.field);
146
- }), u !== void 0 && n.field === u.field) {
147
- const d = M(n, u);
148
- r.push(d);
142
+ const i = [], o = [];
143
+ c(d).forEach((e) => {
144
+ let r;
145
+ if (n.forEach((u) => {
146
+ e.field === u.field && (r = u), u.defaultValue && u.field && i.push(u.field);
147
+ }), r !== void 0 && e.field === r.field) {
148
+ const u = tt(e, r);
149
+ o.push(u);
149
150
  } else
150
- r.push(n);
151
- }), w(r, i), p.value = ct(r, "field");
151
+ o.push(e);
152
+ }), V(o, i), p.value = ot(o, "field");
152
153
  }
153
- function w(t, e) {
154
- if (I(e) && (e == null ? void 0 : e.length) === 0)
154
+ function V(t, n) {
155
+ if (I(n) && (n == null ? void 0 : n.length) === 0)
155
156
  return;
156
- let o = [];
157
- b(t) && o.push(t), I(t) && (o = [...t]);
158
- const i = {}, r = T();
159
- o.forEach((n) => {
160
- n.component !== x.DIVIDER && Reflect.has(n, "field") && n.field && !z(n.defaultValue) && (!(n.field in r) || z(r[n.field]) || tt(r[n.field])) && (i[n.field] = n.defaultValue);
161
- }), nt(i) || S(i);
157
+ let s = [];
158
+ m(t) && s.push(t), I(t) && (s = [...t]);
159
+ const i = {}, o = T();
160
+ s.forEach((e) => {
161
+ e.component !== x.DIVIDER && Reflect.has(e, "field") && e.field && !G(e.defaultValue) && (!(e.field in o) || G(o[e.field]) || nt(o[e.field])) && (i[e.field] = e.defaultValue);
162
+ }), et(i) || S(i);
162
163
  }
163
164
  function T() {
164
- return c(f) ? m(A(c(s))) : {};
165
+ return c(f) ? D(B(c(a))) : {};
165
166
  }
166
- function Y(t) {
167
- return c(f) ? A(c(s))[t] : {};
167
+ function _(t) {
168
+ return c(f) ? B(c(a))[t] : {};
168
169
  }
169
- function Z(t) {
170
- return c(l).some((e) => e.field === t ? rt(e.component) : !1);
170
+ function K(t) {
171
+ return c(d).some((n) => n.field === t ? at(n.component) : !1);
171
172
  }
172
- async function g(t) {
173
- var e;
174
- return (e = c(f)) == null ? void 0 : e.validateField(t);
173
+ async function C(t) {
174
+ var n;
175
+ return (n = c(f)) == null ? void 0 : n.validateField(t);
175
176
  }
176
177
  async function L(t) {
177
- var e;
178
- return await ((e = c(f)) == null ? void 0 : e.validate(t));
178
+ var n;
179
+ return await ((n = c(f)) == null ? void 0 : n.validate(t));
179
180
  }
180
181
  async function O(t) {
181
- var e;
182
- await ((e = c(f)) == null ? void 0 : e.clearValidate(t));
183
- }
184
- async function _(t, e) {
185
- var o;
186
- await ((o = c(f)) == null ? void 0 : o.scrollToField(t, e));
187
- }
188
- async function C(t) {
189
- const { autoCleanErrorMessage: e } = c(F);
190
- t && t.preventDefault(), e && await O();
191
- const { submitFunc: o, beforeSubmitFunc: i } = c(F);
192
- if (i && B(i) && await i(), o && B(o)) {
193
- await o();
182
+ var n;
183
+ await ((n = c(f)) == null ? void 0 : n.clearValidate(t));
184
+ }
185
+ async function R(t, n) {
186
+ var s;
187
+ await ((s = c(f)) == null ? void 0 : s.scrollToField(t, n));
188
+ }
189
+ async function q(t) {
190
+ const { autoCleanErrorMessage: n, watchDataIsChange: s } = c(F);
191
+ t && t.preventDefault(), n && await O();
192
+ const { submitFunc: i, beforeSubmitFunc: o } = c(F);
193
+ if (o && g(o) && await o(), i && g(i)) {
194
+ await i();
194
195
  return;
195
196
  }
196
197
  if (c(f))
197
198
  try {
198
- const n = await L(), u = m(n);
199
- y("submit", u);
200
- } catch (n) {
201
- if ((n == null ? void 0 : n.outOfDate) === !1 && (n != null && n.errorFields))
199
+ const r = await L(), u = D(r);
200
+ if (s) {
201
+ const A = rt(J.value, u);
202
+ v("submit", u, !A);
203
+ } else
204
+ v("submit", u);
205
+ } catch (r) {
206
+ if ((r == null ? void 0 : r.outOfDate) === !1 && (r != null && r.errorFields))
202
207
  return;
203
- throw new Error(n.message);
208
+ throw new Error(r.message);
204
209
  }
205
210
  }
206
211
  return {
207
- handleSubmit: C,
212
+ handleSubmit: q,
208
213
  clearValidate: O,
209
214
  validate: L,
210
- validateField: g,
215
+ validateField: C,
211
216
  getFieldsValue: T,
212
- updateSchema: X,
213
- resetSchema: W,
214
- appendSchemaByField: Q,
215
- removeSchemaByField: J,
216
- resetFields: H,
217
+ updateSchema: Z,
218
+ resetSchema: Y,
219
+ appendSchemaByField: X,
220
+ removeSchemaByField: Q,
221
+ resetFields: P,
217
222
  setFieldsValue: S,
218
- scrollToField: _,
219
- getFieldValue: Y
223
+ scrollToField: R,
224
+ getFieldValue: _
220
225
  };
221
226
  }
222
227
  export {
223
- pt as useFormEvents
228
+ yt as useFormEvents
224
229
  };
@@ -1,5 +1,5 @@
1
- import { createVNode as o, Fragment as d, isVNode as u } from "vue";
2
- import { formatToDateTime as a } from "@vft/utils";
1
+ import { createVNode as e, Fragment as f, isVNode as D } from "vue";
2
+ import { formatToDateTime as u } from "@vft/utils";
3
3
  import "../divider/index.js";
4
4
  import "../icon/index.js";
5
5
  import "../avatar/index.js";
@@ -38,7 +38,7 @@ import "../page-wrapper/index.js";
38
38
  import "../exception/index.js";
39
39
  import "../search/index.js";
40
40
  import "../form/index.js";
41
- import { VftButton as f } from "../button/index.js";
41
+ import { VftButton as s } from "../button/index.js";
42
42
  import "../checkbox/index.js";
43
43
  import "../radio/index.js";
44
44
  import "../switch/index.js";
@@ -76,6 +76,7 @@ import "../autocomplete/index.js";
76
76
  import "../super-form/index.js";
77
77
  import "../progress/index.js";
78
78
  import "../upload/index.js";
79
+ import "../modal/index.js";
79
80
  import "../md-container/index.js";
80
81
  import "../md-comment/index.js";
81
82
  import "../md-tabs/index.js";
@@ -89,86 +90,123 @@ import "lodash";
89
90
  import "../../hooks/use-z-index/index.js";
90
91
  import "@vueuse/core";
91
92
  import "../../utils/ns-cover.js";
92
- function n(t) {
93
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !u(t);
93
+ function n(i) {
94
+ return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !D(i);
94
95
  }
95
- const wt = {
96
+ const xt = {
96
97
  type: "seq",
97
98
  title: "序号",
98
99
  minWidth: 70,
99
100
  fixed: "left"
100
- }, Tt = {
101
+ }, ti = {
102
+ field: "id",
103
+ title: "Id",
104
+ minWidth: 100
105
+ }, ii = {
101
106
  field: "name",
102
107
  title: "名称",
103
108
  minWidth: 100
104
- }, xt = (t) => ({
105
- minWidth: 170,
106
- field: "updateTime",
107
- title: "更新时间",
109
+ }, ri = ({
110
+ format: i = "YYYY-MM-DD",
111
+ field: t = "date",
112
+ title: r = "时间"
113
+ } = {}) => ({
114
+ minWidth: 100,
115
+ field: t,
116
+ title: r,
108
117
  formatter: ({
109
- row: i
110
- }) => a(i.updateTime, t)
111
- }), ti = (t) => ({
118
+ row: m
119
+ }) => m[t] ? u(m[t], i) : "-"
120
+ }), a = ({
121
+ format: i = "YYYY-MM-DD HH:mm:ss",
122
+ field: t = "date",
123
+ title: r = "时间"
124
+ } = {}) => ({
112
125
  minWidth: 170,
113
- field: "createTime",
114
- title: "创建时间",
126
+ field: t,
127
+ title: r,
115
128
  formatter: ({
116
- row: i
117
- }) => a(i.updateTime, t)
118
- }), ii = (t = "status", i = "正常", m = "禁用") => ({
129
+ row: m
130
+ }) => m[t] ? u(m[t], i) : "-"
131
+ }), mi = ({
132
+ format: i = "YYYY-MM-DD HH:mm:ss",
133
+ field: t = "createTime",
134
+ title: r = "创建时间"
135
+ } = {}) => a({
136
+ format: i,
137
+ field: t,
138
+ title: r
139
+ }), oi = ({
140
+ format: i = "YYYY-MM-DD HH:mm:ss",
141
+ field: t = "updateTime",
142
+ title: r = "更新时间"
143
+ } = {}) => a({
144
+ format: i,
119
145
  field: t,
146
+ title: r
147
+ }), pi = ({
148
+ field: i = "status",
149
+ normalText: t = "正常",
150
+ disabledText: r = "禁用",
151
+ strToNumber: m = !0
152
+ } = {}) => ({
153
+ field: i,
120
154
  title: "状态",
121
155
  width: 100,
122
156
  slots: {
123
157
  default: ({
124
- row: r
125
- }) => r != null && r[t] ? o(l, {
126
- type: "danger"
127
- }, n(m) ? m : {
128
- default: () => [m]
129
- }) : o(l, null, n(i) ? i : {
130
- default: () => [i]
131
- })
158
+ row: o
159
+ }) => {
160
+ let p = o == null ? void 0 : o[i];
161
+ return p ? (m && Number(p) === 0 && (p = !1), p ? e(l, {
162
+ type: "danger"
163
+ }, n(r) ? r : {
164
+ default: () => [r]
165
+ }) : e(l, null, n(t) ? t : {
166
+ default: () => [t]
167
+ })) : "-";
168
+ }
132
169
  }
133
- }), ri = ({
134
- confirmText: t = "确认删除?",
135
- leftCallback: i = (e) => {
136
- },
137
- rightCallback: m = (e) => {
138
- },
139
- leftText: r = "编辑",
140
- rightText: p = "删除"
170
+ }), ei = ({
171
+ confirmText: i = "确认删除?",
172
+ leftCallback: t,
173
+ rightCallback: r,
174
+ leftText: m = "编辑",
175
+ rightText: o = "删除"
141
176
  }) => ({
142
177
  title: "操作栏",
143
178
  minWidth: 150,
144
179
  slots: {
145
180
  default: ({
146
- row: e
147
- }) => o(d, null, [r ? o(f, {
181
+ row: p
182
+ }) => e(f, null, [m ? e(s, {
148
183
  size: "small",
149
184
  type: "primary",
150
- onClick: () => i(e)
151
- }, n(r) ? r : {
152
- default: () => [r]
153
- }) : null, p ? o(c, {
185
+ onClick: () => t(p)
186
+ }, n(m) ? m : {
187
+ default: () => [m]
188
+ }) : null, o ? e(c, {
154
189
  width: "150",
155
- onConfirm: () => m(e),
156
- title: t
190
+ onConfirm: () => r(p),
191
+ title: i
157
192
  }, {
158
- reference: () => o(f, {
193
+ reference: () => e(s, {
159
194
  size: "small",
160
195
  type: "danger"
161
- }, n(p) ? p : {
162
- default: () => [p]
196
+ }, n(o) ? o : {
197
+ default: () => [o]
163
198
  })
164
199
  }) : null])
165
200
  }
166
201
  });
167
202
  export {
168
- ri as action_field,
169
- ti as create_time_field,
170
- Tt as name_field,
171
- wt as seq_field,
172
- ii as state_field,
173
- xt as update_time_field
203
+ ei as ACTION_FIELD,
204
+ mi as CREATE_TIME_FIELD,
205
+ ri as DATE_FIELD,
206
+ a as DATE_TIME_FIELD,
207
+ ti as ID_FIELD,
208
+ ii as NAME_FIELD,
209
+ xt as SEQ_FIELD,
210
+ pi as STATUS_FIELD,
211
+ oi as UPDATE_TIME_FIELD
174
212
  };
@@ -1,19 +1,22 @@
1
- import { withInstall as t } from "../../utils/vue/install.js";
1
+ import { withInstall as E } from "../../utils/vue/install.js";
2
2
  import "vue";
3
3
  import "@vft/utils";
4
4
  import "lodash";
5
5
  import "@vueuse/core";
6
6
  import "../../utils/ns-cover.js";
7
- import e from "./table.vue2.js";
8
- import { action_field as s, create_time_field as n, name_field as c, seq_field as u, state_field as x, update_time_field as b } from "./field.js";
9
- const p = t(e);
7
+ import I from "./table.vue2.js";
8
+ import { ACTION_FIELD as L, CREATE_TIME_FIELD as A, DATE_FIELD as f, DATE_TIME_FIELD as a, ID_FIELD as e, NAME_FIELD as l, SEQ_FIELD as s, STATUS_FIELD as M, UPDATE_TIME_FIELD as n } from "./field.js";
9
+ const i = E(I);
10
10
  export {
11
- p as VftTable,
12
- s as action_field,
13
- n as create_time_field,
14
- p as default,
15
- c as name_field,
16
- u as seq_field,
17
- x as state_field,
18
- b as update_time_field
11
+ L as ACTION_FIELD,
12
+ A as CREATE_TIME_FIELD,
13
+ f as DATE_FIELD,
14
+ a as DATE_TIME_FIELD,
15
+ e as ID_FIELD,
16
+ l as NAME_FIELD,
17
+ s as SEQ_FIELD,
18
+ M as STATUS_FIELD,
19
+ n as UPDATE_TIME_FIELD,
20
+ i as VftTable,
21
+ i as default
19
22
  };
@@ -0,0 +1 @@
1
+
@@ -80,6 +80,7 @@ import "../autocomplete/index.js";
80
80
  import "../super-form/index.js";
81
81
  import "../progress/index.js";
82
82
  import "../upload/index.js";
83
+ import "../modal/index.js";
83
84
  import "../md-container/index.js";
84
85
  import "../md-comment/index.js";
85
86
  import "../md-tabs/index.js";
@@ -98,7 +99,7 @@ const lt = (
98
99
  K("tab-nav")
99
100
  ), ct = E({
100
101
  name: "vft-tab-nav"
101
- }), Zo = /* @__PURE__ */ E({
102
+ }), _o = /* @__PURE__ */ E({
102
103
  ...ct,
103
104
  props: {
104
105
  panes: {},
@@ -252,5 +253,5 @@ const lt = (
252
253
  }
253
254
  });
254
255
  export {
255
- Zo as default
256
+ _o as default
256
257
  };
@@ -28,8 +28,8 @@ const W = ["onKeydown"], Y = ["name", "multiple", "accept"], Z = D({
28
28
  showFileList: { type: Boolean, default: !0 },
29
29
  accept: { default: "" },
30
30
  type: { default: "select" },
31
- fileList: {},
32
- autoUpload: { type: Boolean, default: !0 },
31
+ fileList: { default: [] },
32
+ autoUpload: { type: Boolean, default: !1 },
33
33
  listType: { default: "text" },
34
34
  httpRequest: { type: Function, default: J },
35
35
  disabled: { type: Boolean },