@ccn-ui-kit/popconfirm 0.1.2

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.
Files changed (79) hide show
  1. package/dist/index.cjs +1 -0
  2. package/dist/index.js +241 -0
  3. package/dist/packages/components/__tests__/loading.spec.d.ts +1 -0
  4. package/dist/packages/components/badge/index.d.ts +10 -0
  5. package/dist/packages/components/badge/src/badge.d.ts +25 -0
  6. package/dist/packages/components/breadcrumb/index.d.ts +12 -0
  7. package/dist/packages/components/breadcrumb/src/breadcrumb-item.d.ts +13 -0
  8. package/dist/packages/components/breadcrumb/src/breadcrumb.d.ts +10 -0
  9. package/dist/packages/components/button/index.d.ts +10 -0
  10. package/dist/packages/components/button/src/button.d.ts +25 -0
  11. package/dist/packages/components/date-picker/index.d.ts +10 -0
  12. package/dist/packages/components/date-picker/src/date-picker.d.ts +20 -0
  13. package/dist/packages/components/descriptions/index.d.ts +12 -0
  14. package/dist/packages/components/descriptions/src/descriptions-item.d.ts +13 -0
  15. package/dist/packages/components/descriptions/src/descriptions.d.ts +17 -0
  16. package/dist/packages/components/divider/index.d.ts +10 -0
  17. package/dist/packages/components/divider/src/divider.d.ts +20 -0
  18. package/dist/packages/components/dropdown/index.d.ts +12 -0
  19. package/dist/packages/components/dropdown/src/dropdown-item.d.ts +20 -0
  20. package/dist/packages/components/dropdown/src/dropdown.d.ts +46 -0
  21. package/dist/packages/components/form/index.d.ts +12 -0
  22. package/dist/packages/components/form/src/form-item.d.ts +45 -0
  23. package/dist/packages/components/form/src/form.d.ts +96 -0
  24. package/dist/packages/components/icon/index.d.ts +11 -0
  25. package/dist/packages/components/icon/src/icon.d.ts +18 -0
  26. package/dist/packages/components/icon/src/icons.d.ts +50 -0
  27. package/dist/packages/components/input/index.d.ts +10 -0
  28. package/dist/packages/components/input/src/input.d.ts +25 -0
  29. package/dist/packages/components/link/index.d.ts +10 -0
  30. package/dist/packages/components/link/src/link.d.ts +25 -0
  31. package/dist/packages/components/loading/index.d.ts +10 -0
  32. package/dist/packages/components/loading/src/loading.d.ts +15 -0
  33. package/dist/packages/components/menu/index.d.ts +14 -0
  34. package/dist/packages/components/menu/src/menu-item.d.ts +12 -0
  35. package/dist/packages/components/menu/src/menu.d.ts +40 -0
  36. package/dist/packages/components/menu/src/sub-menu.d.ts +12 -0
  37. package/dist/packages/components/message/index.d.ts +12 -0
  38. package/dist/packages/components/message/src/manager.d.ts +14 -0
  39. package/dist/packages/components/message/src/message.d.ts +28 -0
  40. package/dist/packages/components/modal/index.d.ts +10 -0
  41. package/dist/packages/components/modal/src/modal.d.ts +46 -0
  42. package/dist/packages/components/notification/index.d.ts +12 -0
  43. package/dist/packages/components/notification/src/manager.d.ts +14 -0
  44. package/dist/packages/components/notification/src/notification.d.ts +44 -0
  45. package/dist/packages/components/pagination/index.d.ts +10 -0
  46. package/dist/packages/components/pagination/src/pagination.d.ts +30 -0
  47. package/dist/packages/components/popconfirm/index.d.ts +10 -0
  48. package/dist/packages/components/popconfirm/src/popconfirm.d.ts +56 -0
  49. package/dist/packages/components/popconfirm/src/popconfirm.vue.d.ts +100 -0
  50. package/dist/packages/components/rich-editor/index.d.ts +10 -0
  51. package/dist/packages/components/rich-editor/src/rich-editor.d.ts +36 -0
  52. package/dist/packages/components/select/index.d.ts +10 -0
  53. package/dist/packages/components/select/src/select.d.ts +45 -0
  54. package/dist/packages/components/space/index.d.ts +10 -0
  55. package/dist/packages/components/space/src/space.d.ts +33 -0
  56. package/dist/packages/components/steps/index.d.ts +12 -0
  57. package/dist/packages/components/steps/src/step.d.ts +28 -0
  58. package/dist/packages/components/steps/src/steps.d.ts +46 -0
  59. package/dist/packages/components/table/index.d.ts +10 -0
  60. package/dist/packages/components/table/src/table.d.ts +56 -0
  61. package/dist/packages/components/tabs/index.d.ts +12 -0
  62. package/dist/packages/components/tabs/src/tab-pane.d.ts +22 -0
  63. package/dist/packages/components/tabs/src/tabs.d.ts +43 -0
  64. package/dist/packages/components/tree/index.d.ts +10 -0
  65. package/dist/packages/components/tree/src/tree.d.ts +134 -0
  66. package/dist/packages/components/upload/index.d.ts +10 -0
  67. package/dist/packages/components/upload/src/upload.d.ts +103 -0
  68. package/dist/packages/directives/index.d.ts +2 -0
  69. package/dist/packages/directives/loading/index.d.ts +11 -0
  70. package/dist/packages/directives/permission/index.d.ts +3 -0
  71. package/dist/packages/ui-kit/index.d.ts +34 -0
  72. package/dist/packages/utils/dom.d.ts +5 -0
  73. package/dist/packages/utils/index.d.ts +3 -0
  74. package/dist/packages/utils/types.d.ts +7 -0
  75. package/dist/packages/utils/vue-helper.d.ts +9 -0
  76. package/dist/play/main.d.ts +1 -0
  77. package/dist/play/vite.config.d.ts +2 -0
  78. package/package.json +27 -0
  79. package/style/index.scss +117 -0
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),A={type:{type:String,default:"default"},size:{type:String,default:"medium"},plain:Boolean,round:Boolean,disabled:Boolean,loading:Boolean,"native-type":{type:String,default:"button"}},U={click:s=>s instanceof MouseEvent},H=["type","disabled"],j={key:0,class:"ui-button__loading"},x=e.defineComponent({__name:"button",props:A,emits:U,setup(s,{emit:k}){const n=s,f=k;function m(i){n.loading||n.disabled||f("click",i)}return(i,r)=>(e.openBlock(),e.createElementBlock("button",{type:i.nativeType,class:e.normalizeClass(["ui-button",`ui-button--${i.type}`,`ui-button--${i.size}`,{"is-plain":i.plain,"is-round":i.round,"is-disabled":i.disabled}]),disabled:i.disabled,onClick:m},[i.loading?(e.openBlock(),e.createElementBlock("span",j)):e.createCommentVNode("v-if",!0),e.renderSlot(i.$slots,"default")],10,H))}}),P={modelValue:{type:Boolean,default:!1},title:{type:String,default:""},confirmText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"},confirmButtonType:{type:String,default:"primary"},placement:{type:String,default:"top"},width:{type:[Number,String],default:180},trigger:{type:String,default:"click"},disabled:Boolean},z={"update:modelValue":s=>typeof s=="boolean",confirm:()=>!0,cancel:()=>!0,"visible-change":s=>typeof s=="boolean"},q={class:"ui-popconfirm__body"},G={class:"ui-popconfirm__footer"},a=8,S=e.defineComponent({__name:"popconfirm",props:P,emits:z,setup(s,{emit:k}){const n=s,f=k,m=e.ref(),i=e.ref(),r=e.ref(n.modelValue),C=e.ref({}),T=e.ref(n.placement);let h=null,w=null;const N=e.computed(()=>typeof n.width=="number"?`${n.width}px`:n.width);e.watch(()=>n.modelValue,o=>{r.value=o}),e.watch(r,o=>{o!==n.modelValue&&f("update:modelValue",o),f("visible-change",o),o?(document.addEventListener("mousedown",_),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),e.nextTick(d)):(document.removeEventListener("mousedown",_),window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d))},{immediate:!0}),e.watch(()=>n.placement,o=>{T.value=o,r.value&&e.nextTick(d)});function d(){const o=m.value,p=i.value;if(!o||!p)return;const t=o.getBoundingClientRect(),c=p.offsetWidth,u=p.offsetHeight,B=window.innerWidth,E=window.innerHeight;let[l,b="center"]=n.placement.split("-");l==="top"&&t.top-u-a<0&&t.bottom+u+a<=E?l="bottom":l==="bottom"&&t.bottom+u+a>E&&t.top-u-a>=0?l="top":l==="left"&&t.left-c-a<0&&t.right+c+a<=B?l="right":l==="right"&&t.right+c+a>B&&t.left-c-a>=0&&(l="left"),T.value=b==="center"?l:`${l}-${b}`;const D={start:t.left,center:t.left+t.width/2-c/2,end:t.right-c},W={start:t.top,center:t.top+t.height/2-u/2,end:t.bottom-u};let v,g;l==="top"||l==="bottom"?(g=D[b],v=l==="top"?t.top-u-a:t.bottom+a,g=Math.min(Math.max(g,0),Math.max(0,B-c))):(v=W[b],g=l==="left"?t.left-c-a:t.right+a,v=Math.min(Math.max(v,0),Math.max(0,E-u))),C.value={top:`${v}px`,left:`${g}px`,minWidth:N.value}}function y(){h&&window.clearTimeout(h),w&&window.clearTimeout(w),h=null,w=null}function $(){n.disabled||(y(),r.value=!r.value)}function V(){n.trigger!=="hover"||n.disabled||(y(),h=window.setTimeout(()=>r.value=!0,150))}function M(){n.trigger==="hover"&&(y(),w=window.setTimeout(()=>r.value=!1,150))}function _(o){var t,c;const p=o.target;(t=m.value)!=null&&t.contains(p)||(c=i.value)!=null&&c.contains(p)||(r.value=!1)}function L(){r.value=!1,f("confirm")}function R(){r.value=!1,f("cancel")}return e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",_),window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d),y()}),(o,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:m,class:"ui-popconfirm",onMouseenter:V,onMouseleave:M},[e.createElementVNode("div",{class:e.normalizeClass(["ui-popconfirm__trigger",{"is-disabled":o.disabled}]),onClick:$},[e.renderSlot(o.$slots,"default")],2),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"ui-popconfirm-fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popperRef",ref:i,class:e.normalizeClass(["ui-popconfirm__popper",`is-${T.value}`]),style:e.normalizeStyle(C.value),role:"tooltip",onMouseenter:V,onMouseleave:M},[e.createElementVNode("div",q,[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])]),e.createElementVNode("div",G,[e.createVNode(e.unref(x),{size:"small",onClick:R},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.cancelText),1)]),_:1}),e.createVNode(e.unref(x),{size:"small",type:o.confirmButtonType,onClick:L},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmText),1)]),_:1},8,["type"])])],38)):e.createCommentVNode("v-if",!0)]),_:3})]))],544))}}),O={name:"UiPopconfirm",install(s){s.component("UiPopconfirm",S)}};exports.Popconfirm=S;exports.PopconfirmPlugin=O;exports.default=S;exports.popconfirmEmits=z;exports.popconfirmProps=P;
package/dist/index.js ADDED
@@ -0,0 +1,241 @@
1
+ import { defineComponent as G, openBlock as h, createElementBlock as T, normalizeClass as P, createCommentVNode as j, renderSlot as N, ref as g, computed as Q, watch as M, nextTick as U, onBeforeUnmount as X, createElementVNode as $, createBlock as Y, Teleport as Z, createVNode as z, Transition as ee, withCtx as L, normalizeStyle as te, createTextVNode as V, toDisplayString as x, unref as D } from "vue";
2
+ const oe = {
3
+ type: { type: String, default: "default" },
4
+ size: { type: String, default: "medium" },
5
+ plain: Boolean,
6
+ round: Boolean,
7
+ disabled: Boolean,
8
+ loading: Boolean,
9
+ /** 原生 button 的 type,默认 button(避免误触发表单提交) */
10
+ "native-type": { type: String, default: "button" }
11
+ }, ne = {
12
+ click: (a) => a instanceof MouseEvent
13
+ }, ie = ["type", "disabled"], le = {
14
+ key: 0,
15
+ class: "ui-button__loading"
16
+ }, H = /* @__PURE__ */ G({
17
+ __name: "button",
18
+ props: oe,
19
+ emits: ne,
20
+ setup(a, { emit: k }) {
21
+ const o = a, p = k;
22
+ function f(n) {
23
+ o.loading || o.disabled || p("click", n);
24
+ }
25
+ return (n, l) => (h(), T("button", {
26
+ type: n.nativeType,
27
+ class: P([
28
+ "ui-button",
29
+ `ui-button--${n.type}`,
30
+ `ui-button--${n.size}`,
31
+ { "is-plain": n.plain, "is-round": n.round, "is-disabled": n.disabled }
32
+ ]),
33
+ disabled: n.disabled,
34
+ onClick: f
35
+ }, [
36
+ n.loading ? (h(), T("span", le)) : j("v-if", !0),
37
+ N(n.$slots, "default")
38
+ ], 10, ie));
39
+ }
40
+ }), re = {
41
+ /** 是否显示(v-model) */
42
+ modelValue: { type: Boolean, default: !1 },
43
+ /** 提示文案,也可用 #title 插槽自定义 */
44
+ title: { type: String, default: "" },
45
+ /** 确认按钮文案 */
46
+ confirmText: { type: String, default: "确定" },
47
+ /** 取消按钮文案 */
48
+ cancelText: { type: String, default: "取消" },
49
+ /** 确认按钮类型 */
50
+ confirmButtonType: { type: String, default: "primary" },
51
+ /** 面板弹出位置 */
52
+ placement: { type: String, default: "top" },
53
+ /** 面板基础宽度(min-width):内容更长时随按钮/文案自适应变宽 */
54
+ width: { type: [Number, String], default: 180 },
55
+ /** 触发方式:click | hover */
56
+ trigger: { type: String, default: "click" },
57
+ /** 是否禁用 */
58
+ disabled: Boolean
59
+ }, ae = {
60
+ "update:modelValue": (a) => typeof a == "boolean",
61
+ /** 点击确认 */
62
+ confirm: () => !0,
63
+ /** 点击取消 */
64
+ cancel: () => !0,
65
+ /** 面板显隐变化 */
66
+ "visible-change": (a) => typeof a == "boolean"
67
+ }, se = { class: "ui-popconfirm__body" }, ue = { class: "ui-popconfirm__footer" }, r = 8, de = /* @__PURE__ */ G({
68
+ __name: "popconfirm",
69
+ props: re,
70
+ emits: ae,
71
+ setup(a, { emit: k }) {
72
+ const o = a, p = k, f = g(), n = g(), l = g(o.modelValue), R = g({}), B = g(o.placement);
73
+ let w = null, b = null;
74
+ const q = Q(
75
+ () => typeof o.width == "number" ? `${o.width}px` : o.width
76
+ );
77
+ M(
78
+ () => o.modelValue,
79
+ (t) => {
80
+ l.value = t;
81
+ }
82
+ ), M(l, (t) => {
83
+ t !== o.modelValue && p("update:modelValue", t), p("visible-change", t), t ? (document.addEventListener("mousedown", E), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), U(u)) : (document.removeEventListener("mousedown", E), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u));
84
+ }, { immediate: !0 }), M(
85
+ () => o.placement,
86
+ (t) => {
87
+ B.value = t, l.value && U(u);
88
+ }
89
+ );
90
+ function u() {
91
+ const t = f.value, c = n.value;
92
+ if (!t || !c) return;
93
+ const e = t.getBoundingClientRect(), s = c.offsetWidth, d = c.offsetHeight, S = window.innerWidth, C = window.innerHeight;
94
+ let [i, _ = "center"] = o.placement.split("-");
95
+ i === "top" && e.top - d - r < 0 && e.bottom + d + r <= C ? i = "bottom" : i === "bottom" && e.bottom + d + r > C && e.top - d - r >= 0 ? i = "top" : i === "left" && e.left - s - r < 0 && e.right + s + r <= S ? i = "right" : i === "right" && e.right + s + r > S && e.left - s - r >= 0 && (i = "left"), B.value = _ === "center" ? i : `${i}-${_}`;
96
+ const K = {
97
+ start: e.left,
98
+ center: e.left + e.width / 2 - s / 2,
99
+ end: e.right - s
100
+ }, O = {
101
+ start: e.top,
102
+ center: e.top + e.height / 2 - d / 2,
103
+ end: e.bottom - d
104
+ };
105
+ let m, v;
106
+ i === "top" || i === "bottom" ? (v = K[_], m = i === "top" ? e.top - d - r : e.bottom + r, v = Math.min(Math.max(v, 0), Math.max(0, S - s))) : (m = O[_], v = i === "left" ? e.left - s - r : e.right + r, m = Math.min(Math.max(m, 0), Math.max(0, C - d))), R.value = {
107
+ top: `${m}px`,
108
+ left: `${v}px`,
109
+ minWidth: q.value
110
+ };
111
+ }
112
+ function y() {
113
+ w && window.clearTimeout(w), b && window.clearTimeout(b), w = null, b = null;
114
+ }
115
+ function F() {
116
+ o.disabled || (y(), l.value = !l.value);
117
+ }
118
+ function W() {
119
+ o.trigger !== "hover" || o.disabled || (y(), w = window.setTimeout(() => l.value = !0, 150));
120
+ }
121
+ function A() {
122
+ o.trigger === "hover" && (y(), b = window.setTimeout(() => l.value = !1, 150));
123
+ }
124
+ function E(t) {
125
+ var e, s;
126
+ const c = t.target;
127
+ (e = f.value) != null && e.contains(c) || (s = n.value) != null && s.contains(c) || (l.value = !1);
128
+ }
129
+ function I() {
130
+ l.value = !1, p("confirm");
131
+ }
132
+ function J() {
133
+ l.value = !1, p("cancel");
134
+ }
135
+ return X(() => {
136
+ document.removeEventListener("mousedown", E), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u), y();
137
+ }), (t, c) => (h(), T(
138
+ "div",
139
+ {
140
+ ref_key: "rootRef",
141
+ ref: f,
142
+ class: "ui-popconfirm",
143
+ onMouseenter: W,
144
+ onMouseleave: A
145
+ },
146
+ [
147
+ $(
148
+ "div",
149
+ {
150
+ class: P(["ui-popconfirm__trigger", { "is-disabled": t.disabled }]),
151
+ onClick: F
152
+ },
153
+ [
154
+ N(t.$slots, "default")
155
+ ],
156
+ 2
157
+ /* CLASS */
158
+ ),
159
+ (h(), Y(Z, { to: "body" }, [
160
+ z(ee, { name: "ui-popconfirm-fade" }, {
161
+ default: L(() => [
162
+ l.value ? (h(), T(
163
+ "div",
164
+ {
165
+ key: 0,
166
+ ref_key: "popperRef",
167
+ ref: n,
168
+ class: P(["ui-popconfirm__popper", `is-${B.value}`]),
169
+ style: te(R.value),
170
+ role: "tooltip",
171
+ onMouseenter: W,
172
+ onMouseleave: A
173
+ },
174
+ [
175
+ $("div", se, [
176
+ N(t.$slots, "title", {}, () => [
177
+ V(
178
+ x(t.title),
179
+ 1
180
+ /* TEXT */
181
+ )
182
+ ])
183
+ ]),
184
+ $("div", ue, [
185
+ z(D(H), {
186
+ size: "small",
187
+ onClick: J
188
+ }, {
189
+ default: L(() => [
190
+ V(
191
+ x(t.cancelText),
192
+ 1
193
+ /* TEXT */
194
+ )
195
+ ]),
196
+ _: 1
197
+ /* STABLE */
198
+ }),
199
+ z(D(H), {
200
+ size: "small",
201
+ type: t.confirmButtonType,
202
+ onClick: I
203
+ }, {
204
+ default: L(() => [
205
+ V(
206
+ x(t.confirmText),
207
+ 1
208
+ /* TEXT */
209
+ )
210
+ ]),
211
+ _: 1
212
+ /* STABLE */
213
+ }, 8, ["type"])
214
+ ])
215
+ ],
216
+ 38
217
+ /* CLASS, STYLE, NEED_HYDRATION */
218
+ )) : j("v-if", !0)
219
+ ]),
220
+ _: 3
221
+ /* FORWARDED */
222
+ })
223
+ ]))
224
+ ],
225
+ 544
226
+ /* NEED_HYDRATION, NEED_PATCH */
227
+ ));
228
+ }
229
+ }), pe = {
230
+ name: "UiPopconfirm",
231
+ install(a) {
232
+ a.component("UiPopconfirm", de);
233
+ }
234
+ };
235
+ export {
236
+ de as Popconfirm,
237
+ pe as PopconfirmPlugin,
238
+ de as default,
239
+ ae as popconfirmEmits,
240
+ re as popconfirmProps
241
+ };
@@ -0,0 +1,10 @@
1
+ import { App } from 'vue';
2
+ import { default as Badge } from './src/badge.vue';
3
+
4
+ export declare const BadgePlugin: {
5
+ name: string;
6
+ install(app: App): void;
7
+ };
8
+ export { Badge };
9
+ export default Badge;
10
+ export * from './src/badge';
@@ -0,0 +1,25 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+
3
+ export declare const badgeProps: {
4
+ readonly value: {
5
+ readonly type: [NumberConstructor, StringConstructor];
6
+ readonly default: 0;
7
+ };
8
+ readonly max: {
9
+ readonly type: NumberConstructor;
10
+ readonly default: undefined;
11
+ };
12
+ readonly isDot: {
13
+ readonly type: BooleanConstructor;
14
+ readonly default: false;
15
+ };
16
+ readonly hidden: {
17
+ readonly type: BooleanConstructor;
18
+ readonly default: false;
19
+ };
20
+ readonly type: {
21
+ readonly type: StringConstructor;
22
+ readonly default: "danger";
23
+ };
24
+ };
25
+ export type BadgeProps = ExtractPropTypes<typeof badgeProps>;
@@ -0,0 +1,12 @@
1
+ import { App } from 'vue';
2
+ import { default as Breadcrumb } from './src/breadcrumb.vue';
3
+ import { default as BreadcrumbItem } from './src/breadcrumb-item.vue';
4
+
5
+ export declare const BreadcrumbPlugin: {
6
+ name: string;
7
+ install(app: App): void;
8
+ };
9
+ export { Breadcrumb, BreadcrumbItem };
10
+ export default Breadcrumb;
11
+ export * from './src/breadcrumb';
12
+ export * from './src/breadcrumb-item';
@@ -0,0 +1,13 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+
3
+ export declare const breadcrumbItemProps: {
4
+ readonly to: {
5
+ readonly type: StringConstructor;
6
+ readonly default: "";
7
+ };
8
+ readonly replace: {
9
+ readonly type: BooleanConstructor;
10
+ readonly default: false;
11
+ };
12
+ };
13
+ export type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>;
@@ -0,0 +1,10 @@
1
+ import { ExtractPropTypes, InjectionKey } from 'vue';
2
+
3
+ export declare const breadcrumbProps: {
4
+ readonly separator: {
5
+ readonly type: StringConstructor;
6
+ readonly default: "/";
7
+ };
8
+ };
9
+ export type BreadcrumbProps = ExtractPropTypes<typeof breadcrumbProps>;
10
+ export declare const breadcrumbSeparatorKey: InjectionKey<string>;
@@ -0,0 +1,10 @@
1
+ import { App } from 'vue';
2
+ import { default as Button } from './src/button.vue';
3
+
4
+ export declare const ButtonPlugin: {
5
+ name: string;
6
+ install(app: App): void;
7
+ };
8
+ export { Button };
9
+ export default Button;
10
+ export * from './src/button';
@@ -0,0 +1,25 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+
3
+ export declare const buttonProps: {
4
+ readonly type: {
5
+ readonly type: StringConstructor;
6
+ readonly default: "default";
7
+ };
8
+ readonly size: {
9
+ readonly type: StringConstructor;
10
+ readonly default: "medium";
11
+ };
12
+ readonly plain: BooleanConstructor;
13
+ readonly round: BooleanConstructor;
14
+ readonly disabled: BooleanConstructor;
15
+ readonly loading: BooleanConstructor;
16
+ /** 原生 button 的 type,默认 button(避免误触发表单提交) */
17
+ readonly 'native-type': {
18
+ readonly type: StringConstructor;
19
+ readonly default: "button";
20
+ };
21
+ };
22
+ export declare const buttonEmits: {
23
+ click: (e: MouseEvent) => boolean;
24
+ };
25
+ export type ButtonProps = ExtractPropTypes<typeof buttonProps>;
@@ -0,0 +1,10 @@
1
+ import { App } from 'vue';
2
+ import { default as DatePicker } from './src/date-picker.vue';
3
+
4
+ export declare const DatePickerPlugin: {
5
+ name: string;
6
+ install(app: App): void;
7
+ };
8
+ export { DatePicker };
9
+ export default DatePicker;
10
+ export * from './src/date-picker';
@@ -0,0 +1,20 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+
3
+ export declare const datePickerProps: {
4
+ readonly modelValue: {
5
+ readonly type: StringConstructor;
6
+ readonly default: undefined;
7
+ };
8
+ readonly placeholder: {
9
+ readonly type: StringConstructor;
10
+ readonly default: "请选择日期";
11
+ };
12
+ readonly disabled: BooleanConstructor;
13
+ readonly clearable: BooleanConstructor;
14
+ };
15
+ export declare const datePickerEmits: {
16
+ 'update:modelValue': (val: string) => boolean;
17
+ change: (val: string) => boolean;
18
+ clear: () => boolean;
19
+ };
20
+ export type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
@@ -0,0 +1,12 @@
1
+ import { App } from 'vue';
2
+ import { default as Descriptions } from './src/descriptions.vue';
3
+ import { default as DescriptionsItem } from './src/descriptions-item.vue';
4
+
5
+ export declare const DescriptionsPlugin: {
6
+ name: string;
7
+ install(app: App): void;
8
+ };
9
+ export { Descriptions, DescriptionsItem };
10
+ export default Descriptions;
11
+ export * from './src/descriptions';
12
+ export * from './src/descriptions-item';
@@ -0,0 +1,13 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+
3
+ export declare const descriptionsItemProps: {
4
+ readonly label: {
5
+ readonly type: StringConstructor;
6
+ readonly default: "";
7
+ };
8
+ readonly span: {
9
+ readonly type: NumberConstructor;
10
+ readonly default: 1;
11
+ };
12
+ };
13
+ export type DescriptionsItemProps = ExtractPropTypes<typeof descriptionsItemProps>;
@@ -0,0 +1,17 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+
3
+ export declare const descriptionsProps: {
4
+ readonly title: {
5
+ readonly type: StringConstructor;
6
+ readonly default: "";
7
+ };
8
+ readonly column: {
9
+ readonly type: NumberConstructor;
10
+ readonly default: 3;
11
+ };
12
+ readonly border: {
13
+ readonly type: BooleanConstructor;
14
+ readonly default: false;
15
+ };
16
+ };
17
+ export type DescriptionsProps = ExtractPropTypes<typeof descriptionsProps>;
@@ -0,0 +1,10 @@
1
+ import { App } from 'vue';
2
+ import { default as Divider } from './src/divider.vue';
3
+
4
+ export declare const DividerPlugin: {
5
+ name: string;
6
+ install(app: App): void;
7
+ };
8
+ export { Divider };
9
+ export default Divider;
10
+ export * from './src/divider';
@@ -0,0 +1,20 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+
3
+ export declare const dividerProps: {
4
+ /** 分割线方向 */
5
+ readonly direction: {
6
+ readonly type: StringConstructor;
7
+ readonly default: "horizontal";
8
+ };
9
+ /** 文案在分割线上的位置 */
10
+ readonly contentPosition: {
11
+ readonly type: StringConstructor;
12
+ readonly default: "center";
13
+ };
14
+ /** 是否使用虚线 */
15
+ readonly dashed: {
16
+ readonly type: BooleanConstructor;
17
+ readonly default: false;
18
+ };
19
+ };
20
+ export type DividerProps = ExtractPropTypes<typeof dividerProps>;
@@ -0,0 +1,12 @@
1
+ import { App } from 'vue';
2
+ import { default as Dropdown } from './src/dropdown.vue';
3
+ import { default as DropdownItem } from './src/dropdown-item.vue';
4
+
5
+ export declare const DropdownPlugin: {
6
+ name: string;
7
+ install(app: App): void;
8
+ };
9
+ export { Dropdown, DropdownItem };
10
+ export default Dropdown;
11
+ export * from './src/dropdown';
12
+ export * from './src/dropdown-item';
@@ -0,0 +1,20 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+
3
+ export declare const dropdownItemProps: {
4
+ /** 点击时通过 command 事件回传的标识 */
5
+ readonly command: {
6
+ readonly type: [StringConstructor, NumberConstructor, ObjectConstructor, BooleanConstructor];
7
+ readonly default: undefined;
8
+ };
9
+ /** 是否禁用 */
10
+ readonly disabled: {
11
+ readonly type: BooleanConstructor;
12
+ readonly default: false;
13
+ };
14
+ /** 是否显示上方分隔线 */
15
+ readonly divided: {
16
+ readonly type: BooleanConstructor;
17
+ readonly default: false;
18
+ };
19
+ };
20
+ export type DropdownItemProps = ExtractPropTypes<typeof dropdownItemProps>;
@@ -0,0 +1,46 @@
1
+ import { ExtractPropTypes, InjectionKey } from 'vue';
2
+
3
+ export declare const dropdownProps: {
4
+ /** 触发方式:hover | click | contextmenu */
5
+ readonly trigger: {
6
+ readonly type: StringConstructor;
7
+ readonly default: "hover";
8
+ };
9
+ /** 面板弹出位置 */
10
+ readonly placement: {
11
+ readonly type: StringConstructor;
12
+ readonly default: "bottom-start";
13
+ };
14
+ /** 点击菜单项后是否自动关闭 */
15
+ readonly hideOnClick: {
16
+ readonly type: BooleanConstructor;
17
+ readonly default: true;
18
+ };
19
+ /** hover 打开延迟(ms) */
20
+ readonly showTimeout: {
21
+ readonly type: NumberConstructor;
22
+ readonly default: 150;
23
+ };
24
+ /** hover 关闭延迟(ms) */
25
+ readonly hideTimeout: {
26
+ readonly type: NumberConstructor;
27
+ readonly default: 150;
28
+ };
29
+ /** 是否禁用 */
30
+ readonly disabled: {
31
+ readonly type: BooleanConstructor;
32
+ readonly default: false;
33
+ };
34
+ };
35
+ export declare const dropdownEmits: {
36
+ /** 点击菜单项触发,参数为该项的 command */
37
+ command: (_command: unknown) => boolean;
38
+ /** 面板显隐变化 */
39
+ 'visible-change': (_visible: boolean) => boolean;
40
+ };
41
+ export type DropdownProps = ExtractPropTypes<typeof dropdownProps>;
42
+ /** 提供给 DropdownItem 的上下文 */
43
+ export interface DropdownContext {
44
+ handleItemClick: (command: unknown) => void;
45
+ }
46
+ export declare const dropdownContextKey: InjectionKey<DropdownContext>;
@@ -0,0 +1,12 @@
1
+ import { App } from 'vue';
2
+ import { default as Form } from './src/form.vue';
3
+ import { default as FormItem } from './src/form-item.vue';
4
+
5
+ export declare const FormPlugin: {
6
+ name: string;
7
+ install(app: App): void;
8
+ };
9
+ export { Form, FormItem };
10
+ export default Form;
11
+ export * from './src/form';
12
+ export * from './src/form-item';
@@ -0,0 +1,45 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import { FormItemRules, FormLabelPosition } from './form';
3
+
4
+ export declare const formItemProps: {
5
+ /** 字段名(对应 form 的 model 上的 key);留空则仅做布局分组,不参与校验 */
6
+ readonly prop: {
7
+ readonly type: StringConstructor;
8
+ readonly default: "";
9
+ };
10
+ /** 标签文案 */
11
+ readonly label: {
12
+ readonly type: StringConstructor;
13
+ readonly default: "";
14
+ };
15
+ /** 标签宽度(覆盖 form 级 labelWidth) */
16
+ readonly labelWidth: {
17
+ readonly type: [NumberConstructor, StringConstructor];
18
+ readonly default: undefined;
19
+ };
20
+ /** 标签位置(覆盖 form 级 labelPosition) */
21
+ readonly labelPosition: {
22
+ readonly type: PropType<FormLabelPosition>;
23
+ readonly default: undefined;
24
+ };
25
+ /** 便捷必填标记,等价于 rules: [{ required: true }] */
26
+ readonly required: BooleanConstructor;
27
+ /** 校验规则(与 form 级同 prop 规则合并,item 级优先) */
28
+ readonly rules: {
29
+ readonly type: PropType<FormItemRules>;
30
+ readonly default: undefined;
31
+ };
32
+ /** 外部受控错误信息,设置后直接展示 */
33
+ readonly error: {
34
+ readonly type: StringConstructor;
35
+ readonly default: "";
36
+ };
37
+ /** 是否显示校验错误提示 */
38
+ readonly showMessage: {
39
+ readonly type: BooleanConstructor;
40
+ readonly default: true;
41
+ };
42
+ /** 单独禁用 */
43
+ readonly disabled: BooleanConstructor;
44
+ };
45
+ export type FormItemProps = ExtractPropTypes<typeof formItemProps>;