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