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