@king-one/antdv 1.0.91 → 1.0.93
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/CHANGELOG.md +12 -0
- package/dist/es/components/pro-table/src/field/field.vue2.mjs +77 -65
- package/dist/es/components/pro-table/src/form-render.vue2.mjs +44 -44
- package/dist/lib/components/pro-table/src/field/field.vue2.js +1 -1
- package/dist/lib/components/pro-table/src/form-render.vue2.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/types/components/collapse-transtion/index.d.ts +10 -5
- package/dist/types/components/collapse-transtion/src/collapse-transtion.vue.d.ts +4 -4
- package/dist/types/components/form/component/form-item.vue.d.ts +4 -4
- package/dist/types/components/form/component/form.vue.d.ts +2 -2
- package/dist/types/components/form/index.d.ts +14 -8
- package/dist/types/components/icon/index.d.ts +5 -5
- package/dist/types/components/icon/src/icon.vue.d.ts +5 -5
- package/dist/types/components/pro-area/hooks/use-pro-area.d.ts +1 -1
- package/dist/types/components/pro-area/index.d.ts +8 -8
- package/dist/types/components/pro-area/src/ProArea.vue.d.ts +8 -8
- package/dist/types/components/pro-modal/hooks/useProModal.d.ts +1 -1
- package/dist/types/components/pro-modal/index.d.ts +28 -12
- package/dist/types/components/pro-modal/src/Modal.d.ts +5 -5
- package/dist/types/components/pro-modal/src/ProModal.vue.d.ts +5 -7
- package/dist/types/components/pro-picker/index.d.ts +8 -9
- package/dist/types/components/pro-picker/src/ProPicker.vue.d.ts +8 -9
- package/dist/types/components/pro-signature/index.d.ts +7 -9
- package/dist/types/components/pro-signature/src/ProSignature.vue.d.ts +7 -9
- package/dist/types/components/pro-table/hooks/use-pro-table.d.ts +1 -1
- package/dist/types/components/pro-table/src/field/field-date-range/field-date-range.vue.d.ts +14 -5
- package/dist/types/components/pro-table/src/field/field-input/field-input.vue.d.ts +14 -5
- package/dist/types/components/pro-table/src/field/field-radio/field-radio.vue.d.ts +14 -5
- package/dist/types/components/pro-table/src/field/field-select/field-select.vue.d.ts +14 -5
- package/dist/types/components/pro-table/src/field/field.vue.d.ts +11 -2
- package/dist/types/components/pro-table/src/form-render.vue.d.ts +3 -646
- package/dist/types/components/pro-table/src/hooks/use-form.d.ts +1 -1
- package/dist/types/components/pro-table/src/pro-table.vue.d.ts +3 -49
- package/dist/types/components/pro-tag/index.d.ts +6 -6
- package/dist/types/components/pro-tag/src/ProTag.vue.d.ts +6 -6
- package/dist/types/components/pro-title/index.d.ts +24 -7
- package/dist/types/components/pro-title/src/ProTitle.vue.d.ts +5 -5
- package/dist/types/components/scale-virtual-list/component/scale-virtual-list.vue.d.ts +29 -10
- package/dist/types/components/scale-virtual-list/index.d.ts +73 -21
- package/dist/types/components/scroll-bar/index.d.ts +12 -12
- package/dist/types/components/scroll-bar/src/scroll-bar.d.ts +12 -12
- package/dist/types/hooks/useProForm.d.ts +2 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TABLE_CONTEXT_PROVIDE_KEY as
|
|
3
|
-
import { getAvailableVNode as
|
|
1
|
+
import { defineComponent as T, inject as P, toRefs as C, computed as p, reactive as y, ref as I, watchEffect as N, readonly as S, provide as w, createElementBlock as v, openBlock as a, Fragment as c, createCommentVNode as u, createElementVNode as B, createBlock as m, resolveDynamicComponent as F, unref as D, normalizeProps as _, mergeProps as U, guardReactiveProps as $ } from "vue";
|
|
2
|
+
import { TABLE_CONTEXT_PROVIDE_KEY as q, FIELD_CONTEXT_PROVIDE_KEY as A } from "../constants.mjs";
|
|
3
|
+
import { getAvailableVNode as K, handleFn as j } from "../../utils.mjs";
|
|
4
4
|
import "./field-input/field-input.vue.mjs";
|
|
5
5
|
import "./field-select/field-select.vue.mjs";
|
|
6
6
|
import "./field-radio/field-radio.vue.mjs";
|
|
@@ -9,93 +9,105 @@ import L from "./field-input/field-input.vue2.mjs";
|
|
|
9
9
|
import M from "./field-select/field-select.vue2.mjs";
|
|
10
10
|
import X from "./field-radio/field-radio.vue2.mjs";
|
|
11
11
|
import Y from "./field-date-range/field-date-range.vue2.mjs";
|
|
12
|
-
const
|
|
12
|
+
const h = { class: "field" }, ne = /* @__PURE__ */ T({
|
|
13
13
|
__name: "field",
|
|
14
14
|
props: {
|
|
15
15
|
column: {}
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
17
|
+
setup(k) {
|
|
18
|
+
const { column: l } = k, V = P(q), { tableSlots: s } = V, { formState: d } = C(V), E = l.dataIndex, t = p({
|
|
19
19
|
get() {
|
|
20
|
-
return
|
|
20
|
+
return d.value[E];
|
|
21
21
|
},
|
|
22
|
-
set(
|
|
23
|
-
|
|
22
|
+
set(n) {
|
|
23
|
+
d.value[E] = n;
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
26
|
-
column:
|
|
27
|
-
value:
|
|
28
|
-
formState:
|
|
29
|
-
}),
|
|
30
|
-
() =>
|
|
31
|
-
), i =
|
|
32
|
-
function
|
|
33
|
-
|
|
25
|
+
}), f = y({
|
|
26
|
+
column: l,
|
|
27
|
+
value: t.value,
|
|
28
|
+
formState: d
|
|
29
|
+
}), b = p(() => s.formField ? !!K(s.formField(f)).length : !1), r = p(
|
|
30
|
+
() => l.valueType || (l.valueEnum ? "select" : "text")
|
|
31
|
+
), i = I([]);
|
|
32
|
+
function R() {
|
|
33
|
+
l.request ? x() : g();
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
b(), S(() => {
|
|
39
|
-
e.column._fieldOptions = w(i.value);
|
|
35
|
+
R(), N(() => {
|
|
36
|
+
l._fieldOptions = S(i.value);
|
|
40
37
|
});
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
44
|
-
i.value = Array.from(
|
|
45
|
-
text:
|
|
46
|
-
value:
|
|
47
|
-
label:
|
|
48
|
-
disabled:
|
|
38
|
+
function g() {
|
|
39
|
+
if (l.valueEnum) {
|
|
40
|
+
const n = new Map(Object.entries(l.valueEnum));
|
|
41
|
+
i.value = Array.from(n).map(([o, e]) => ({
|
|
42
|
+
text: e.text,
|
|
43
|
+
value: o,
|
|
44
|
+
label: e.text,
|
|
45
|
+
disabled: e.disabled
|
|
49
46
|
}));
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
|
-
async function
|
|
53
|
-
const
|
|
54
|
-
|
|
49
|
+
async function x() {
|
|
50
|
+
const n = await j(l.request, {});
|
|
51
|
+
n && (i.value = n);
|
|
55
52
|
}
|
|
56
|
-
const
|
|
53
|
+
const O = y({
|
|
57
54
|
fieldOptions: i,
|
|
58
|
-
column:
|
|
55
|
+
column: l
|
|
59
56
|
});
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
), (
|
|
64
|
-
|
|
57
|
+
return w(
|
|
58
|
+
A,
|
|
59
|
+
O
|
|
60
|
+
), (n, o) => (a(), v(
|
|
61
|
+
c,
|
|
65
62
|
null,
|
|
66
63
|
[
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
64
|
+
u(" eslint-disable vue/component-name-in-template-casing "),
|
|
65
|
+
B("div", h, [
|
|
66
|
+
b.value ? (a(), m(
|
|
67
|
+
F(D(s).formField),
|
|
68
|
+
_(U({ key: 0 }, f)),
|
|
72
69
|
null,
|
|
73
70
|
16
|
|
74
71
|
/* FULL_PROPS */
|
|
75
|
-
)) :
|
|
76
|
-
|
|
72
|
+
)) : n.column.customFormFieldRender ? (a(), v(
|
|
73
|
+
c,
|
|
74
|
+
{ key: 1 },
|
|
75
|
+
[
|
|
76
|
+
u(' <column.customFormFieldRender v-bind="slotProps" /> '),
|
|
77
|
+
(a(), m(
|
|
78
|
+
F(n.column.customFormFieldRender),
|
|
79
|
+
_($(f)),
|
|
80
|
+
null,
|
|
81
|
+
16
|
|
82
|
+
/* FULL_PROPS */
|
|
83
|
+
))
|
|
84
|
+
],
|
|
85
|
+
64
|
|
86
|
+
/* STABLE_FRAGMENT */
|
|
87
|
+
)) : (a(), v(
|
|
88
|
+
c,
|
|
77
89
|
{ key: 2 },
|
|
78
90
|
[
|
|
79
|
-
r.value === "text" ? (
|
|
91
|
+
r.value === "text" ? (a(), m(L, {
|
|
80
92
|
key: 0,
|
|
81
|
-
modelValue:
|
|
82
|
-
"onUpdate:modelValue":
|
|
83
|
-
}, null, 8, ["modelValue"])) :
|
|
84
|
-
r.value === "select" ? (
|
|
93
|
+
modelValue: t.value,
|
|
94
|
+
"onUpdate:modelValue": o[0] || (o[0] = (e) => t.value = e)
|
|
95
|
+
}, null, 8, ["modelValue"])) : u("v-if", !0),
|
|
96
|
+
r.value === "select" ? (a(), m(M, {
|
|
85
97
|
key: 1,
|
|
86
|
-
modelValue:
|
|
87
|
-
"onUpdate:modelValue":
|
|
88
|
-
}, null, 8, ["modelValue"])) :
|
|
89
|
-
r.value === "radio" ? (
|
|
98
|
+
modelValue: t.value,
|
|
99
|
+
"onUpdate:modelValue": o[1] || (o[1] = (e) => t.value = e)
|
|
100
|
+
}, null, 8, ["modelValue"])) : u("v-if", !0),
|
|
101
|
+
r.value === "radio" ? (a(), m(X, {
|
|
90
102
|
key: 2,
|
|
91
|
-
modelValue:
|
|
92
|
-
"onUpdate:modelValue":
|
|
93
|
-
}, null, 8, ["modelValue"])) :
|
|
94
|
-
r.value === "dateRange" ? (
|
|
103
|
+
modelValue: t.value,
|
|
104
|
+
"onUpdate:modelValue": o[2] || (o[2] = (e) => t.value = e)
|
|
105
|
+
}, null, 8, ["modelValue"])) : u("v-if", !0),
|
|
106
|
+
r.value === "dateRange" ? (a(), m(Y, {
|
|
95
107
|
key: 3,
|
|
96
|
-
modelValue:
|
|
97
|
-
"onUpdate:modelValue":
|
|
98
|
-
}, null, 8, ["modelValue"])) :
|
|
108
|
+
modelValue: t.value,
|
|
109
|
+
"onUpdate:modelValue": o[3] || (o[3] = (e) => t.value = e)
|
|
110
|
+
}, null, 8, ["modelValue"])) : u("v-if", !0)
|
|
99
111
|
],
|
|
100
112
|
64
|
|
101
113
|
/* STABLE_FRAGMENT */
|
|
@@ -108,5 +120,5 @@ const z = { class: "field" }, oe = /* @__PURE__ */ g({
|
|
|
108
120
|
}
|
|
109
121
|
});
|
|
110
122
|
export {
|
|
111
|
-
|
|
123
|
+
ne as default
|
|
112
124
|
};
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { defineComponent as L, inject as A, toRefs as P, ref as j, computed as
|
|
2
|
-
import { Form as Y, Row as $, Col as
|
|
1
|
+
import { defineComponent as L, inject as A, toRefs as P, ref as j, computed as m, createElementBlock as i, openBlock as l, createVNode as o, unref as e, mergeProps as d, withCtx as n, createCommentVNode as s, Fragment as k, renderList as q, createBlock as z, normalizeProps as K, guardReactiveProps as X, createTextVNode as y } from "vue";
|
|
2
|
+
import { Form as Y, Row as $, Col as x, FormItem as b, Space as G, Button as F } from "ant-design-vue";
|
|
3
3
|
import "./field/field.vue.mjs";
|
|
4
4
|
import { TABLE_CONTEXT_PROVIDE_KEY as H } from "./constants.mjs";
|
|
5
5
|
import J from "./field/field.vue2.mjs";
|
|
6
6
|
const M = { class: "pro-table-form" }, oe = /* @__PURE__ */ L({
|
|
7
7
|
__name: "form-render",
|
|
8
|
-
setup(Q, { expose:
|
|
9
|
-
const c = A(H), { columns:
|
|
10
|
-
function
|
|
8
|
+
setup(Q, { expose: I }) {
|
|
9
|
+
const c = A(H), { columns: p, pageData: R, handleRequest: N } = c, { loading: T, antdFormProps: B, formColNum: u, formState: E, buttonCol: O } = P(c), a = j();
|
|
10
|
+
function _(t) {
|
|
11
11
|
return t.valueType !== "option" && !t.hideInForm;
|
|
12
12
|
}
|
|
13
13
|
const S = (t) => t.dataIndex;
|
|
14
|
-
function
|
|
15
|
-
|
|
14
|
+
function v() {
|
|
15
|
+
R.pageNum = 1, N();
|
|
16
16
|
}
|
|
17
17
|
function w() {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
a.value && a.value.validate().then(() => {
|
|
19
|
+
v();
|
|
20
20
|
}).catch(console.error);
|
|
21
21
|
}
|
|
22
22
|
function V() {
|
|
23
|
-
|
|
23
|
+
a.value && (a.value.resetFields(), v());
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
const t =
|
|
27
|
-
return (
|
|
25
|
+
const f = m(() => (u == null ? void 0 : u.value) || 0), g = m(() => 24 / f.value), D = m(() => {
|
|
26
|
+
const t = p.filter(_).length;
|
|
27
|
+
return (f.value - 1 - t % f.value) * g.value;
|
|
28
28
|
});
|
|
29
|
-
function
|
|
29
|
+
function C(t, h = !1) {
|
|
30
30
|
return t = {
|
|
31
|
-
span:
|
|
31
|
+
span: g.value,
|
|
32
32
|
// 4 列
|
|
33
33
|
...t || {}
|
|
34
|
-
},
|
|
34
|
+
}, h && t.offset == null && (t.offset = D.value), t;
|
|
35
35
|
}
|
|
36
|
-
return
|
|
37
|
-
formRef:
|
|
38
|
-
}), (t,
|
|
39
|
-
o(e(Y),
|
|
36
|
+
return I({
|
|
37
|
+
formRef: a
|
|
38
|
+
}), (t, h) => (l(), i("div", M, [
|
|
39
|
+
o(e(Y), d({
|
|
40
40
|
ref_key: "formRef",
|
|
41
|
-
ref:
|
|
41
|
+
ref: a,
|
|
42
42
|
autocomplete: "off",
|
|
43
43
|
"label-col": { span: 5 }
|
|
44
44
|
}, e(B), { model: e(E) }), {
|
|
45
45
|
default: n(() => [
|
|
46
46
|
o(e($), { gutter: [0, 24] }, {
|
|
47
47
|
default: n(() => [
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
-
|
|
48
|
+
s(" TODO 处理 key 的问题, 有的项没有 key, 有的项没有 dataIndex "),
|
|
49
|
+
(l(!0), i(
|
|
50
|
+
k,
|
|
51
51
|
null,
|
|
52
|
-
q(e(
|
|
53
|
-
|
|
52
|
+
q(e(p), (r) => (l(), i(
|
|
53
|
+
k,
|
|
54
54
|
null,
|
|
55
55
|
[
|
|
56
|
-
|
|
57
|
-
e(
|
|
58
|
-
|
|
56
|
+
_(r) ? (l(), z(
|
|
57
|
+
e(x),
|
|
58
|
+
d({
|
|
59
59
|
key: r.key,
|
|
60
60
|
ref_for: !0
|
|
61
|
-
},
|
|
61
|
+
}, C(r.fieldCol)),
|
|
62
62
|
{
|
|
63
63
|
default: n(() => [
|
|
64
|
-
o(e(
|
|
64
|
+
o(e(b), d({
|
|
65
65
|
label: r.title,
|
|
66
66
|
name: S(r),
|
|
67
67
|
ref_for: !0
|
|
@@ -78,7 +78,7 @@ const M = { class: "pro-table-form" }, oe = /* @__PURE__ */ L({
|
|
|
78
78
|
},
|
|
79
79
|
1040
|
|
80
80
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
81
|
-
)) :
|
|
81
|
+
)) : s("v-if", !0)
|
|
82
82
|
],
|
|
83
83
|
64
|
|
84
84
|
/* STABLE_FRAGMENT */
|
|
@@ -86,31 +86,31 @@ const M = { class: "pro-table-form" }, oe = /* @__PURE__ */ L({
|
|
|
86
86
|
256
|
|
87
87
|
/* UNKEYED_FRAGMENT */
|
|
88
88
|
)),
|
|
89
|
-
|
|
89
|
+
s(" 重置查询按钮 "),
|
|
90
90
|
o(
|
|
91
|
-
e(
|
|
92
|
-
K(X(
|
|
91
|
+
e(x),
|
|
92
|
+
K(X(C(e(O), !0))),
|
|
93
93
|
{
|
|
94
94
|
default: n(() => [
|
|
95
|
-
o(e(
|
|
95
|
+
o(e(b), { "wrapper-col": { style: { textAlign: "right" } } }, {
|
|
96
96
|
default: n(() => [
|
|
97
97
|
o(e(G), null, {
|
|
98
98
|
default: n(() => [
|
|
99
|
-
o(e(
|
|
100
|
-
default: n(() =>
|
|
101
|
-
|
|
102
|
-
])
|
|
99
|
+
o(e(F), { onClick: V }, {
|
|
100
|
+
default: n(() => [
|
|
101
|
+
y(" 重置 ")
|
|
102
|
+
]),
|
|
103
103
|
_: 1
|
|
104
104
|
/* STABLE */
|
|
105
105
|
}),
|
|
106
|
-
o(e(
|
|
106
|
+
o(e(F), {
|
|
107
107
|
type: "primary",
|
|
108
108
|
loading: e(T),
|
|
109
109
|
onClick: w
|
|
110
110
|
}, {
|
|
111
|
-
default: n(() =>
|
|
112
|
-
|
|
113
|
-
])
|
|
111
|
+
default: n(() => [
|
|
112
|
+
y(" 查询 ")
|
|
113
|
+
]),
|
|
114
114
|
_: 1
|
|
115
115
|
/* STABLE */
|
|
116
116
|
}, 8, ["loading"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../constants.js"),v=require("../../utils.js");require("./field-input/field-input.vue.js");require("./field-select/field-select.vue.js");require("./field-radio/field-radio.vue.js");require("./field-date-range/field-date-range.vue.js");const E=require("./field-input/field-input.vue2.js"),g=require("./field-select/field-select.vue2.js"),F=require("./field-radio/field-radio.vue2.js"),q=require("./field-date-range/field-date-range.vue2.js"),C={class:"field"},b=e.defineComponent({__name:"field",props:{column:{}},setup(f){const{column:l}=f,i=e.inject(p.TABLE_CONTEXT_PROVIDE_KEY),{tableSlots:c}=i,{formState:s}=e.toRefs(i),m=l.dataIndex,n=e.computed({get(){return s.value[m]},set(u){s.value[m]=u}}),d=e.reactive({column:l,value:n.value,formState:s}),_=e.computed(()=>c.formField?!!v.getAvailableVNode(c.formField(d)).length:!1),a=e.computed(()=>l.valueType||(l.valueEnum?"select":"text")),r=e.ref([]);function k(){l.request?y():V()}k(),e.watchEffect(()=>{l._fieldOptions=e.readonly(r.value)});function V(){if(l.valueEnum){const u=new Map(Object.entries(l.valueEnum));r.value=Array.from(u).map(([o,t])=>({text:t.text,value:o,label:t.text,disabled:t.disabled}))}}async function y(){const u=await v.handleFn(l.request,{});u&&(r.value=u)}const B=e.reactive({fieldOptions:r,column:l});return e.provide(p.FIELD_CONTEXT_PROVIDE_KEY,B),(u,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" eslint-disable vue/component-name-in-template-casing "),e.createElementVNode("div",C,[_.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c).formField),e.normalizeProps(e.mergeProps({key:0},d)),null,16)):u.column.customFormFieldRender?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(' <column.customFormFieldRender v-bind="slotProps" /> '),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.column.customFormFieldRender),e.normalizeProps(e.guardReactiveProps(d)),null,16))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[a.value==="text"?(e.openBlock(),e.createBlock(E.default,{key:0,modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=t=>n.value=t)},null,8,["modelValue"])):e.createCommentVNode("v-if",!0),a.value==="select"?(e.openBlock(),e.createBlock(g.default,{key:1,modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=t=>n.value=t)},null,8,["modelValue"])):e.createCommentVNode("v-if",!0),a.value==="radio"?(e.openBlock(),e.createBlock(F.default,{key:2,modelValue:n.value,"onUpdate:modelValue":o[2]||(o[2]=t=>n.value=t)},null,8,["modelValue"])):e.createCommentVNode("v-if",!0),a.value==="dateRange"?(e.openBlock(),e.createBlock(q.default,{key:3,modelValue:n.value,"onUpdate:modelValue":o[3]||(o[3]=t=>n.value=t)},null,8,["modelValue"])):e.createCommentVNode("v-if",!0)],64))])],2112))}});exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("ant-design-vue");require("./field/field.vue.js");const y=require("./constants.js"),B=require("./field/field.vue2.js"),b={class:"pro-table-form"},F=e.defineComponent({__name:"form-render",setup(I,{expose:p}){const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("ant-design-vue");require("./field/field.vue.js");const y=require("./constants.js"),B=require("./field/field.vue2.js"),b={class:"pro-table-form"},F=e.defineComponent({__name:"form-render",setup(I,{expose:p}){const l=e.inject(y.TABLE_CONTEXT_PROVIDE_KEY),{columns:f,pageData:_,handleRequest:C}=l,{loading:v,antdFormProps:g,formColNum:u,formState:h,buttonCol:x}=e.toRefs(l),n=e.ref();function c(t){return t.valueType!=="option"&&!t.hideInForm}const N=t=>t.dataIndex;function i(){_.pageNum=1,C()}function V(){n.value&&n.value.validate().then(()=>{i()}).catch(console.error)}function k(){n.value&&(n.value.resetFields(),i())}const a=e.computed(()=>(u==null?void 0:u.value)||0),d=e.computed(()=>24/a.value),w=e.computed(()=>{const t=f.filter(c).length;return(a.value-1-t%a.value)*d.value});function s(t,m=!1){return t={span:d.value,...t||{}},m&&t.offset==null&&(t.offset=w.value),t}return p({formRef:n}),(t,m)=>(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(e.unref(r.Form),e.mergeProps({ref_key:"formRef",ref:n,autocomplete:"off","label-col":{span:5}},e.unref(g),{model:e.unref(h)}),{default:e.withCtx(()=>[e.createVNode(e.unref(r.Row),{gutter:[0,24]},{default:e.withCtx(()=>[e.createCommentVNode(" TODO 处理 key 的问题, 有的项没有 key, 有的项没有 dataIndex "),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c(o)?(e.openBlock(),e.createBlock(e.unref(r.Col),e.mergeProps({key:o.key,ref_for:!0},s(o.fieldCol)),{default:e.withCtx(()=>[e.createVNode(e.unref(r.FormItem),e.mergeProps({label:o.title,name:N(o),ref_for:!0},o.formItemProps),{default:e.withCtx(()=>[e.createVNode(B.default,{column:o},null,8,["column"])]),_:2},1040,["label","name"])]),_:2},1040)):e.createCommentVNode("v-if",!0)],64))),256)),e.createCommentVNode(" 重置查询按钮 "),e.createVNode(e.unref(r.Col),e.normalizeProps(e.guardReactiveProps(s(e.unref(x),!0))),{default:e.withCtx(()=>[e.createVNode(e.unref(r.FormItem),{"wrapper-col":{style:{textAlign:"right"}}},{default:e.withCtx(()=>[e.createVNode(e.unref(r.Space),null,{default:e.withCtx(()=>[e.createVNode(e.unref(r.Button),{onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1}),e.createVNode(e.unref(r.Button),{type:"primary",loading:e.unref(v),onClick:V},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},16)]),_:1})]),_:1},16,["model"])]))}});exports.default=F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=
|
|
1
|
+
@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=61393) format("woff2"),url(fonts/iconfont.woff?t=71579) format("woff"),url(fonts/iconfont.ttf?t=50218) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-title-icon:before{content:"\e680"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-virtual-list-container{margin:0 auto;position:relative}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto;position:absolute;left:50%}.king-pro-title{border-bottom:1px solid #ccc;font-weight:500;display:flex;align-items:center}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-modal .ant-modal-title{flex:1}.king-pro-modal .pro-modal-title{cursor:move;width:100%}.king-pro-area-select{width:100%}@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-virtual-list-container{margin:0 auto;position:relative}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto;position:absolute;left:50%}.king-pro-title{border-bottom:1px solid #ccc;font-weight:500;display:flex;align-items:center}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-modal .ant-modal-title{flex:1}.king-pro-modal .pro-modal-title{cursor:move;width:100%}.king-pro-area-select{width:100%}@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=35755) format("woff2"),url(fonts/iconfont.woff?t=34854) format("woff"),url(fonts/iconfont.ttf?t=39008) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-title-icon:before{content:"\e680"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { SFCWithInstall } from '../utils/install';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
|
|
3
3
|
export * from './src/types';
|
|
4
4
|
export declare const KCollapseTranstion: SFCWithInstall<{
|
|
5
|
-
new (...args: any[]):
|
|
5
|
+
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
6
6
|
readonly mode: {
|
|
7
7
|
readonly type: PropType<"horizontal" | "vertical">;
|
|
8
8
|
readonly required: true;
|
|
9
9
|
};
|
|
10
|
-
}
|
|
10
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
11
|
+
readonly mode: {
|
|
12
|
+
readonly type: PropType<"horizontal" | "vertical">;
|
|
13
|
+
readonly required: true;
|
|
14
|
+
};
|
|
15
|
+
}>>, {}, true, {}, {}, {
|
|
11
16
|
P: {};
|
|
12
17
|
B: {};
|
|
13
18
|
D: {};
|
|
@@ -19,7 +24,7 @@ export declare const KCollapseTranstion: SFCWithInstall<{
|
|
|
19
24
|
readonly type: PropType<"horizontal" | "vertical">;
|
|
20
25
|
readonly required: true;
|
|
21
26
|
};
|
|
22
|
-
}
|
|
27
|
+
}>>, {}, {}, {}, {}, {}>;
|
|
23
28
|
__isFragment?: never;
|
|
24
29
|
__isTeleport?: never;
|
|
25
30
|
__isSuspense?: never;
|
|
@@ -28,7 +33,7 @@ export declare const KCollapseTranstion: SFCWithInstall<{
|
|
|
28
33
|
readonly type: PropType<"horizontal" | "vertical">;
|
|
29
34
|
readonly required: true;
|
|
30
35
|
};
|
|
31
|
-
}
|
|
36
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
32
37
|
$slots: {
|
|
33
38
|
default?(_: {}): any;
|
|
34
39
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefineComponent,
|
|
1
|
+
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
4
|
slots: {
|
|
@@ -8,17 +8,17 @@ declare function __VLS_template(): {
|
|
|
8
8
|
rootEl: any;
|
|
9
9
|
};
|
|
10
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: DefineComponent<
|
|
11
|
+
declare const __VLS_component: DefineComponent<{
|
|
12
12
|
readonly mode: {
|
|
13
13
|
readonly type: PropType<"horizontal" | "vertical">;
|
|
14
14
|
readonly required: true;
|
|
15
15
|
};
|
|
16
|
-
}
|
|
16
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
17
17
|
readonly mode: {
|
|
18
18
|
readonly type: PropType<"horizontal" | "vertical">;
|
|
19
19
|
readonly required: true;
|
|
20
20
|
};
|
|
21
|
-
}
|
|
21
|
+
}>>, {}, {}>;
|
|
22
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
23
|
export default _default;
|
|
24
24
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefineComponent,
|
|
1
|
+
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
2
|
import { Arrayable, FormItemRule } from './form';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
attrs: Partial<{}>;
|
|
@@ -9,19 +9,19 @@ declare function __VLS_template(): {
|
|
|
9
9
|
rootEl: HTMLDivElement;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: DefineComponent<
|
|
12
|
+
declare const __VLS_component: DefineComponent<{
|
|
13
13
|
readonly label: StringConstructor;
|
|
14
14
|
readonly prop: StringConstructor;
|
|
15
15
|
readonly rules: {
|
|
16
16
|
readonly type: PropType<Arrayable<FormItemRule>>;
|
|
17
17
|
};
|
|
18
|
-
}
|
|
18
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
19
19
|
readonly label: StringConstructor;
|
|
20
20
|
readonly prop: StringConstructor;
|
|
21
21
|
readonly rules: {
|
|
22
22
|
readonly type: PropType<Arrayable<FormItemRule>>;
|
|
23
23
|
};
|
|
24
|
-
}
|
|
24
|
+
}>>, {}, {}>;
|
|
25
25
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
26
|
export default _default;
|
|
27
27
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps,
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
4
|
slots: {
|
|
@@ -8,7 +8,7 @@ declare function __VLS_template(): {
|
|
|
8
8
|
rootEl: HTMLFormElement;
|
|
9
9
|
};
|
|
10
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<
|
|
11
|
+
declare const __VLS_component: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
|
|
12
12
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
13
|
export default _default;
|
|
14
14
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
import { SFCWithInstall } from '../utils/install';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateComponentPublicInstance, ExtractPropTypes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, PropType } from 'vue';
|
|
3
3
|
import { Arrayable, FormItemRule } from './component/form';
|
|
4
4
|
export * from './component/form';
|
|
5
5
|
export declare const KForm: SFCWithInstall<{
|
|
6
|
-
new (...args: any[]):
|
|
6
|
+
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{}>>, {}, true, {}, {}, {
|
|
7
7
|
P: {};
|
|
8
8
|
B: {};
|
|
9
9
|
D: {};
|
|
10
10
|
C: {};
|
|
11
11
|
M: {};
|
|
12
12
|
Defaults: {};
|
|
13
|
-
}, Readonly<
|
|
13
|
+
}, Readonly< ExtractPropTypes<{}>>, {}, {}, {}, {}, {}>;
|
|
14
14
|
__isFragment?: never;
|
|
15
15
|
__isTeleport?: never;
|
|
16
16
|
__isSuspense?: never;
|
|
17
|
-
} & ComponentOptionsBase<Readonly<
|
|
17
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
18
18
|
$slots: {
|
|
19
19
|
default?(_: {}): any;
|
|
20
20
|
};
|
|
21
21
|
})>;
|
|
22
22
|
export declare const KFormItem: SFCWithInstall<{
|
|
23
|
-
new (...args: any[]):
|
|
23
|
+
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
24
24
|
readonly label: StringConstructor;
|
|
25
25
|
readonly prop: StringConstructor;
|
|
26
26
|
readonly rules: {
|
|
27
27
|
readonly type: PropType<Arrayable<FormItemRule>>;
|
|
28
28
|
};
|
|
29
|
-
}
|
|
29
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
30
|
+
readonly label: StringConstructor;
|
|
31
|
+
readonly prop: StringConstructor;
|
|
32
|
+
readonly rules: {
|
|
33
|
+
readonly type: PropType<Arrayable<FormItemRule>>;
|
|
34
|
+
};
|
|
35
|
+
}>>, {}, true, {}, {}, {
|
|
30
36
|
P: {};
|
|
31
37
|
B: {};
|
|
32
38
|
D: {};
|
|
@@ -39,7 +45,7 @@ export declare const KFormItem: SFCWithInstall<{
|
|
|
39
45
|
readonly rules: {
|
|
40
46
|
readonly type: PropType<Arrayable<FormItemRule>>;
|
|
41
47
|
};
|
|
42
|
-
}
|
|
48
|
+
}>>, {}, {}, {}, {}, {}>;
|
|
43
49
|
__isFragment?: never;
|
|
44
50
|
__isTeleport?: never;
|
|
45
51
|
__isSuspense?: never;
|
|
@@ -49,7 +55,7 @@ export declare const KFormItem: SFCWithInstall<{
|
|
|
49
55
|
readonly rules: {
|
|
50
56
|
readonly type: PropType<Arrayable<FormItemRule>>;
|
|
51
57
|
};
|
|
52
|
-
}
|
|
58
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
53
59
|
$slots: {
|
|
54
60
|
default?(_: {}): any;
|
|
55
61
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SFCWithInstall } from '../utils/install';
|
|
2
|
-
import { DefineComponent,
|
|
3
|
-
export declare const KIcon: SFCWithInstall<DefineComponent<
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
+
export declare const KIcon: SFCWithInstall<DefineComponent<{
|
|
4
4
|
readonly name: {
|
|
5
5
|
readonly type: StringConstructor;
|
|
6
6
|
readonly required: true;
|
|
@@ -13,7 +13,7 @@ export declare const KIcon: SFCWithInstall<DefineComponent<ExtractPropTypes<{
|
|
|
13
13
|
readonly type: StringConstructor;
|
|
14
14
|
readonly default: "#333";
|
|
15
15
|
};
|
|
16
|
-
}
|
|
16
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
17
17
|
readonly name: {
|
|
18
18
|
readonly type: StringConstructor;
|
|
19
19
|
readonly required: true;
|
|
@@ -26,8 +26,8 @@ export declare const KIcon: SFCWithInstall<DefineComponent<ExtractPropTypes<{
|
|
|
26
26
|
readonly type: StringConstructor;
|
|
27
27
|
readonly default: "#333";
|
|
28
28
|
};
|
|
29
|
-
}
|
|
29
|
+
}>>, {
|
|
30
30
|
readonly size: number;
|
|
31
31
|
readonly color: string;
|
|
32
|
-
}, {}
|
|
32
|
+
}, {}>>;
|
|
33
33
|
export default KIcon;
|