@king-one/antdv 1.0.31 → 1.0.33
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 +13 -0
- package/dist/es/components/index.mjs +2 -0
- package/dist/es/components/pro-tag/index.mjs +10 -0
- package/dist/es/components/pro-tag/src/ProTag.vue.mjs +4 -0
- package/dist/es/components/pro-tag/src/ProTag.vue2.mjs +37 -0
- package/dist/es/components/pro-tag/src/types.mjs +9 -0
- package/dist/es/hooks/index.mjs +5 -0
- package/dist/es/hooks/useProForm.mjs +35 -0
- package/dist/es/index.mjs +29 -21
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/pro-tag/index.js +1 -0
- package/dist/lib/components/pro-tag/src/ProTag.vue.js +1 -0
- package/dist/lib/components/pro-tag/src/ProTag.vue2.js +1 -0
- package/dist/lib/components/pro-tag/src/types.js +1 -0
- package/dist/lib/hooks/index.js +1 -0
- package/dist/lib/hooks/useProForm.js +1 -0
- package/dist/lib/index.js +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/pro-title.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/pro-tag/index.d.ts +36 -0
- package/dist/types/components/pro-tag/src/ProTag.vue.d.ts +34 -0
- package/dist/types/components/pro-tag/src/types.d.ts +15 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/use-namespace/index.d.ts +23 -0
- package/dist/types/hooks/useProForm.d.ts +14 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,12 @@ import { KProDialog as p } from "./pro-dialog/index.mjs";
|
|
|
4
4
|
import { KProTitle as f } from "./pro-title/index.mjs";
|
|
5
5
|
import { KScrollBar as K } from "./scroll-bar/index.mjs";
|
|
6
6
|
import { KScaleVirtualList as s } from "./scale-virtual-list/index.mjs";
|
|
7
|
+
import { KProTag as T } from "./pro-tag/index.mjs";
|
|
7
8
|
export {
|
|
8
9
|
l as KCollapseTranstion,
|
|
9
10
|
t as KForm,
|
|
10
11
|
p as KProDialog,
|
|
12
|
+
T as KProTag,
|
|
11
13
|
f as KProTitle,
|
|
12
14
|
s as KScaleVirtualList,
|
|
13
15
|
K as KScrollBar
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { withInstall as o } from "../utils/install.mjs";
|
|
2
|
+
import "./src/ProTag.vue.mjs";
|
|
3
|
+
import { proTagProps as s } from "./src/types.mjs";
|
|
4
|
+
import r from "./src/ProTag.vue2.mjs";
|
|
5
|
+
const a = o(r);
|
|
6
|
+
export {
|
|
7
|
+
a as KProTag,
|
|
8
|
+
a as default,
|
|
9
|
+
s as proTagProps
|
|
10
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as p, mergeModels as u, useModel as d, computed as g, resolveComponent as i, openBlock as m, createBlock as f, withCtx as _, createTextVNode as T, toDisplayString as v } from "vue";
|
|
2
|
+
import { proTagProps as x } from "./types.mjs";
|
|
3
|
+
const M = /* @__PURE__ */ p({
|
|
4
|
+
name: "ProTag",
|
|
5
|
+
__name: "ProTag",
|
|
6
|
+
props: /* @__PURE__ */ u(x, {
|
|
7
|
+
tag: { type: [String, Number, Boolean], required: !0 },
|
|
8
|
+
tagModifiers: {}
|
|
9
|
+
}),
|
|
10
|
+
emits: ["update:tag"],
|
|
11
|
+
setup(e) {
|
|
12
|
+
const n = e, c = d(e, "tag"), t = g(() => n.options.find((o) => o.value === c.value));
|
|
13
|
+
return (l, o) => {
|
|
14
|
+
var a;
|
|
15
|
+
const s = i("ATag");
|
|
16
|
+
return m(), f(s, {
|
|
17
|
+
color: ((a = t.value) == null ? void 0 : a.color) || "default"
|
|
18
|
+
}, {
|
|
19
|
+
default: _(() => {
|
|
20
|
+
var r;
|
|
21
|
+
return [
|
|
22
|
+
T(
|
|
23
|
+
v(((r = t.value) == null ? void 0 : r.label) || ""),
|
|
24
|
+
1
|
|
25
|
+
/* TEXT */
|
|
26
|
+
)
|
|
27
|
+
];
|
|
28
|
+
}),
|
|
29
|
+
_: 1
|
|
30
|
+
/* STABLE */
|
|
31
|
+
}, 8, ["color"]);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
M as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cloneDeep as i } from "lodash-es";
|
|
2
|
+
import { ref as a, getCurrentInstance as u, unref as l } from "vue";
|
|
3
|
+
function d(o) {
|
|
4
|
+
const t = a(o), m = a(), n = u(), e = (s) => {
|
|
5
|
+
t.value = i(s);
|
|
6
|
+
}, r = () => {
|
|
7
|
+
var s;
|
|
8
|
+
t.value = o, (s = m.value) == null || s.resetFields();
|
|
9
|
+
}, c = {
|
|
10
|
+
setFormData: e
|
|
11
|
+
};
|
|
12
|
+
return n && (n == null || n.emit("initForm", c)), {
|
|
13
|
+
ruleForm: t,
|
|
14
|
+
formRef: m,
|
|
15
|
+
resetForm: r
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function v() {
|
|
19
|
+
const o = a(null), t = () => {
|
|
20
|
+
const e = l(o.value);
|
|
21
|
+
return e || console.error("useModal instance is undefined!"), e;
|
|
22
|
+
};
|
|
23
|
+
return [(e) => {
|
|
24
|
+
o.value = e;
|
|
25
|
+
}, {
|
|
26
|
+
setFormData: (e) => {
|
|
27
|
+
var r;
|
|
28
|
+
return (r = t()) == null ? void 0 : r.setFormData(e);
|
|
29
|
+
}
|
|
30
|
+
}];
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
d as useProForm,
|
|
34
|
+
v as useProFormInit
|
|
35
|
+
};
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,30 +1,38 @@
|
|
|
1
1
|
import r from "./installer.mjs";
|
|
2
2
|
import "./components/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import "./hooks/index.mjs";
|
|
4
|
+
import { formType as f } from "./components/form/component/form.mjs";
|
|
5
|
+
import { KForm as x } from "./components/form/index.mjs";
|
|
5
6
|
import { collapseProps as i } from "./components/collapse-transtion/src/types.mjs";
|
|
6
|
-
import { KCollapseTranstion as
|
|
7
|
-
import { useProDialog as
|
|
8
|
-
import { proDialogProps as
|
|
7
|
+
import { KCollapseTranstion as P } from "./components/collapse-transtion/index.mjs";
|
|
8
|
+
import { useProDialog as u, useProDialogInit as K } from "./components/pro-dialog/hooks/useProDialog.mjs";
|
|
9
|
+
import { proDialogProps as n } from "./components/pro-dialog/src/types.mjs";
|
|
9
10
|
import { KProDialog as D } from "./components/pro-dialog/index.mjs";
|
|
10
|
-
import { TitleProps as
|
|
11
|
-
import { KProTitle as
|
|
12
|
-
import { scrollbarProps as
|
|
13
|
-
import { KScrollBar as
|
|
14
|
-
import { KScaleVirtualList as
|
|
11
|
+
import { TitleProps as I } from "./components/pro-title/src/types.mjs";
|
|
12
|
+
import { KProTitle as b } from "./components/pro-title/index.mjs";
|
|
13
|
+
import { scrollbarProps as y } from "./components/scroll-bar/src/types.mjs";
|
|
14
|
+
import { KScrollBar as C } from "./components/scroll-bar/index.mjs";
|
|
15
|
+
import { KScaleVirtualList as V } from "./components/scale-virtual-list/index.mjs";
|
|
16
|
+
import { proTagProps as j } from "./components/pro-tag/src/types.mjs";
|
|
17
|
+
import { KProTag as q } from "./components/pro-tag/index.mjs";
|
|
18
|
+
import { useProForm as w, useProFormInit as z } from "./hooks/useProForm.mjs";
|
|
15
19
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
P as KCollapseTranstion,
|
|
21
|
+
x as KForm,
|
|
18
22
|
D as KProDialog,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
q as KProTag,
|
|
24
|
+
b as KProTitle,
|
|
25
|
+
V as KScaleVirtualList,
|
|
26
|
+
C as KScrollBar,
|
|
27
|
+
I as TitleProps,
|
|
23
28
|
i as collapseProps,
|
|
24
29
|
r as default,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
f as formType,
|
|
31
|
+
n as proDialogProps,
|
|
32
|
+
j as proTagProps,
|
|
33
|
+
y as scrollbarProps,
|
|
34
|
+
u as useProDialog,
|
|
35
|
+
K as useProDialogInit,
|
|
36
|
+
w as useProForm,
|
|
37
|
+
z as useProFormInit
|
|
30
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./form/index.js"),r=require("./collapse-transtion/index.js"),i=require("./pro-dialog/index.js"),o=require("./pro-title/index.js"),t=require("./scroll-bar/index.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./form/index.js"),r=require("./collapse-transtion/index.js"),i=require("./pro-dialog/index.js"),o=require("./pro-title/index.js"),t=require("./scroll-bar/index.js"),n=require("./scale-virtual-list/index.js"),l=require("./pro-tag/index.js");exports.KForm=e.KForm;exports.KCollapseTranstion=r.KCollapseTranstion;exports.KProDialog=i.KProDialog;exports.KProTitle=o.KProTitle;exports.KScrollBar=t.KScrollBar;exports.KScaleVirtualList=n.KScaleVirtualList;exports.KProTag=l.KProTag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../utils/install.js");require("./src/ProTag.vue.js");const t=require("./src/types.js"),o=require("./src/ProTag.vue2.js"),e=r.withInstall(o.default);exports.proTagProps=t.proTagProps;exports.KProTag=e;exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ProTag.vue2.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./types.js"),d=e.defineComponent({name:"ProTag",__name:"ProTag",props:e.mergeModels(i.proTagProps,{tag:{type:[String,Number,Boolean],required:!0},tagModifiers:{}}),emits:["update:tag"],setup(t){const u=t,l=e.useModel(t,"tag"),o=e.computed(()=>u.options.find(a=>a.value===l.value));return(s,a)=>{var r;const c=e.resolveComponent("ATag");return e.openBlock(),e.createBlock(c,{color:((r=o.value)==null?void 0:r.color)||"default"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString(((n=o.value)==null?void 0:n.label)||""),1)]}),_:1},8,["color"])}}});exports.default=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={options:{type:Array,required:!0}};exports.proTagProps=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./useProForm.js");exports.useProForm=r.useProForm;exports.useProFormInit=r.useProFormInit;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("lodash-es"),n=require("vue");function m(o){const t=n.ref(o),c=n.ref(),r=n.getCurrentInstance(),e=u=>{t.value=a.cloneDeep(u)},s=()=>{var u;t.value=o,(u=c.value)==null||u.resetFields()},i={setFormData:e};return r&&(r==null||r.emit("initForm",i)),{ruleForm:t,formRef:c,resetForm:s}}function l(){const o=n.ref(null),t=()=>{const e=n.unref(o.value);return e||console.error("useModal instance is undefined!"),e};return[e=>{o.value=e},{setFormData:e=>{var s;return(s=t())==null?void 0:s.setFormData(e)}}]}exports.useProForm=m;exports.useProFormInit=l;
|
package/dist/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./installer.js");require("./components/index.js");require("./hooks/index.js");const s=require("./components/form/component/form.js"),i=require("./components/form/index.js"),t=require("./components/collapse-transtion/src/types.js"),l=require("./components/collapse-transtion/index.js"),r=require("./components/pro-dialog/hooks/useProDialog.js"),u=require("./components/pro-dialog/src/types.js"),n=require("./components/pro-dialog/index.js"),a=require("./components/pro-title/src/types.js"),P=require("./components/pro-title/index.js"),c=require("./components/scroll-bar/src/types.js"),p=require("./components/scroll-bar/index.js"),q=require("./components/scale-virtual-list/index.js"),g=require("./components/pro-tag/src/types.js"),K=require("./components/pro-tag/index.js"),e=require("./hooks/useProForm.js");exports.default=o.default;exports.formType=s.formType;exports.KForm=i.KForm;exports.collapseProps=t.collapseProps;exports.KCollapseTranstion=l.KCollapseTranstion;exports.useProDialog=r.useProDialog;exports.useProDialogInit=r.useProDialogInit;exports.proDialogProps=u.proDialogProps;exports.KProDialog=n.KProDialog;exports.TitleProps=a.TitleProps;exports.KProTitle=P.KProTitle;exports.scrollbarProps=c.scrollbarProps;exports.KScrollBar=p.KScrollBar;exports.KScaleVirtualList=q.KScaleVirtualList;exports.proTagProps=g.proTagProps;exports.KProTag=K.KProTag;exports.useProForm=e.useProForm;exports.useProFormInit=e.useProFormInit;
|
|
@@ -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-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto}.king-pro-title{border-bottom:1px solid #ccc;position:relative;padding-left:10px}.king-pro-title::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-title--unborder{
|
|
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-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto}.king-pro-title{border-bottom:1px solid #ccc;position:relative;padding-left:10px}.king-pro-title::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-title--unborder{border:none}.king-pro-dialog .ant-modal-content{padding:0}.king-pro-dialog .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-dialog .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-dialog .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.king-pro-title{border-bottom:1px solid #ccc;position:relative;padding-left:10px}.king-pro-title::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-title--unborder{
|
|
1
|
+
.king-pro-title{border-bottom:1px solid #ccc;position:relative;padding-left:10px}.king-pro-title::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-title--unborder{border:none}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SFCWithInstall } from '../utils/install';
|
|
2
|
+
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
+
import { colorType } from './src/types';
|
|
4
|
+
export * from './src/types';
|
|
5
|
+
export declare const KProTag: SFCWithInstall<DefineComponent<{
|
|
6
|
+
options: {
|
|
7
|
+
readonly type: PropType<{
|
|
8
|
+
value: string | number | boolean;
|
|
9
|
+
label: string;
|
|
10
|
+
color: colorType;
|
|
11
|
+
}[]>;
|
|
12
|
+
readonly required: true;
|
|
13
|
+
};
|
|
14
|
+
tag: {
|
|
15
|
+
type: PropType<string | number | boolean | undefined>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
19
|
+
"update:tag": (tag: string | number | boolean | undefined) => void;
|
|
20
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
21
|
+
options: {
|
|
22
|
+
readonly type: PropType<{
|
|
23
|
+
value: string | number | boolean;
|
|
24
|
+
label: string;
|
|
25
|
+
color: colorType;
|
|
26
|
+
}[]>;
|
|
27
|
+
readonly required: true;
|
|
28
|
+
};
|
|
29
|
+
tag: {
|
|
30
|
+
type: PropType<string | number | boolean | undefined>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
}>> & {
|
|
34
|
+
"onUpdate:tag"?: ((tag: string | number | boolean | undefined) => any) | undefined;
|
|
35
|
+
}, {}, {}>>;
|
|
36
|
+
export default KProTag;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
import { colorType } from './types';
|
|
3
|
+
declare const _default: DefineComponent<{
|
|
4
|
+
options: {
|
|
5
|
+
readonly type: PropType<{
|
|
6
|
+
value: string | number | boolean;
|
|
7
|
+
label: string;
|
|
8
|
+
color: colorType;
|
|
9
|
+
}[]>;
|
|
10
|
+
readonly required: true;
|
|
11
|
+
};
|
|
12
|
+
tag: {
|
|
13
|
+
type: PropType<string | number | boolean | undefined>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
17
|
+
"update:tag": (tag: string | number | boolean | undefined) => void;
|
|
18
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
19
|
+
options: {
|
|
20
|
+
readonly type: PropType<{
|
|
21
|
+
value: string | number | boolean;
|
|
22
|
+
label: string;
|
|
23
|
+
color: colorType;
|
|
24
|
+
}[]>;
|
|
25
|
+
readonly required: true;
|
|
26
|
+
};
|
|
27
|
+
tag: {
|
|
28
|
+
type: PropType<string | number | boolean | undefined>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
}>> & {
|
|
32
|
+
"onUpdate:tag"?: ((tag: string | number | boolean | undefined) => any) | undefined;
|
|
33
|
+
}, {}, {}>;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExtractPublicPropTypes, PropType } from 'vue';
|
|
2
|
+
declare const colors: readonly ["success", "processing", "error", "warning", "default"];
|
|
3
|
+
export type colorType = (typeof colors)[number];
|
|
4
|
+
export declare const proTagProps: {
|
|
5
|
+
readonly options: {
|
|
6
|
+
readonly type: PropType<{
|
|
7
|
+
value: string | number | boolean;
|
|
8
|
+
label: string;
|
|
9
|
+
color: colorType;
|
|
10
|
+
}[]>;
|
|
11
|
+
readonly required: true;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type TagProps = ExtractPublicPropTypes<typeof proTagProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useProForm';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InjectionKey, Ref, ComputedRef } from 'vue';
|
|
2
|
+
export declare const defaultNamespace = "king";
|
|
3
|
+
export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
|
|
4
|
+
export declare function useGetDerivedNamespace(namespaceOverrides?: Ref<string | undefined>): ComputedRef<string>;
|
|
5
|
+
export declare function useNamespace(block: string, namespaceOverrides?: Ref<string | undefined>): {
|
|
6
|
+
namespace: ComputedRef<string>;
|
|
7
|
+
b: (blockSuffix?: string) => string;
|
|
8
|
+
e: (element?: string) => string;
|
|
9
|
+
m: (modifier?: string) => string;
|
|
10
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
11
|
+
em: (element?: string, modifier?: string) => string;
|
|
12
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
13
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
14
|
+
is: {
|
|
15
|
+
(name: string, state: boolean | undefined): string;
|
|
16
|
+
(name: string): string;
|
|
17
|
+
};
|
|
18
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
19
|
+
cssVarName: (name: string) => string;
|
|
20
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
21
|
+
cssVarBlockName: (name: string) => string;
|
|
22
|
+
};
|
|
23
|
+
export type UseNamespaceReturn = ReturnType<typeof useNamespace>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormInstance } from 'ant-design-vue';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export interface ModalMethods {
|
|
4
|
+
setFormData: (data: object) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function useProForm<T>(init: T): {
|
|
7
|
+
ruleForm: Ref<T>;
|
|
8
|
+
formRef: Ref<FormInstance | undefined>;
|
|
9
|
+
resetForm: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function useProFormInit(): [
|
|
12
|
+
(methods: ModalMethods) => void,
|
|
13
|
+
ModalMethods
|
|
14
|
+
];
|
package/dist/types/index.d.ts
CHANGED