@king-one/antdv 1.0.90 → 1.0.91
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.
|
@@ -1,118 +1,112 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, inject as C, toRefs as I, computed as f, reactive as E, ref as N, h as P, watchEffect as S, readonly as w, provide as B, createElementBlock as p, openBlock as u, Fragment as F, createCommentVNode as m, createElementVNode as D, createBlock as a, resolveDynamicComponent as y, unref as U, normalizeProps as $, mergeProps as q } from "vue";
|
|
2
2
|
import { TABLE_CONTEXT_PROVIDE_KEY as A, FIELD_CONTEXT_PROVIDE_KEY as K } from "../constants.mjs";
|
|
3
|
-
import { getAvailableVNode as
|
|
3
|
+
import { getAvailableVNode as h, 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";
|
|
7
7
|
import "./field-date-range/field-date-range.vue.mjs";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const z = { class: "field" },
|
|
8
|
+
import L from "./field-input/field-input.vue2.mjs";
|
|
9
|
+
import M from "./field-select/field-select.vue2.mjs";
|
|
10
|
+
import X from "./field-radio/field-radio.vue2.mjs";
|
|
11
|
+
import Y from "./field-date-range/field-date-range.vue2.mjs";
|
|
12
|
+
const z = { class: "field" }, oe = /* @__PURE__ */ g({
|
|
13
13
|
__name: "field",
|
|
14
14
|
props: {
|
|
15
15
|
column: {}
|
|
16
16
|
},
|
|
17
17
|
setup(e) {
|
|
18
|
-
const
|
|
18
|
+
const v = C(A), { tableSlots: d } = v, { formState: c } = I(v), V = e.column.dataIndex, n = f({
|
|
19
19
|
get() {
|
|
20
|
-
return
|
|
20
|
+
return c.value[V];
|
|
21
21
|
},
|
|
22
|
-
set(
|
|
23
|
-
|
|
22
|
+
set(o) {
|
|
23
|
+
c.value[V] = o;
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
25
|
+
}), s = E({
|
|
26
26
|
column: e.column,
|
|
27
|
-
value:
|
|
28
|
-
formState:
|
|
29
|
-
}),
|
|
27
|
+
value: n.value,
|
|
28
|
+
formState: c
|
|
29
|
+
}), k = f(() => d.formField ? !!h(d.formField(s)).length : !1), r = f(
|
|
30
30
|
() => e.column.valueType || (e.column.valueEnum ? "select" : "text")
|
|
31
|
-
),
|
|
32
|
-
function
|
|
33
|
-
e.column.
|
|
31
|
+
), i = N([]);
|
|
32
|
+
function x() {
|
|
33
|
+
return e.column.customFormFieldRender ? P("div", {}, [e.column.customFormFieldRender(s)]) : null;
|
|
34
|
+
}
|
|
35
|
+
function b() {
|
|
36
|
+
e.column.request ? R() : O();
|
|
34
37
|
}
|
|
35
|
-
|
|
36
|
-
e.column._fieldOptions = w(
|
|
38
|
+
b(), S(() => {
|
|
39
|
+
e.column._fieldOptions = w(i.value);
|
|
37
40
|
});
|
|
38
|
-
function
|
|
41
|
+
function O() {
|
|
39
42
|
if (e.column.valueEnum) {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
text:
|
|
43
|
-
value:
|
|
44
|
-
label:
|
|
45
|
-
disabled:
|
|
43
|
+
const o = new Map(Object.entries(e.column.valueEnum));
|
|
44
|
+
i.value = Array.from(o).map(([t, l]) => ({
|
|
45
|
+
text: l.text,
|
|
46
|
+
value: t,
|
|
47
|
+
label: l.text,
|
|
48
|
+
disabled: l.disabled
|
|
46
49
|
}));
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
|
-
async function
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
+
async function R() {
|
|
53
|
+
const o = await j(e.column.request, {});
|
|
54
|
+
o && (i.value = o);
|
|
52
55
|
}
|
|
53
|
-
const
|
|
54
|
-
fieldOptions:
|
|
56
|
+
const T = E({
|
|
57
|
+
fieldOptions: i,
|
|
55
58
|
column: e.column
|
|
56
59
|
});
|
|
57
60
|
return B(
|
|
58
61
|
K,
|
|
59
|
-
|
|
60
|
-
), (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
[
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
64
|
|
106
|
-
/* STABLE_FRAGMENT */
|
|
107
|
-
))
|
|
108
|
-
])
|
|
109
|
-
],
|
|
110
|
-
2112
|
|
111
|
-
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
112
|
-
);
|
|
113
|
-
};
|
|
62
|
+
T
|
|
63
|
+
), (o, t) => (u(), p(
|
|
64
|
+
F,
|
|
65
|
+
null,
|
|
66
|
+
[
|
|
67
|
+
m(" eslint-disable vue/component-name-in-template-casing "),
|
|
68
|
+
D("div", z, [
|
|
69
|
+
k.value ? (u(), a(
|
|
70
|
+
y(U(d).formField),
|
|
71
|
+
$(q({ key: 0 }, s)),
|
|
72
|
+
null,
|
|
73
|
+
16
|
|
74
|
+
/* FULL_PROPS */
|
|
75
|
+
)) : o.column.customFormFieldRender ? (u(), a(y(x()), { key: 1 })) : (u(), p(
|
|
76
|
+
F,
|
|
77
|
+
{ key: 2 },
|
|
78
|
+
[
|
|
79
|
+
r.value === "text" ? (u(), a(L, {
|
|
80
|
+
key: 0,
|
|
81
|
+
modelValue: n.value,
|
|
82
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => n.value = l)
|
|
83
|
+
}, null, 8, ["modelValue"])) : m("v-if", !0),
|
|
84
|
+
r.value === "select" ? (u(), a(M, {
|
|
85
|
+
key: 1,
|
|
86
|
+
modelValue: n.value,
|
|
87
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => n.value = l)
|
|
88
|
+
}, null, 8, ["modelValue"])) : m("v-if", !0),
|
|
89
|
+
r.value === "radio" ? (u(), a(X, {
|
|
90
|
+
key: 2,
|
|
91
|
+
modelValue: n.value,
|
|
92
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => n.value = l)
|
|
93
|
+
}, null, 8, ["modelValue"])) : m("v-if", !0),
|
|
94
|
+
r.value === "dateRange" ? (u(), a(Y, {
|
|
95
|
+
key: 3,
|
|
96
|
+
modelValue: n.value,
|
|
97
|
+
"onUpdate:modelValue": t[3] || (t[3] = (l) => n.value = l)
|
|
98
|
+
}, null, 8, ["modelValue"])) : m("v-if", !0)
|
|
99
|
+
],
|
|
100
|
+
64
|
|
101
|
+
/* STABLE_FRAGMENT */
|
|
102
|
+
))
|
|
103
|
+
])
|
|
104
|
+
],
|
|
105
|
+
2112
|
|
106
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
107
|
+
));
|
|
114
108
|
}
|
|
115
109
|
});
|
|
116
110
|
export {
|
|
117
|
-
|
|
111
|
+
oe as default
|
|
118
112
|
};
|
|
@@ -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"),v=require("../constants.js"),f=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 F=require("./field-input/field-input.vue2.js"),g=require("./field-select/field-select.vue2.js"),q=require("./field-radio/field-radio.vue2.js"),_=require("./field-date-range/field-date-range.vue2.js"),C={class:"field"},b=e.defineComponent({__name:"field",props:{column:{}},setup(l){const d=e.inject(v.TABLE_CONTEXT_PROVIDE_KEY),{tableSlots:c}=d,{formState:m}=e.toRefs(d),s=l.column.dataIndex,u=e.computed({get(){return m.value[s]},set(o){m.value[s]=o}}),i=e.reactive({column:l.column,value:u.value,formState:m}),p=e.computed(()=>c.formField?!!f.getAvailableVNode(c.formField(i)).length:!1),a=e.computed(()=>l.column.valueType||(l.column.valueEnum?"select":"text")),r=e.ref([]);function k(){return l.column.customFormFieldRender?e.h("div",{},[l.column.customFormFieldRender(i)]):null}function V(){l.column.request?B():y()}V(),e.watchEffect(()=>{l.column._fieldOptions=e.readonly(r.value)});function y(){if(l.column.valueEnum){const o=new Map(Object.entries(l.column.valueEnum));r.value=Array.from(o).map(([n,t])=>({text:t.text,value:n,label:t.text,disabled:t.disabled}))}}async function B(){const o=await f.handleFn(l.column.request,{});o&&(r.value=o)}const E=e.reactive({fieldOptions:r,column:l.column});return e.provide(v.FIELD_CONTEXT_PROVIDE_KEY,E),(o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" eslint-disable vue/component-name-in-template-casing "),e.createElementVNode("div",C,[p.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c).formField),e.normalizeProps(e.mergeProps({key:0},i)),null,16)):o.column.customFormFieldRender?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k()),{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[a.value==="text"?(e.openBlock(),e.createBlock(F.default,{key:0,modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=t=>u.value=t)},null,8,["modelValue"])):e.createCommentVNode("v-if",!0),a.value==="select"?(e.openBlock(),e.createBlock(g.default,{key:1,modelValue:u.value,"onUpdate:modelValue":n[1]||(n[1]=t=>u.value=t)},null,8,["modelValue"])):e.createCommentVNode("v-if",!0),a.value==="radio"?(e.openBlock(),e.createBlock(q.default,{key:2,modelValue:u.value,"onUpdate:modelValue":n[2]||(n[2]=t=>u.value=t)},null,8,["modelValue"])):e.createCommentVNode("v-if",!0),a.value==="dateRange"?(e.openBlock(),e.createBlock(_.default,{key:3,modelValue:u.value,"onUpdate:modelValue":n[3]||(n[3]=t=>u.value=t)},null,8,["modelValue"])):e.createCommentVNode("v-if",!0)],64))])],2112))}});exports.default=b;
|
|
@@ -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=47797) format("woff2"),url(fonts/iconfont.woff?t=93821) format("woff"),url(fonts/iconfont.ttf?t=78140) 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=81252) format("woff2"),url(fonts/iconfont.woff?t=69457) format("woff"),url(fonts/iconfont.ttf?t=70159) 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"}
|