easy-ep-ui 0.1.0
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/README.md +86 -0
- package/dist/easy-ep-ui.js +1 -0
- package/dist/style.css +1 -0
- package/es/components/ee-dict-select/index.d.ts +2 -0
- package/es/components/ee-dict-select/src/index.vue.d.ts +25 -0
- package/es/components/ee-form-dialog/index.d.ts +2 -0
- package/es/components/ee-form-dialog/src/index.vue.d.ts +126 -0
- package/es/components/ee-form-table/index.d.ts +2 -0
- package/es/components/ee-form-table/src/index.vue.d.ts +1323 -0
- package/es/components/ee-search-bar/index.d.ts +2 -0
- package/es/components/ee-search-bar/src/index.vue.d.ts +124 -0
- package/es/components/ee-status-tag/index.d.ts +2 -0
- package/es/components/ee-status-tag/src/index.vue.d.ts +13 -0
- package/es/index.d.ts +13 -0
- package/es/index.mjs +544 -0
- package/es/style.css +1 -0
- package/es/utils/types.d.ts +48 -0
- package/lib/components/ee-dict-select/index.d.ts +2 -0
- package/lib/components/ee-dict-select/src/index.vue.d.ts +25 -0
- package/lib/components/ee-form-dialog/index.d.ts +2 -0
- package/lib/components/ee-form-dialog/src/index.vue.d.ts +126 -0
- package/lib/components/ee-form-table/index.d.ts +2 -0
- package/lib/components/ee-form-table/src/index.vue.d.ts +1323 -0
- package/lib/components/ee-search-bar/index.d.ts +2 -0
- package/lib/components/ee-search-bar/src/index.vue.d.ts +124 -0
- package/lib/components/ee-status-tag/index.d.ts +2 -0
- package/lib/components/ee-status-tag/src/index.vue.d.ts +13 -0
- package/lib/index.cjs +1 -0
- package/lib/index.d.ts +13 -0
- package/lib/style.css +1 -0
- package/lib/utils/types.d.ts +48 -0
- package/package.json +62 -0
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Easy EP UI
|
|
2
|
+
|
|
3
|
+
Enterprise Element Plus 二次封装组件库。
|
|
4
|
+
|
|
5
|
+
基于 Vue3 + TypeScript + Element Plus 的企业级复合组件库,面向高频 CRUD 场景,开箱即用。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install easy-ep-ui
|
|
11
|
+
# or
|
|
12
|
+
yarn add easy-ep-ui
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 使用
|
|
16
|
+
|
|
17
|
+
### 全量引入
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { createApp } from 'vue'
|
|
21
|
+
import ElementPlus from 'element-plus'
|
|
22
|
+
import 'element-plus/dist/index.css'
|
|
23
|
+
import EasyEpUI from 'easy-ep-ui'
|
|
24
|
+
import 'easy-ep-ui/dist/style.css'
|
|
25
|
+
|
|
26
|
+
const app = createApp(App)
|
|
27
|
+
app.use(ElementPlus)
|
|
28
|
+
app.use(EasyEpUI)
|
|
29
|
+
app.mount('#app')
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 按需引入
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { createApp } from 'vue'
|
|
36
|
+
import ElementPlus from 'element-plus'
|
|
37
|
+
import 'element-plus/dist/index.css'
|
|
38
|
+
import { EeDictSelect, EeStatusTag } from 'easy-ep-ui'
|
|
39
|
+
import 'easy-ep-ui/dist/style.css'
|
|
40
|
+
|
|
41
|
+
const app = createApp(App)
|
|
42
|
+
app.use(ElementPlus)
|
|
43
|
+
app.component(EeDictSelect.name, EeDictSelect)
|
|
44
|
+
app.component(EeStatusTag.name, EeStatusTag)
|
|
45
|
+
app.mount('#app')
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 组件列表
|
|
49
|
+
|
|
50
|
+
| 组件名 | 描述 |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| EeDictSelect | 字典下拉选择,支持静态数据与异步请求 |
|
|
53
|
+
| EeStatusTag | 状态标签,值到颜色/文本的自动映射 |
|
|
54
|
+
| EeSearchBar | 搜索栏,多字段搜索、折叠展开、一键重置 |
|
|
55
|
+
| EeFormDialog | 弹窗表单,集成表单验证与提交流程 |
|
|
56
|
+
| EeFormTable | 查询表格,搜索+表格+分页一体化 |
|
|
57
|
+
|
|
58
|
+
## 本地开发
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# 文档开发
|
|
62
|
+
npm run docs:dev
|
|
63
|
+
|
|
64
|
+
# 构建组件库
|
|
65
|
+
npm run build
|
|
66
|
+
|
|
67
|
+
# 构建文档
|
|
68
|
+
npm run docs:build
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 发布
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# 小修复版本
|
|
75
|
+
npm run pub:patch
|
|
76
|
+
|
|
77
|
+
# 新增功能版本
|
|
78
|
+
npm run pub:minor
|
|
79
|
+
|
|
80
|
+
# 大版本重构
|
|
81
|
+
npm run pub:major
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(k,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(k=typeof globalThis<"u"?globalThis:k||self,e(k.EasyEpUI={},k.Vue,k.ElementPlus))})(this,function(k,e,o){"use strict";const b=e.defineComponent({name:"EeDictSelect",__name:"index",props:{modelValue:{},options:{},request:{},valueField:{default:"value"},labelField:{default:"label"}},emits:["update:modelValue","change","clear","focus","blur"],setup(l,{emit:V}){const d=l,p=V,f=e.ref(!1),m=e.ref([]),c=e.computed(()=>(d.options??m.value).map(i=>({value:String(i[d.valueField]??""),label:String(i[d.labelField]??""),disabled:i.disabled??!1})));async function t(){if(!d.options&&d.request){f.value=!0;try{m.value=await d.request()}finally{f.value=!1}}}return e.onMounted(t),e.watch(()=>d.request,t),(s,i)=>(e.openBlock(),e.createBlock(e.unref(o.ElSelect),e.mergeProps(s.$attrs,{"model-value":l.modelValue,loading:f.value,"onUpdate:modelValue":i[0]||(i[0]=a=>p("update:modelValue",a)),onChange:i[1]||(i[1]=a=>p("change",a)),onClear:i[2]||(i[2]=a=>p("clear")),onFocus:i[3]||(i[3]=a=>p("focus",a)),onBlur:i[4]||(i[4]=a=>p("blur",a))}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,a=>(e.openBlock(),e.createBlock(e.unref(o.ElOption),{key:a.value,label:a.label,value:a.value,disabled:a.disabled},null,8,["label","value","disabled"]))),128))]),_:1},16,["model-value","loading"]))}});b.install=l=>{l.component(b.name??"EeDictSelect",b)};const g=e.defineComponent({name:"EeStatusTag",__name:"index",props:{value:{},mapping:{},fallbackLabel:{},defaultType:{default:"info"},defaultEffect:{default:"light"}},setup(l){const V=l,d=e.computed(()=>V.mapping.find(p=>p.value===V.value));return(p,f)=>{var m,c;return e.openBlock(),e.createBlock(e.unref(o.ElTag),e.mergeProps(p.$attrs,{type:((m=d.value)==null?void 0:m.type)??l.defaultType,effect:((c=d.value)==null?void 0:c.effect)??l.defaultEffect}),{default:e.withCtx(()=>{var t;return[e.createTextVNode(e.toDisplayString(((t=d.value)==null?void 0:t.label)??l.fallbackLabel??l.value),1)]}),_:1},16,["type","effect"])}}});g.install=l=>{l.component(g.name??"EeStatusTag",g)};const w={class:"ee-search-bar"},x=e.defineComponent({name:"EeSearchBar",__name:"index",props:{modelValue:{},fields:{},inline:{type:Boolean,default:!0},labelWidth:{default:"auto"},collapsible:{type:Boolean,default:!1},collapsedCount:{default:3}},emits:["update:modelValue","search","reset"],setup(l,{emit:V}){const d=l,p=V,f=e.ref(),m=e.ref(!1),c=e.computed(()=>{const n=24-t.value.reduce((r,u)=>r+(u.span??6),0)%24;return n===24?6:n}),t=e.computed(()=>!d.collapsible||m.value?d.fields:d.fields.slice(0,d.collapsedCount));function s(){p("search",{...d.modelValue})}function i(){const a={};d.fields.forEach(n=>{a[n.prop]=""}),p("update:modelValue",a),p("reset")}return(a,n)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(e.unref(o.ElForm),e.mergeProps({ref_key:"formRef",ref:f,model:l.modelValue,inline:l.inline,"label-width":l.labelWidth},a.$attrs),{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElRow),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,r=>(e.openBlock(),e.createBlock(e.unref(o.ElCol),{key:r.prop,span:r.span??6},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElFormItem),{label:r.label,prop:r.prop},{default:e.withCtx(()=>[(r.type??"input")==="input"?(e.openBlock(),e.createBlock(e.unref(o.ElInput),{key:0,modelValue:l.modelValue[r.prop],"onUpdate:modelValue":u=>l.modelValue[r.prop]=u,placeholder:r.placeholder??`请输入${r.label}`,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder"])):r.type==="select"?(e.openBlock(),e.createBlock(e.unref(o.ElSelect),{key:1,modelValue:l.modelValue[r.prop],"onUpdate:modelValue":u=>l.modelValue[r.prop]=u,placeholder:r.placeholder??`请选择${r.label}`,clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options??[],u=>(e.openBlock(),e.createBlock(e.unref(o.ElOption),{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):r.type==="date"?(e.openBlock(),e.createBlock(e.unref(o.ElDatePicker),{key:2,modelValue:l.modelValue[r.prop],"onUpdate:modelValue":u=>l.modelValue[r.prop]=u,placeholder:r.placeholder??`请选择${r.label}`,style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue","placeholder"])):r.type==="date-range"?(e.openBlock(),e.createBlock(e.unref(o.ElDatePicker),{key:3,modelValue:l.modelValue[r.prop],"onUpdate:modelValue":u=>l.modelValue[r.prop]=u,type:"daterange","range-separator":r.placeholder??"至","start-placeholder":r.placeholder??"开始日期","end-placeholder":r.placeholder??"结束日期",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue","range-separator","start-placeholder","end-placeholder"])):r.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),{key:4,modelValue:l.modelValue[r.prop],"onUpdate:modelValue":u=>l.modelValue[r.prop]=u},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:2},1032,["label","prop"])]),_:2},1032,["span"]))),128)),e.createVNode(e.unref(o.ElCol),{span:c.value},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElButton),{type:"primary",onClick:s},{default:e.withCtx(()=>[...n[1]||(n[1]=[e.createTextVNode(" 搜索 ",-1)])]),_:1}),e.createVNode(e.unref(o.ElButton),{onClick:i},{default:e.withCtx(()=>[...n[2]||(n[2]=[e.createTextVNode(" 重置 ",-1)])]),_:1}),l.collapsible&&l.fields.length>l.collapsedCount?(e.openBlock(),e.createBlock(e.unref(o.ElButton),{key:0,text:"",onClick:n[0]||(n[0]=r=>m.value=!m.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value?"收起":"展开"),1)]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["span"])]),_:1})]),_:1},16,["model","inline","label-width"])]))}}),E=(l,V)=>{const d=l.__vccOpts||l;for(const[p,f]of V)d[p]=f;return d},h=E(x,[["__scopeId","data-v-64bb08e9"]]);h.install=l=>{l.component(h.name??"EeSearchBar",h)};const S={class:"ee-form-dialog-footer"},B=E(e.defineComponent({name:"EeFormDialog",__name:"index",props:{modelValue:{type:Boolean},title:{default:"表单"},formData:{},fields:{},rules:{},width:{default:"600px"},labelWidth:{default:"auto"},loading:{type:Boolean,default:!1}},emits:["update:modelValue","submit","cancel"],setup(l,{emit:V}){const d=l,p=V,f=e.ref(),m=e.computed(()=>{const s={};for(const i of Object.keys(d))["modelValue","title","formData","fields","rules","width","labelWidth","loading"].includes(i)||(s[i]=d[i]);return s});function c(){p("update:modelValue",!1),p("cancel")}async function t(){if(f.value)try{await f.value.validate(),p("submit",{...d.formData})}catch{}}return(s,i)=>(e.openBlock(),e.createBlock(e.unref(o.ElDialog),e.mergeProps(s.$attrs,{"model-value":l.modelValue,title:l.title,width:l.width,"onUpdate:modelValue":i[0]||(i[0]=a=>p("update:modelValue",a)),onClose:c}),{footer:e.withCtx(()=>[e.createElementVNode("span",S,[e.createVNode(e.unref(o.ElButton),{onClick:c},{default:e.withCtx(()=>[...i[1]||(i[1]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(o.ElButton),{type:"primary",loading:l.loading,onClick:t},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode(" 确定 ",-1)])]),_:1},8,["loading"])])]),default:e.withCtx(()=>[e.createVNode(e.unref(o.ElForm),e.mergeProps({ref_key:"formRef",ref:f,model:l.formData,rules:l.rules,"label-width":l.labelWidth},m.value),{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.fields,a=>(e.openBlock(),e.createBlock(e.unref(o.ElCol),{key:a.prop,span:a.span??24},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElFormItem),{label:a.label,prop:a.prop},{default:e.withCtx(()=>[(a.type??"input")==="input"?(e.openBlock(),e.createBlock(e.unref(o.ElInput),{key:0,modelValue:l.formData[a.prop],"onUpdate:modelValue":n=>l.formData[a.prop]=n,placeholder:a.placeholder??`请输入${a.label}`},null,8,["modelValue","onUpdate:modelValue","placeholder"])):a.type==="textarea"?(e.openBlock(),e.createBlock(e.unref(o.ElInput),{key:1,modelValue:l.formData[a.prop],"onUpdate:modelValue":n=>l.formData[a.prop]=n,type:"textarea",placeholder:a.placeholder??`请输入${a.label}`,rows:3},null,8,["modelValue","onUpdate:modelValue","placeholder"])):a.type==="select"?(e.openBlock(),e.createBlock(e.unref(o.ElSelect),{key:2,modelValue:l.formData[a.prop],"onUpdate:modelValue":n=>l.formData[a.prop]=n,placeholder:a.placeholder??`请选择${a.label}`,style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.options??[],n=>(e.openBlock(),e.createBlock(e.unref(o.ElOption),{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):a.type==="radio"?(e.openBlock(),e.createBlock(e.unref(o.ElRadioGroup),{key:3,modelValue:l.formData[a.prop],"onUpdate:modelValue":n=>l.formData[a.prop]=n},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.options??[],n=>(e.openBlock(),e.createBlock(e.unref(o.ElRadio),{key:n.value,label:n.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):a.type==="checkbox"?(e.openBlock(),e.createBlock(e.unref(o.ElCheckboxGroup),{key:4,modelValue:l.formData[a.prop],"onUpdate:modelValue":n=>l.formData[a.prop]=n},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.options??[],n=>(e.openBlock(),e.createBlock(e.unref(o.ElCheckbox),{key:n.value,label:n.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):a.type==="switch"?(e.openBlock(),e.createBlock(e.unref(o.ElSwitch),{key:5,modelValue:l.formData[a.prop],"onUpdate:modelValue":n=>l.formData[a.prop]=n},null,8,["modelValue","onUpdate:modelValue"])):a.type==="date"?(e.openBlock(),e.createBlock(e.unref(o.ElDatePicker),{key:6,modelValue:l.formData[a.prop],"onUpdate:modelValue":n=>l.formData[a.prop]=n,placeholder:a.placeholder??`请选择${a.label}`,style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue","placeholder"])):a.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{key:7,modelValue:l.formData[a.prop],"onUpdate:modelValue":n=>l.formData[a.prop]=n},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:2},1032,["label","prop"])]),_:2},1032,["span"]))),128))]),_:1})]),_:1},16,["model","rules","label-width"])]),_:1},16,["model-value","title","width"]))}}),[["__scopeId","data-v-0307e8cf"]]);B.install=l=>{l.component(B.name??"EeFormDialog",B)};const D={class:"ee-form-table"},U={key:1,class:"ee-form-table-toolbar"},N={key:2,class:"ee-form-table-pagination"},y=E(e.defineComponent({name:"EeFormTable",__name:"index",props:{data:{},columns:{},searchFields:{},pagination:{},loading:{type:Boolean,default:!1},showSelection:{type:Boolean,default:!1},showIndex:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!0},pageSizes:{default:()=>[10,20,50,100]},paginationLayout:{default:"total, sizes, prev, pager, next, jumper"},collapsible:{type:Boolean,default:!1},collapsedCount:{default:3}},emits:["search","reset","selection-change","sort-change","current-change","size-change"],setup(l,{emit:V}){const d=V,p=e.ref(),f=e.ref({});return(m,c)=>(e.openBlock(),e.createElementBlock("div",D,[l.searchFields&&l.searchFields.length?(e.openBlock(),e.createBlock(e.unref(h),{key:0,modelValue:f.value,"onUpdate:modelValue":c[0]||(c[0]=t=>f.value=t),fields:l.searchFields,collapsible:l.collapsible,"collapsed-count":l.collapsedCount,onSearch:c[1]||(c[1]=t=>d("search",t)),onReset:c[2]||(c[2]=t=>d("reset"))},null,8,["modelValue","fields","collapsible","collapsed-count"])):e.createCommentVNode("",!0),m.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",U,[e.renderSlot(m.$slots,"toolbar",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(e.unref(o.ElTable),e.mergeProps({ref_key:"tableRef",ref:p},m.$attrs,{data:l.data,loading:l.loading,onSelectionChange:c[3]||(c[3]=t=>d("selection-change",t)),onSortChange:c[4]||(c[4]=t=>d("sort-change",t))}),{default:e.withCtx(()=>[l.showSelection?(e.openBlock(),e.createBlock(e.unref(o.ElTableColumn),{key:0,type:"selection",width:"50",fixed:"left"})):e.createCommentVNode("",!0),l.showIndex?(e.openBlock(),e.createBlock(e.unref(o.ElTableColumn),{key:1,type:"index",label:"序号",width:"60",fixed:"left"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.columns,t=>(e.openBlock(),e.createBlock(e.unref(o.ElTableColumn),{key:t.prop,prop:t.prop,label:t.label,width:t.width,"min-width":t.minWidth,fixed:t.fixed,sortable:t.sortable,align:t.align??"center"},{default:e.withCtx(s=>[e.renderSlot(m.$slots,t.prop,{row:s.row,index:s.$index},()=>[e.createElementVNode("span",null,e.toDisplayString(t.formatter?t.formatter(s.row,t,s.row[t.prop],s.$index):s.row[t.prop]),1)],!0)]),_:2},1032,["prop","label","width","min-width","fixed","sortable","align"]))),128)),e.renderSlot(m.$slots,"default",{},void 0,!0)]),_:3},16,["data","loading"]),l.showPagination?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(o.ElPagination),{"current-page":l.pagination.current,"onUpdate:currentPage":c[5]||(c[5]=t=>l.pagination.current=t),"page-size":l.pagination.pageSize,"onUpdate:pageSize":c[6]||(c[6]=t=>l.pagination.pageSize=t),total:l.pagination.total,"page-sizes":l.pageSizes,layout:l.paginationLayout,background:"",onCurrentChange:c[7]||(c[7]=t=>d("current-change",t)),onSizeChange:c[8]||(c[8]=t=>d("size-change",t))},null,8,["current-page","page-size","total","page-sizes","layout"])])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-70d01eeb"]]);y.install=l=>{l.component(y.name??"EeFormTable",y)};const F=[b,g,h,B,y];function C(l){F.forEach(V=>{l.use(V)})}const $={install:C};k.EeDictSelect=b,k.EeFormDialog=B,k.EeFormTable=y,k.EeSearchBar=h,k.EeStatusTag=g,k.default=$,k.install=C,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ee-search-bar[data-v-64bb08e9]{margin-bottom:16px}.ee-search-bar .el-form-item[data-v-64bb08e9]{margin-bottom:0}.ee-form-dialog-footer[data-v-0307e8cf]{display:flex;justify-content:flex-end;gap:12px}.ee-form-table-toolbar[data-v-70d01eeb]{margin-bottom:16px;display:flex;align-items:center;gap:12px}.ee-form-table-pagination[data-v-70d01eeb]{margin-top:16px;display:flex;justify-content:flex-end}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DictOption } from '../../../utils/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: string | number | unknown[];
|
|
4
|
+
options?: DictOption[];
|
|
5
|
+
request?: () => Promise<DictOption[]>;
|
|
6
|
+
valueField?: string;
|
|
7
|
+
labelField?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
+
"update:modelValue": (val: string | number | unknown[]) => any;
|
|
11
|
+
change: (val: string | number | unknown[]) => any;
|
|
12
|
+
clear: () => any;
|
|
13
|
+
focus: (evt: FocusEvent) => any;
|
|
14
|
+
blur: (evt: FocusEvent) => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((val: string | number | unknown[]) => any) | undefined;
|
|
17
|
+
onChange?: ((val: string | number | unknown[]) => any) | undefined;
|
|
18
|
+
onClear?: (() => any) | undefined;
|
|
19
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
20
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
valueField: string;
|
|
23
|
+
labelField: string;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { FormField } from '../../../utils/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
formData: Record<string, any>;
|
|
6
|
+
fields: FormField[];
|
|
7
|
+
rules?: Record<string, any[]>;
|
|
8
|
+
width?: string | number;
|
|
9
|
+
labelWidth?: string | number;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
|
+
"update:modelValue": (val: boolean) => any;
|
|
14
|
+
submit: (val: Record<string, any>) => any;
|
|
15
|
+
cancel: () => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
18
|
+
onSubmit?: ((val: Record<string, any>) => any) | undefined;
|
|
19
|
+
onCancel?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
width: string | number;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
labelWidth: string | number;
|
|
24
|
+
title: string;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
26
|
+
formRef: ({
|
|
27
|
+
$: import('vue').ComponentInternalInstance;
|
|
28
|
+
$data: {};
|
|
29
|
+
$props: {
|
|
30
|
+
readonly model?: Record<string, any> | undefined;
|
|
31
|
+
readonly rules?: import('element-plus').FormRules | undefined;
|
|
32
|
+
readonly labelPosition?: "left" | "right" | "top" | undefined;
|
|
33
|
+
readonly requireAsteriskPosition?: "left" | "right" | undefined;
|
|
34
|
+
readonly labelWidth?: string | number | undefined;
|
|
35
|
+
readonly labelSuffix?: string | undefined;
|
|
36
|
+
readonly inline?: boolean | undefined;
|
|
37
|
+
readonly inlineMessage?: boolean | undefined;
|
|
38
|
+
readonly statusIcon?: boolean | undefined;
|
|
39
|
+
readonly showMessage?: boolean | undefined;
|
|
40
|
+
readonly validateOnRuleChange?: boolean | undefined;
|
|
41
|
+
readonly hideRequiredAsterisk?: boolean | undefined;
|
|
42
|
+
readonly scrollToError?: boolean | undefined;
|
|
43
|
+
readonly scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
|
|
44
|
+
readonly size?: import('element-plus').ComponentSize | undefined;
|
|
45
|
+
readonly disabled?: boolean | undefined;
|
|
46
|
+
readonly onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
47
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
48
|
+
$attrs: import('vue').Attrs;
|
|
49
|
+
$refs: {
|
|
50
|
+
[x: string]: unknown;
|
|
51
|
+
};
|
|
52
|
+
$slots: Readonly<{
|
|
53
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
56
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
57
|
+
$host: Element | null;
|
|
58
|
+
$emit: (event: "validate", prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
59
|
+
$el: any;
|
|
60
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
61
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
64
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
65
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
66
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
67
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
68
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
69
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
70
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
71
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
72
|
+
validate: (prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
73
|
+
}, string, {
|
|
74
|
+
labelWidth: string | number;
|
|
75
|
+
labelPosition: "left" | "right" | "top";
|
|
76
|
+
requireAsteriskPosition: "left" | "right";
|
|
77
|
+
labelSuffix: string;
|
|
78
|
+
showMessage: boolean;
|
|
79
|
+
validateOnRuleChange: boolean;
|
|
80
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
81
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
82
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
83
|
+
created?: (() => void) | (() => void)[];
|
|
84
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
85
|
+
mounted?: (() => void) | (() => void)[];
|
|
86
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
87
|
+
updated?: (() => void) | (() => void)[];
|
|
88
|
+
activated?: (() => void) | (() => void)[];
|
|
89
|
+
deactivated?: (() => void) | (() => void)[];
|
|
90
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
91
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
92
|
+
destroyed?: (() => void) | (() => void)[];
|
|
93
|
+
unmounted?: (() => void) | (() => void)[];
|
|
94
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
95
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
96
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
97
|
+
};
|
|
98
|
+
$forceUpdate: () => void;
|
|
99
|
+
$nextTick: typeof import('vue').nextTick;
|
|
100
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
101
|
+
} & Readonly<{
|
|
102
|
+
labelWidth: string | number;
|
|
103
|
+
labelPosition: "left" | "right" | "top";
|
|
104
|
+
requireAsteriskPosition: "left" | "right";
|
|
105
|
+
labelSuffix: string;
|
|
106
|
+
showMessage: boolean;
|
|
107
|
+
validateOnRuleChange: boolean;
|
|
108
|
+
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
109
|
+
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
110
|
+
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
111
|
+
}>, "fields" | "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "setInitialValues"> & {
|
|
112
|
+
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
113
|
+
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
114
|
+
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
115
|
+
clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
116
|
+
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
117
|
+
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
118
|
+
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
119
|
+
setInitialValues: (initModel: Record<string, any>) => void;
|
|
120
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
121
|
+
$slots: {
|
|
122
|
+
default?: (props: {}) => any;
|
|
123
|
+
};
|
|
124
|
+
}) | null;
|
|
125
|
+
}, any>;
|
|
126
|
+
export default _default;
|