@ccn-ui-kit/steps 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 (80) hide show
  1. package/dist/index.cjs +1 -0
  2. package/dist/index.js +236 -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/rich-editor/index.d.ts +10 -0
  50. package/dist/packages/components/rich-editor/src/rich-editor.d.ts +36 -0
  51. package/dist/packages/components/select/index.d.ts +10 -0
  52. package/dist/packages/components/select/src/select.d.ts +45 -0
  53. package/dist/packages/components/space/index.d.ts +10 -0
  54. package/dist/packages/components/space/src/space.d.ts +33 -0
  55. package/dist/packages/components/steps/index.d.ts +12 -0
  56. package/dist/packages/components/steps/src/step.d.ts +28 -0
  57. package/dist/packages/components/steps/src/step.vue.d.ts +55 -0
  58. package/dist/packages/components/steps/src/steps.d.ts +46 -0
  59. package/dist/packages/components/steps/src/steps.vue.d.ts +53 -0
  60. package/dist/packages/components/table/index.d.ts +10 -0
  61. package/dist/packages/components/table/src/table.d.ts +56 -0
  62. package/dist/packages/components/tabs/index.d.ts +12 -0
  63. package/dist/packages/components/tabs/src/tab-pane.d.ts +22 -0
  64. package/dist/packages/components/tabs/src/tabs.d.ts +43 -0
  65. package/dist/packages/components/tree/index.d.ts +10 -0
  66. package/dist/packages/components/tree/src/tree.d.ts +134 -0
  67. package/dist/packages/components/upload/index.d.ts +10 -0
  68. package/dist/packages/components/upload/src/upload.d.ts +103 -0
  69. package/dist/packages/directives/index.d.ts +2 -0
  70. package/dist/packages/directives/loading/index.d.ts +11 -0
  71. package/dist/packages/directives/permission/index.d.ts +3 -0
  72. package/dist/packages/ui-kit/index.d.ts +34 -0
  73. package/dist/packages/utils/dom.d.ts +5 -0
  74. package/dist/packages/utils/index.d.ts +3 -0
  75. package/dist/packages/utils/types.d.ts +7 -0
  76. package/dist/packages/utils/vue-helper.d.ts +9 -0
  77. package/dist/play/main.d.ts +1 -0
  78. package/dist/play/vite.config.d.ts +2 -0
  79. package/package.json +27 -0
  80. package/style/index.scss +244 -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"),d={active:{type:Number,default:0},direction:{type:String,default:"horizontal"},processStatus:{type:String,default:"process"},finishStatus:{type:String,default:"finish"},alignCenter:Boolean},p=Symbol("ui-steps"),y=e.defineComponent({__name:"steps",props:d,setup(l){const i=l,t=e.ref([]);function s(n){t.value.includes(n)||t.value.push(n)}function o(n){const r=t.value.indexOf(n);r!==-1&&t.value.splice(r,1)}return e.provide(p,{steps:t,active:e.toRef(i,"active"),direction:e.toRef(i,"direction"),processStatus:e.toRef(i,"processStatus"),finishStatus:e.toRef(i,"finishStatus"),alignCenter:e.toRef(i,"alignCenter"),registerStep:s,unregisterStep:o}),(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-steps",[`is-${n.direction}`,{"is-align-center":n.alignCenter}]])},[e.renderSlot(n.$slots,"default")],2))}}),m={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},h={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function f(l){return l in h}const g={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_=["innerHTML"],S=e.defineComponent({__name:"icon",props:m,setup(l){const i=l,t=e.computed(()=>f(i.name)?h[i.name]:""),s=e.computed(()=>({fontSize:typeof i.size=="number"?`${i.size}px`:i.size,...i.color?{color:i.color}:{}}));return(o,n)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":o.spin}]),style:e.normalizeStyle(s.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",g,[e.createElementVNode("g",{innerHTML:t.value},null,8,_)]))],6))}}),x={title:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},status:{type:String,default:void 0},disabled:Boolean},k={class:"ui-step__head"},M={class:"ui-step__icon"},B={key:1,class:"ui-step__icon-mark"},z={key:2,class:"ui-step__icon-mark"},w={key:3,class:"ui-step__icon-index"},V={key:0,class:"ui-step__line"},C={class:"ui-step__main"},E={class:"ui-step__title"},H={key:0,class:"ui-step__description"},v=e.defineComponent({__name:"step",props:x,setup(l){const i=l,t=e.inject(p),s=e.reactive({status:i.status,disabled:i.disabled});t==null||t.registerStep(s),e.onBeforeUnmount(()=>t==null?void 0:t.unregisterStep(s));const o=e.computed(()=>t?t.steps.value.indexOf(s):-1),n=e.computed(()=>t?o.value===t.steps.value.length-1:!0),r=e.computed(()=>(t==null?void 0:t.direction.value)??"horizontal"),c=e.computed(()=>i.status?i.status:t?o.value<t.active.value?t.finishStatus.value:o.value===t.active.value?t.processStatus.value:"wait":"wait");return(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-step",[`is-${c.value}`,`is-${r.value}`,{"is-disabled":a.disabled,"is-last":n.value}]])},[e.createElementVNode("div",k,[e.createElementVNode("div",M,[e.renderSlot(a.$slots,"icon",{},()=>[a.icon?(e.openBlock(),e.createBlock(e.unref(S),{key:0,name:a.icon},null,8,["name"])):c.value==="finish"?(e.openBlock(),e.createElementBlock("span",B,"✓")):c.value==="error"?(e.openBlock(),e.createElementBlock("span",z,"✕")):(e.openBlock(),e.createElementBlock("span",w,e.toDisplayString(o.value+1),1))])]),n.value?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",V,[...u[0]||(u[0]=[e.createElementVNode("div",{class:"ui-step__line-inner"},null,-1)])]))]),e.createElementVNode("div",C,[e.createElementVNode("div",E,e.toDisplayString(a.title),1),a.description?(e.openBlock(),e.createElementBlock("div",H,e.toDisplayString(a.description),1)):e.createCommentVNode("v-if",!0)])],2))}}),b={name:"UiSteps",install(l){l.component("UiSteps",y),l.component("UiStep",v)}};exports.Step=v;exports.Steps=y;exports.StepsPlugin=b;exports.default=y;exports.stepProps=x;exports.stepsContextKey=p;exports.stepsProps=d;
package/dist/index.js ADDED
@@ -0,0 +1,236 @@
1
+ import { defineComponent as x, ref as M, provide as k, toRef as u, openBlock as s, createElementBlock as l, normalizeClass as v, renderSlot as _, computed as p, normalizeStyle as w, createElementVNode as c, inject as z, reactive as H, onBeforeUnmount as V, createBlock as b, unref as L, toDisplayString as h, createCommentVNode as g } from "vue";
2
+ const C = {
3
+ /** 当前激活步骤下标(0 起,-1 表示全部处于等待) */
4
+ active: { type: Number, default: 0 },
5
+ /** 排列方向 */
6
+ direction: { type: String, default: "horizontal" },
7
+ /** 当前激活步骤的状态 */
8
+ processStatus: { type: String, default: "process" },
9
+ /** 已走过步骤的状态 */
10
+ finishStatus: { type: String, default: "finish" },
11
+ /** 垂直方向时标题与描述是否居中 */
12
+ alignCenter: Boolean
13
+ }, m = Symbol("ui-steps"), B = /* @__PURE__ */ x({
14
+ __name: "steps",
15
+ props: C,
16
+ setup(n) {
17
+ const i = n, e = M([]);
18
+ function o(t) {
19
+ e.value.includes(t) || e.value.push(t);
20
+ }
21
+ function a(t) {
22
+ const y = e.value.indexOf(t);
23
+ y !== -1 && e.value.splice(y, 1);
24
+ }
25
+ return k(m, {
26
+ steps: e,
27
+ active: u(i, "active"),
28
+ direction: u(i, "direction"),
29
+ processStatus: u(i, "processStatus"),
30
+ finishStatus: u(i, "finishStatus"),
31
+ alignCenter: u(i, "alignCenter"),
32
+ registerStep: o,
33
+ unregisterStep: a
34
+ }), (t, y) => (s(), l(
35
+ "div",
36
+ {
37
+ class: v(["ui-steps", [`is-${t.direction}`, { "is-align-center": t.alignCenter }]])
38
+ },
39
+ [
40
+ _(t.$slots, "default")
41
+ ],
42
+ 2
43
+ /* CLASS */
44
+ ));
45
+ }
46
+ }), $ = {
47
+ // 图标名称,见 ./icons 注册表
48
+ name: { type: String, required: !0 },
49
+ // 尺寸:数字按 px 处理,字符串作为 CSS 长度(如 '1.5em')
50
+ size: { type: [Number, String], default: 16 },
51
+ // 颜色:缺省时继承 currentColor
52
+ color: { type: String, default: "" },
53
+ // 是否旋转(用于 loading 等图标)
54
+ spin: Boolean
55
+ }, S = {
56
+ search: '<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',
57
+ plus: '<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',
58
+ minus: '<line x1="5" y1="12" x2="19" y2="12" />',
59
+ close: '<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',
60
+ check: '<polyline points="20 6 9 17 4 12" />',
61
+ loading: '<path d="M21 12a9 9 0 1 1-6.219-8.56" />',
62
+ refresh: '<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',
63
+ edit: '<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',
64
+ delete: '<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',
65
+ download: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',
66
+ upload: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',
67
+ setting: '<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',
68
+ user: '<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',
69
+ home: '<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',
70
+ calendar: '<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',
71
+ clock: '<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',
72
+ star: '<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',
73
+ heart: '<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',
74
+ message: '<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',
75
+ bell: '<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',
76
+ mail: '<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',
77
+ eye: '<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',
78
+ lock: '<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',
79
+ link: '<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',
80
+ "arrow-up": '<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',
81
+ "arrow-down": '<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',
82
+ "arrow-left": '<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',
83
+ "arrow-right": '<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',
84
+ "chevron-up": '<polyline points="18 15 12 9 6 15" />',
85
+ "chevron-down": '<polyline points="6 9 12 15 18 9" />',
86
+ "chevron-left": '<polyline points="15 18 9 12 15 6" />',
87
+ "chevron-right": '<polyline points="9 18 15 12 9 6" />',
88
+ more: '<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',
89
+ menu: '<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',
90
+ filter: '<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',
91
+ copy: '<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',
92
+ "external-link": '<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',
93
+ zap: '<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',
94
+ "log-out": '<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',
95
+ grid: '<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',
96
+ info: '<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',
97
+ success: '<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',
98
+ warning: '<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',
99
+ error: '<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',
100
+ question: '<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',
101
+ "plus-circle": '<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'
102
+ };
103
+ function A(n) {
104
+ return n in S;
105
+ }
106
+ const N = {
107
+ viewBox: "0 0 24 24",
108
+ fill: "none",
109
+ stroke: "currentColor",
110
+ "stroke-width": "2",
111
+ "stroke-linecap": "round",
112
+ "stroke-linejoin": "round"
113
+ }, U = ["innerHTML"], P = /* @__PURE__ */ x({
114
+ __name: "icon",
115
+ props: $,
116
+ setup(n) {
117
+ const i = n, e = p(() => A(i.name) ? S[i.name] : ""), o = p(() => ({
118
+ fontSize: typeof i.size == "number" ? `${i.size}px` : i.size,
119
+ ...i.color ? { color: i.color } : {}
120
+ }));
121
+ return (a, t) => (s(), l(
122
+ "span",
123
+ {
124
+ class: v(["ui-icon", { "is-spin": a.spin }]),
125
+ style: w(o.value),
126
+ role: "img"
127
+ },
128
+ [
129
+ (s(), l("svg", N, [
130
+ c("g", { innerHTML: e.value }, null, 8, U)
131
+ ]))
132
+ ],
133
+ 6
134
+ /* CLASS, STYLE */
135
+ ));
136
+ }
137
+ }), j = {
138
+ /** 步骤标题 */
139
+ title: { type: String, default: "" },
140
+ /** 步骤描述 */
141
+ description: { type: String, default: "" },
142
+ /** 自定义图标名(复用 Icon 组件) */
143
+ icon: { type: String, default: "" },
144
+ /** 覆盖由父级 active 推断出的状态 */
145
+ status: { type: String, default: void 0 },
146
+ /** 是否禁用 */
147
+ disabled: Boolean
148
+ }, q = { class: "ui-step__head" }, E = { class: "ui-step__icon" }, O = {
149
+ key: 1,
150
+ class: "ui-step__icon-mark"
151
+ }, T = {
152
+ key: 2,
153
+ class: "ui-step__icon-mark"
154
+ }, D = {
155
+ key: 3,
156
+ class: "ui-step__icon-index"
157
+ }, K = {
158
+ key: 0,
159
+ class: "ui-step__line"
160
+ }, R = { class: "ui-step__main" }, F = { class: "ui-step__title" }, G = {
161
+ key: 0,
162
+ class: "ui-step__description"
163
+ }, I = /* @__PURE__ */ x({
164
+ __name: "step",
165
+ props: j,
166
+ setup(n) {
167
+ const i = n, e = z(m), o = H({ status: i.status, disabled: i.disabled });
168
+ e == null || e.registerStep(o), V(() => e == null ? void 0 : e.unregisterStep(o));
169
+ const a = p(() => e ? e.steps.value.indexOf(o) : -1), t = p(() => e ? a.value === e.steps.value.length - 1 : !0), y = p(() => (e == null ? void 0 : e.direction.value) ?? "horizontal"), d = p(() => i.status ? i.status : e ? a.value < e.active.value ? e.finishStatus.value : a.value === e.active.value ? e.processStatus.value : "wait" : "wait");
170
+ return (r, f) => (s(), l(
171
+ "div",
172
+ {
173
+ class: v(["ui-step", [`is-${d.value}`, `is-${y.value}`, { "is-disabled": r.disabled, "is-last": t.value }]])
174
+ },
175
+ [
176
+ c("div", q, [
177
+ c("div", E, [
178
+ _(r.$slots, "icon", {}, () => [
179
+ r.icon ? (s(), b(L(P), {
180
+ key: 0,
181
+ name: r.icon
182
+ }, null, 8, ["name"])) : d.value === "finish" ? (s(), l("span", O, "✓")) : d.value === "error" ? (s(), l("span", T, "✕")) : (s(), l(
183
+ "span",
184
+ D,
185
+ h(a.value + 1),
186
+ 1
187
+ /* TEXT */
188
+ ))
189
+ ])
190
+ ]),
191
+ t.value ? g("v-if", !0) : (s(), l("div", K, [...f[0] || (f[0] = [
192
+ c(
193
+ "div",
194
+ { class: "ui-step__line-inner" },
195
+ null,
196
+ -1
197
+ /* CACHED */
198
+ )
199
+ ])]))
200
+ ]),
201
+ c("div", R, [
202
+ c(
203
+ "div",
204
+ F,
205
+ h(r.title),
206
+ 1
207
+ /* TEXT */
208
+ ),
209
+ r.description ? (s(), l(
210
+ "div",
211
+ G,
212
+ h(r.description),
213
+ 1
214
+ /* TEXT */
215
+ )) : g("v-if", !0)
216
+ ])
217
+ ],
218
+ 2
219
+ /* CLASS */
220
+ ));
221
+ }
222
+ }), Q = {
223
+ name: "UiSteps",
224
+ install(n) {
225
+ n.component("UiSteps", B), n.component("UiStep", I);
226
+ }
227
+ };
228
+ export {
229
+ I as Step,
230
+ B as Steps,
231
+ Q as StepsPlugin,
232
+ B as default,
233
+ j as stepProps,
234
+ m as stepsContextKey,
235
+ C as stepsProps
236
+ };
@@ -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>;