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.
- package/attributes.json +1 -1
- package/es/component.js +25 -23
- package/es/components/backtop/backtop.vue2.js +3 -2
- package/es/components/button/button.vue2.js +21 -21
- package/es/components/context-menu/context-menu.vue2.js +3 -2
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +53 -57
- package/es/components/footer-layout/footer-layout.vue2.js +3 -2
- package/es/components/header-layout/header-layout.vue2.js +3 -2
- package/es/components/index.js +269 -261
- package/es/components/md-container/md-container.vue2.js +3 -2
- package/es/components/menu/menu-item.vue2.js +3 -2
- package/es/components/menu/sub-menu.vue2.js +3 -2
- package/es/components/message/message.vue2.js +12 -12
- package/es/components/modal/index.js +15 -0
- package/es/components/modal/modal.vue.js +4 -0
- package/es/components/modal/modal.vue2.js +92 -0
- package/es/components/modal/style/css.js +4 -0
- package/es/components/modal/style/index.js +4 -0
- package/es/components/modal/use/use-modal.js +95 -0
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +15 -14
- package/es/components/multiple-tabs/tab-content.vue2.js +11 -12
- package/es/components/multiple-tabs/use/use-multiple-tabs.js +22 -23
- package/es/components/result/result.vue2.js +3 -2
- package/es/components/side-menu/side-menu.vue2.js +26 -25
- package/es/components/super-form/component-map.js +24 -23
- package/es/components/super-form/super-form-action.vue2.js +28 -29
- package/es/components/super-form/super-form-item.vue2.js +132 -123
- package/es/components/super-form/super-form.vue2.js +139 -136
- package/es/components/super-form/use/use-form-events.js +144 -139
- package/es/components/table/field.js +90 -52
- package/es/components/table/index.js +15 -12
- package/es/components/table/types.js +1 -0
- package/es/components/tabs/tab-nav.vue2.js +3 -2
- package/es/components/upload/upload-content.vue2.js +2 -2
- package/es/components/upload/upload.vue2.js +40 -49
- package/es/index.js +354 -346
- package/es/package.json.js +1 -1
- package/lib/component.cjs +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/modal/index.cjs +1 -0
- package/lib/components/modal/modal.vue.cjs +1 -0
- package/lib/components/modal/modal.vue2.cjs +1 -0
- package/lib/components/modal/style/css.cjs +1 -0
- package/lib/components/modal/style/index.cjs +1 -0
- package/lib/components/modal/use/use-modal.cjs +1 -0
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-multiple-tabs.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/index.cjs +1 -1
- package/lib/components/table/types.cjs +1 -0
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +3 -3
- package/tags.json +1 -1
- package/theme-style/src/index.scss +1 -0
- package/theme-style/src/modal.scss +0 -0
- package/theme-style/vft-modal.css +0 -0
- package/web-types.json +1 -1
- /package/es/components/{table/type.js → modal/types.js} +0 -0
- /package/lib/components/{table/type.cjs → modal/types.cjs} +0 -0
|
@@ -1,124 +1,125 @@
|
|
|
1
|
-
import { unref as c, nextTick as
|
|
2
|
-
import { isFunction as
|
|
3
|
-
import { handleInputNumberValue as
|
|
4
|
-
import { cloneDeep as
|
|
5
|
-
import { isInput as
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
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
|
|
16
|
-
|
|
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(
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
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
|
|
31
|
-
|
|
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
|
|
37
|
-
emit:
|
|
36
|
+
function yt({
|
|
37
|
+
emit: v,
|
|
38
38
|
getProps: F,
|
|
39
|
-
formModel:
|
|
40
|
-
getSchema:
|
|
41
|
-
defaultValueRef:
|
|
39
|
+
formModel: a,
|
|
40
|
+
getSchema: d,
|
|
41
|
+
defaultValueRef: y,
|
|
42
42
|
formElRef: f,
|
|
43
43
|
schemaRef: p,
|
|
44
|
-
handleFormValues:
|
|
44
|
+
handleFormValues: D,
|
|
45
|
+
initValues: J
|
|
45
46
|
}) {
|
|
46
|
-
async function
|
|
47
|
-
const { resetFunc:
|
|
48
|
-
|
|
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(
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
}),
|
|
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
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
let
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
const { componentProps: N } =
|
|
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(
|
|
69
|
-
const $ =
|
|
70
|
-
if (
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
if (Array.isArray(
|
|
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
|
|
76
|
-
E.push(
|
|
77
|
-
c(
|
|
76
|
+
for (const b of l)
|
|
77
|
+
E.push(b ? U(b) : null);
|
|
78
|
+
c(a)[e] = E;
|
|
78
79
|
} else
|
|
79
|
-
c(
|
|
80
|
+
c(a)[e] = l ? h != null && h.valueFormat ? l : U(l) : null;
|
|
80
81
|
else
|
|
81
|
-
c(
|
|
82
|
-
h != null && h.onChange && (h == null || h.onChange(
|
|
82
|
+
c(a)[e] = l;
|
|
83
|
+
h != null && h.onChange && (h == null || h.onChange(l)), o.push(e);
|
|
83
84
|
} else
|
|
84
|
-
i.forEach((
|
|
85
|
+
i.forEach((l) => {
|
|
85
86
|
try {
|
|
86
|
-
const E =
|
|
87
|
-
|
|
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
|
-
|
|
90
|
+
z(y.value[l]) && (c(a)[l] = w(c(y.value[l])));
|
|
90
91
|
}
|
|
91
92
|
});
|
|
92
|
-
}), await
|
|
93
|
+
}), await C(o).catch((e) => {
|
|
93
94
|
});
|
|
94
95
|
}
|
|
95
|
-
async function
|
|
96
|
-
const
|
|
96
|
+
async function Q(t) {
|
|
97
|
+
const n = w(c(d));
|
|
97
98
|
if (!t)
|
|
98
99
|
return;
|
|
99
|
-
let
|
|
100
|
-
j(t) && (
|
|
101
|
-
for (const i of
|
|
102
|
-
|
|
103
|
-
p.value =
|
|
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
|
|
106
|
+
function W(t, n) {
|
|
106
107
|
if (j(t)) {
|
|
107
|
-
const
|
|
108
|
-
|
|
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
|
|
112
|
-
const i =
|
|
113
|
-
if (!
|
|
114
|
-
|
|
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
|
-
|
|
118
|
+
o !== -1 && i.splice(o + 1, 0, ...e), V(t), p.value = i;
|
|
118
119
|
}
|
|
119
|
-
async function
|
|
120
|
-
let
|
|
121
|
-
if (
|
|
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 =
|
|
130
|
+
p.value = n;
|
|
130
131
|
}
|
|
131
|
-
async function
|
|
132
|
-
let
|
|
133
|
-
if (
|
|
134
|
-
(
|
|
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 = [],
|
|
142
|
-
c(
|
|
143
|
-
let
|
|
144
|
-
if (
|
|
145
|
-
|
|
146
|
-
}),
|
|
147
|
-
const
|
|
148
|
-
|
|
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
|
-
|
|
151
|
-
}),
|
|
151
|
+
o.push(e);
|
|
152
|
+
}), V(o, i), p.value = ot(o, "field");
|
|
152
153
|
}
|
|
153
|
-
function
|
|
154
|
-
if (I(
|
|
154
|
+
function V(t, n) {
|
|
155
|
+
if (I(n) && (n == null ? void 0 : n.length) === 0)
|
|
155
156
|
return;
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
const i = {},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}),
|
|
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) ?
|
|
165
|
+
return c(f) ? D(B(c(a))) : {};
|
|
165
166
|
}
|
|
166
|
-
function
|
|
167
|
-
return c(f) ?
|
|
167
|
+
function _(t) {
|
|
168
|
+
return c(f) ? B(c(a))[t] : {};
|
|
168
169
|
}
|
|
169
|
-
function
|
|
170
|
-
return c(
|
|
170
|
+
function K(t) {
|
|
171
|
+
return c(d).some((n) => n.field === t ? at(n.component) : !1);
|
|
171
172
|
}
|
|
172
|
-
async function
|
|
173
|
-
var
|
|
174
|
-
return (
|
|
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
|
|
178
|
-
return await ((
|
|
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
|
|
182
|
-
await ((
|
|
183
|
-
}
|
|
184
|
-
async function
|
|
185
|
-
var
|
|
186
|
-
await ((
|
|
187
|
-
}
|
|
188
|
-
async function
|
|
189
|
-
const { autoCleanErrorMessage:
|
|
190
|
-
t && t.preventDefault(),
|
|
191
|
-
const { submitFunc:
|
|
192
|
-
if (
|
|
193
|
-
await
|
|
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
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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(
|
|
208
|
+
throw new Error(r.message);
|
|
204
209
|
}
|
|
205
210
|
}
|
|
206
211
|
return {
|
|
207
|
-
handleSubmit:
|
|
212
|
+
handleSubmit: q,
|
|
208
213
|
clearValidate: O,
|
|
209
214
|
validate: L,
|
|
210
|
-
validateField:
|
|
215
|
+
validateField: C,
|
|
211
216
|
getFieldsValue: T,
|
|
212
|
-
updateSchema:
|
|
213
|
-
resetSchema:
|
|
214
|
-
appendSchemaByField:
|
|
215
|
-
removeSchemaByField:
|
|
216
|
-
resetFields:
|
|
217
|
+
updateSchema: Z,
|
|
218
|
+
resetSchema: Y,
|
|
219
|
+
appendSchemaByField: X,
|
|
220
|
+
removeSchemaByField: Q,
|
|
221
|
+
resetFields: P,
|
|
217
222
|
setFieldsValue: S,
|
|
218
|
-
scrollToField:
|
|
219
|
-
getFieldValue:
|
|
223
|
+
scrollToField: R,
|
|
224
|
+
getFieldValue: _
|
|
220
225
|
};
|
|
221
226
|
}
|
|
222
227
|
export {
|
|
223
|
-
|
|
228
|
+
yt as useFormEvents
|
|
224
229
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createVNode as
|
|
2
|
-
import { formatToDateTime as
|
|
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
|
|
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(
|
|
93
|
-
return typeof
|
|
93
|
+
function n(i) {
|
|
94
|
+
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !D(i);
|
|
94
95
|
}
|
|
95
|
-
const
|
|
96
|
+
const xt = {
|
|
96
97
|
type: "seq",
|
|
97
98
|
title: "序号",
|
|
98
99
|
minWidth: 70,
|
|
99
100
|
fixed: "left"
|
|
100
|
-
},
|
|
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
|
-
},
|
|
105
|
-
|
|
106
|
-
field: "
|
|
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:
|
|
110
|
-
}) =>
|
|
111
|
-
}),
|
|
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:
|
|
114
|
-
title:
|
|
126
|
+
field: t,
|
|
127
|
+
title: r,
|
|
115
128
|
formatter: ({
|
|
116
|
-
row:
|
|
117
|
-
}) =>
|
|
118
|
-
}),
|
|
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:
|
|
125
|
-
}) =>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
}),
|
|
134
|
-
confirmText:
|
|
135
|
-
leftCallback:
|
|
136
|
-
|
|
137
|
-
|
|
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:
|
|
147
|
-
}) =>
|
|
181
|
+
row: p
|
|
182
|
+
}) => e(f, null, [m ? e(s, {
|
|
148
183
|
size: "small",
|
|
149
184
|
type: "primary",
|
|
150
|
-
onClick: () =>
|
|
151
|
-
}, n(
|
|
152
|
-
default: () => [
|
|
153
|
-
}) : null,
|
|
185
|
+
onClick: () => t(p)
|
|
186
|
+
}, n(m) ? m : {
|
|
187
|
+
default: () => [m]
|
|
188
|
+
}) : null, o ? e(c, {
|
|
154
189
|
width: "150",
|
|
155
|
-
onConfirm: () =>
|
|
156
|
-
title:
|
|
190
|
+
onConfirm: () => r(p),
|
|
191
|
+
title: i
|
|
157
192
|
}, {
|
|
158
|
-
reference: () =>
|
|
193
|
+
reference: () => e(s, {
|
|
159
194
|
size: "small",
|
|
160
195
|
type: "danger"
|
|
161
|
-
}, n(
|
|
162
|
-
default: () => [
|
|
196
|
+
}, n(o) ? o : {
|
|
197
|
+
default: () => [o]
|
|
163
198
|
})
|
|
164
199
|
}) : null])
|
|
165
200
|
}
|
|
166
201
|
});
|
|
167
202
|
export {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
|
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
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
}),
|
|
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
|
-
|
|
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: !
|
|
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 },
|