@king-one/antdv 1.0.67 → 1.0.69
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-picker/src/ProPicker.vue2.mjs +27 -27
- package/dist/lib/components/pro-picker/src/ProPicker.vue2.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/pro-title.css +1 -1
- package/dist/types/components/pro-picker/index.d.ts +4 -4
- package/dist/types/components/pro-picker/src/ProPicker.vue.d.ts +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { debounce as
|
|
3
|
-
import { Select as
|
|
1
|
+
import { defineComponent as g, mergeModels as d, useModel as y, reactive as b, watch as P, openBlock as k, createBlock as S, unref as s, createSlots as C, withCtx as w, createVNode as A } from "vue";
|
|
2
|
+
import { debounce as M } from "lodash-es";
|
|
3
|
+
import { Select as O, Spin as B } from "ant-design-vue";
|
|
4
4
|
import { proPickerApi as p } from "../apis/pro-picker.api.mjs";
|
|
5
|
-
import { ProPickerProps as
|
|
6
|
-
const
|
|
5
|
+
import { ProPickerProps as _, PickerApiEnum as u } from "./types.mjs";
|
|
6
|
+
const N = /* @__PURE__ */ g({
|
|
7
7
|
name: "ProPicker",
|
|
8
8
|
__name: "ProPicker",
|
|
9
|
-
props: /* @__PURE__ */ d(
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
props: /* @__PURE__ */ d(_, {
|
|
10
|
+
value: {},
|
|
11
|
+
valueModifiers: {}
|
|
12
12
|
}),
|
|
13
|
-
emits: /* @__PURE__ */ d(["change"], ["update:
|
|
14
|
-
setup(c, { emit:
|
|
15
|
-
const
|
|
13
|
+
emits: /* @__PURE__ */ d(["change"], ["update:value"]),
|
|
14
|
+
setup(c, { emit: f }) {
|
|
15
|
+
const l = c, m = f, i = y(c, "value"), t = b({
|
|
16
16
|
data: [],
|
|
17
17
|
fetching: !1
|
|
18
18
|
});
|
|
@@ -21,22 +21,22 @@ const F = /* @__PURE__ */ v({
|
|
|
21
21
|
(e) => {
|
|
22
22
|
if (!e || t.data.some((a) => a.value === e))
|
|
23
23
|
return;
|
|
24
|
-
const n =
|
|
24
|
+
const n = u[l.type];
|
|
25
25
|
typeof e == "string" || typeof e == "number" ? p.getOps({
|
|
26
26
|
url: n,
|
|
27
27
|
params: { value: e }
|
|
28
28
|
}).then((a) => {
|
|
29
|
-
t.data = a.data.options.map((
|
|
30
|
-
label:
|
|
31
|
-
value:
|
|
29
|
+
t.data = a.data.options.map((r) => ({
|
|
30
|
+
label: r.label,
|
|
31
|
+
value: r.value
|
|
32
32
|
}));
|
|
33
33
|
}) : Array.isArray(e) && p.getOps({
|
|
34
34
|
url: n,
|
|
35
35
|
params: { value: e.join(",") }
|
|
36
36
|
}).then((a) => {
|
|
37
|
-
t.data = a.data.options.map((
|
|
38
|
-
label:
|
|
39
|
-
value:
|
|
37
|
+
t.data = a.data.options.map((r) => ({
|
|
38
|
+
label: r.label,
|
|
39
|
+
value: r.value
|
|
40
40
|
})), t.fetching = !1;
|
|
41
41
|
});
|
|
42
42
|
},
|
|
@@ -44,10 +44,10 @@ const F = /* @__PURE__ */ v({
|
|
|
44
44
|
immediate: !0
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
const h =
|
|
47
|
+
const h = M((e) => {
|
|
48
48
|
if (e) {
|
|
49
49
|
t.fetching = !0;
|
|
50
|
-
const o =
|
|
50
|
+
const o = u[l.type];
|
|
51
51
|
p.getOps({ url: o, params: { label: e } }).then((n) => {
|
|
52
52
|
t.data = n.data.options.map((a) => ({
|
|
53
53
|
label: a.label,
|
|
@@ -55,11 +55,11 @@ const F = /* @__PURE__ */ v({
|
|
|
55
55
|
})), t.fetching = !1;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
},
|
|
59
|
-
function
|
|
60
|
-
|
|
58
|
+
}, l.delay);
|
|
59
|
+
function v(e, o) {
|
|
60
|
+
m("change", o);
|
|
61
61
|
}
|
|
62
|
-
return (e, o) => (k(), S(s(
|
|
62
|
+
return (e, o) => (k(), S(s(O), {
|
|
63
63
|
value: i.value,
|
|
64
64
|
"onUpdate:value": o[0] || (o[0] = (n) => i.value = n),
|
|
65
65
|
mode: e.mode,
|
|
@@ -69,7 +69,7 @@ const F = /* @__PURE__ */ v({
|
|
|
69
69
|
"filter-option": !1,
|
|
70
70
|
"not-found-content": t.fetching ? void 0 : null,
|
|
71
71
|
options: t.data,
|
|
72
|
-
onChange:
|
|
72
|
+
onChange: v,
|
|
73
73
|
onSearch: s(h)
|
|
74
74
|
}, C({
|
|
75
75
|
_: 2
|
|
@@ -78,7 +78,7 @@ const F = /* @__PURE__ */ v({
|
|
|
78
78
|
t.fetching ? {
|
|
79
79
|
name: "notFoundContent",
|
|
80
80
|
fn: w(() => [
|
|
81
|
-
A(s(
|
|
81
|
+
A(s(B), { size: "small" })
|
|
82
82
|
]),
|
|
83
83
|
key: "0"
|
|
84
84
|
} : void 0
|
|
@@ -86,5 +86,5 @@ const F = /* @__PURE__ */ v({
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
export {
|
|
89
|
-
|
|
89
|
+
N as default
|
|
90
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),v=require("lodash-es"),d=require("ant-design-vue"),c=require("../apis/pro-picker.api.js"),u=require("./types.js"),P=t.defineComponent({name:"ProPicker",__name:"ProPicker",props:t.mergeModels(u.ProPickerProps,{
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),v=require("lodash-es"),d=require("ant-design-vue"),c=require("../apis/pro-picker.api.js"),u=require("./types.js"),P=t.defineComponent({name:"ProPicker",__name:"ProPicker",props:t.mergeModels(u.ProPickerProps,{value:{},valueModifiers:{}}),emits:t.mergeModels(["change"],["update:value"]),setup(p,{emit:f}){const i=p,h=f,s=t.useModel(p,"value"),a=t.reactive({data:[],fetching:!1});t.watch(s,e=>{if(!e||a.data.some(n=>n.value===e))return;const r=u.PickerApiEnum[i.type];typeof e=="string"||typeof e=="number"?c.proPickerApi.getOps({url:r,params:{value:e}}).then(n=>{a.data=n.data.options.map(l=>({label:l.label,value:l.value}))}):Array.isArray(e)&&c.proPickerApi.getOps({url:r,params:{value:e.join(",")}}).then(n=>{a.data=n.data.options.map(l=>({label:l.label,value:l.value})),a.fetching=!1})},{immediate:!0});const m=v.debounce(e=>{if(e){a.fetching=!0;const o=u.PickerApiEnum[i.type];c.proPickerApi.getOps({url:o,params:{label:e}}).then(r=>{a.data=r.data.options.map(n=>({label:n.label,value:n.value})),a.fetching=!1})}},i.delay);function g(e,o){h("change",o)}return(e,o)=>(t.openBlock(),t.createBlock(t.unref(d.Select),{value:s.value,"onUpdate:value":o[0]||(o[0]=r=>s.value=r),mode:e.mode,"show-search":"",placeholder:e.placeholder,style:{width:"100%"},"filter-option":!1,"not-found-content":a.fetching?void 0:null,options:a.data,onChange:g,onSearch:t.unref(m)},t.createSlots({_:2},[a.fetching?{name:"notFoundContent",fn:t.withCtx(()=>[t.createVNode(t.unref(d.Spin),{size:"small"})]),key:"0"}:void 0]),1032,["value","mode","placeholder","not-found-content","options","onSearch"]))}});exports.default=P;
|
|
@@ -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=7246) format("woff2"),url(fonts/iconfont.woff?t=28361) format("woff"),url(fonts/iconfont.ttf?t=36646) 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}.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=6990) format("woff2"),url(fonts/iconfont.woff?t=89318) format("woff"),url(fonts/iconfont.ttf?t=76164) 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
|
-
.king-pro-title{border-bottom:1px solid #ccc;font-weight:500}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}
|
|
1
|
+
.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}
|
|
@@ -18,12 +18,12 @@ export declare const KProPicker: SFCWithInstall<DefineComponent<{
|
|
|
18
18
|
readonly type: NumberConstructor;
|
|
19
19
|
readonly default: 200;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
value: {
|
|
22
22
|
type: PropType<string | number | string[] | number[]>;
|
|
23
23
|
};
|
|
24
24
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
25
25
|
change: (value?: ProPickerOption | ProPickerOption[] | undefined) => void;
|
|
26
|
-
"update:
|
|
26
|
+
"update:value": (value: string | number | string[] | number[]) => void;
|
|
27
27
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
28
28
|
type: {
|
|
29
29
|
readonly type: PropType<ProPickerType>;
|
|
@@ -40,12 +40,12 @@ export declare const KProPicker: SFCWithInstall<DefineComponent<{
|
|
|
40
40
|
readonly type: NumberConstructor;
|
|
41
41
|
readonly default: 200;
|
|
42
42
|
};
|
|
43
|
-
|
|
43
|
+
value: {
|
|
44
44
|
type: PropType<string | number | string[] | number[]>;
|
|
45
45
|
};
|
|
46
46
|
}>> & {
|
|
47
47
|
onChange?: ((value?: ProPickerOption | ProPickerOption[] | undefined) => any) | undefined;
|
|
48
|
-
"onUpdate:
|
|
48
|
+
"onUpdate:value"?: ((value: string | number | string[] | number[]) => any) | undefined;
|
|
49
49
|
}, {
|
|
50
50
|
type: "company" | "user" | "department" | "flowApplication";
|
|
51
51
|
placeholder: string;
|
|
@@ -16,12 +16,12 @@ declare const _default: DefineComponent<{
|
|
|
16
16
|
readonly type: NumberConstructor;
|
|
17
17
|
readonly default: 200;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
value: {
|
|
20
20
|
type: PropType<string | number | string[] | number[]>;
|
|
21
21
|
};
|
|
22
22
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
23
23
|
change: (value?: ProPickerOption | ProPickerOption[] | undefined) => void;
|
|
24
|
-
"update:
|
|
24
|
+
"update:value": (value: string | number | string[] | number[]) => void;
|
|
25
25
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
26
26
|
type: {
|
|
27
27
|
readonly type: PropType<ProPickerType>;
|
|
@@ -38,12 +38,12 @@ declare const _default: DefineComponent<{
|
|
|
38
38
|
readonly type: NumberConstructor;
|
|
39
39
|
readonly default: 200;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
value: {
|
|
42
42
|
type: PropType<string | number | string[] | number[]>;
|
|
43
43
|
};
|
|
44
44
|
}>> & {
|
|
45
45
|
onChange?: ((value?: ProPickerOption | ProPickerOption[] | undefined) => any) | undefined;
|
|
46
|
-
"onUpdate:
|
|
46
|
+
"onUpdate:value"?: ((value: string | number | string[] | number[]) => any) | undefined;
|
|
47
47
|
}, {
|
|
48
48
|
type: "company" | "user" | "department" | "flowApplication";
|
|
49
49
|
placeholder: string;
|