@lingshugroup/web-plus 1.0.31 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.cjs +1 -1
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js +43 -45
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.br +0 -0
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.gz +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index.js +2 -2
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +270 -245
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/types/index.js +4 -0
- package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index.js +2 -2
- package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index2.js +103 -103
- package/lib/packages/ls-components/components/list/List.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/list/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/types/index.js +11 -0
- package/lib/packages/ls-components/components/list/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/list/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js +1 -1
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/table/Table.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index.js +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index2.js +98 -98
- package/lib/packages/ls-components/components/table/Table.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/table/Table.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/table/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/table/types/index.js +12 -2
- package/lib/packages/ls-components/components/table/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/table/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +65 -65
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var e=(a,l)=>o(a,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../_utils/runtime/index.cjs"),r=t.buildProps({formData:{type:Object,default:e(()=>({}),"default"),required:!0},formItems:{type:Array,default:e(()=>[],"default"),required:!0},column:{type:Number,default:1},loading:{type:Boolean,default:!1},showBtnLoading:{type:Boolean,default:!0},read:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showButtons:{type:Boolean,default:!0},buttonsClass:{type:String,default:""},buttonsLeft:{type:Boolean,default:!1},showReset:{type:Boolean,default:!0},showSubmit:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},resetText:{type:String,default:"重置"},confirmClassName:{type:String,default:""},colon:{type:Boolean,default:!1},labelWidth:{type:[String,Number],default:"auto"},labelEmpty:{type:String,default:"--"},hasDefReadStyle:{type:Boolean,default:!1},hideColumn:{type:Boolean,default:!1}}),u=t.buildProps({isValue:{type:Boolean,default:!1},value:{type:[String,Number,Boolean,Object,Array]},type:{type:String,values:["label","input","textarea","number","radio","checkbox","select","date","datetimerange","timePicker","timeSelect","cascader","multipleCascader","switch","inputRange","inputNumberRange","slot","itemSlot"]},label:{type:String,default:""},prop:{type:[String,Array],default:""},rules:{type:Object,default:e(()=>{},"default")},className:{type:String,default:""},labelClass:{type:String,default:""},labelIconClass:{type:String,default:""},tooltip:{type:String,default:""},options:{type:Array,default:e(()=>[],"default")},attrs:{type:Object,default:e(()=>{},"default")},listeners:{type:Object,default:e(()=>{},"default")},colon:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},read:{type:Boolean,default:!1},labelEmpty:{type:String,default:"--"},labelNumber:{type:Boolean,default:!1},dateFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},formatReadValue:{type:Function},rangeSeparator:{type:String,default:"~"},rangeProps:{type:Array,default:e(()=>["start","end"],"default")},radioType:{type:String,default:""},isRow:{type:Boolean,default:!1},selectAll:{type:Boolean,default:!0},index:{type:Number,default:0},slotKey:{type:String,default:""}});exports.lsFormItemProps=u;exports.lsFormProps=r;
|
|
1
|
+
"use strict";var o=Object.defineProperty;var e=(a,l)=>o(a,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../_utils/runtime/index.cjs"),r=t.buildProps({formData:{type:Object,default:e(()=>({}),"default"),required:!0},formItems:{type:Array,default:e(()=>[],"default"),required:!0},column:{type:Number,default:1},loading:{type:Boolean,default:!1},showBtnLoading:{type:Boolean,default:!0},read:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showButtons:{type:Boolean,default:!0},buttonsClass:{type:String,default:""},buttonsLeft:{type:Boolean,default:!1},showReset:{type:Boolean,default:!0},showSubmit:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},resetText:{type:String,default:"重置"},confirmClassName:{type:String,default:""},colon:{type:Boolean,default:!1},labelWidth:{type:[String,Number],default:"auto"},labelEmpty:{type:String,default:"--"},hasDefReadStyle:{type:Boolean,default:!1},hideColumn:{type:Boolean,default:!1}}),u=t.buildProps({isValue:{type:Boolean,default:!1},value:{type:[String,Number,Boolean,Object,Array]},type:{type:String,values:["label","input","textarea","number","radio","checkbox","select","date","datetimerange","timePicker","timeSelect","cascader","multipleCascader","switch","inputRange","inputNumberRange","slot","itemSlot"]},label:{type:String,default:""},prop:{type:[String,Array],default:""},rules:{type:Object,default:e(()=>{},"default")},className:{type:String,default:""},labelClass:{type:String,default:""},labelIconClass:{type:String,default:""},tooltip:{type:String,default:""},options:{type:Array,default:e(()=>[],"default")},attrs:{type:Object,default:e(()=>{},"default")},listeners:{type:Object,default:e(()=>{},"default")},colon:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},read:{type:Boolean,default:!1},labelEmpty:{type:String,default:"--"},labelNumber:{type:Boolean,default:!1},dateFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},formatReadValue:{type:Function},rangeSeparator:{type:String,default:"~"},rangeProps:{type:Array,default:e(()=>["start","end"],"default")},radioType:{type:String,default:""},isRow:{type:Boolean,default:!1},selectAll:{type:Boolean,default:!0},index:{type:Number,default:0},slotKey:{type:String,default:""},levelMatch:{type:Boolean,default:!1}});exports.lsFormItemProps=u;exports.lsFormProps=r;
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-51359612"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-51359612"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Y=Object.defineProperty;var n=(p,w)=>Y(p,"name",{value:w,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),Z=,/* empty css */r=require("element-plus"),_=,/* empty css */ee=,/* empty css */te=,/* empty css */le=,/* empty css */ae=,/* empty css */oe=,/* empty css */ne=,/* empty css */ie={key:0,class:"animate_fadeIn transition-all-300 ls-list-wrap"},re={class:"flex items-center"},se=e.defineComponent({name:"LSList"}),de=e.defineComponent({...se,props:_.lsListProps,emits:["submitForm"],setup(p,{expose:w,emit:F}){const{jumpRouteCom:T,currentRouter:D}=le.default(),t=p,V=F,S=e.useSlots(),v=e.ref(),C=e.ref(),N=e.computed(()=>Object.keys(S).filter(l=>l.toString().endsWith("-form-slot"))),A=e.computed(()=>Object.keys(S).filter(l=>l.toString().endsWith("-table-slot")));function E(l,a=!1){if(l){const i=l.toString().lastIndexOf(`${a?"-form-slot":"-table-slot"}`);return i!==-1?l.toString().slice(0,i):l}return""}n(E,"getSlotName");const{isFirst:B,loading:c,tableData:P,total:R,pageSize:b,currentPage:m,handleReset:$,loadData:h}=Z.default(t.listApi,t.formData,{dealData:t==null?void 0:t.dealData,dealParams:t==null?void 0:t.dealParams,...t==null?void 0:t.listHookConfig});function L(l){V("submitForm",l),t!=null&&t.queryFn?t.queryFn(l):h()}n(L,"submitForm");function z(l){console.warn("resetForm",l),$()}n(z,"resetForm");const y=e.computed(()=>D?D.value.path:"");function O(){t!=null&&t.addFn?t.addFn():T({path:t!=null&&t.addRoutePath?t.addRoutePath:`${y.value}/add`},1)}n(O,"onAdd");function K(l,a){t!=null&&t.tableDetailFn?t.tableDetailFn(a):T({path:`${t!=null&&t.detailRoutePath?t.detailRoutePath:`${y.value}/detail`}/${l}`},1)}n(K,"onDetail");function H(l,a){t!=null&&t.tableEditFn?t.tableEditFn(a):T({path:`${t!=null&&t.editRoutePath?t.editRoutePath:`${y.value}/edit`}/${l}`},1)}n(H,"onEdit");const k=e.ref(void 0),f=e.ref(!1);function I(l,a){if(t.delApi){k.value=l,f.value=!0;let i=l;t!=null&&t.dealDelParams&&(i=t.dealDelParams(a)),t.delApi(i).then(()=>{r.ElMessage.success("删除成功"),h()}).catch(d=>{console.warn(d)}).finally(()=>{f.value=!1})}}n(I,"onDel");const q=e.ref(),g=e.ref(!1);function M(l,a,i){q.value=l;const d=n((u,o)=>{if(t.switchApi){g.value=!0;let s=l;t!=null&&t.dealSwitchParams&&(s=t.dealSwitchParams(i)),t.switchApi(s).then(()=>{h(!1),u(!0)}).catch(()=>{o(new Error("Error"))}).finally(()=>{g.value=!1})}else o(new Error("Error"))},"onSwitch");return new Promise((u,o)=>{a?r.ElMessageBox.confirm('<strong class="text-14px">请问是否关闭?</strong>',{confirmButtonText:"确定",cancelButtonText:"取消",dangerouslyUseHTMLString:!0,customStyle:{width:"240px"}}).then(()=>{d(u,o)}).catch(()=>{o(new Error("Error"))}):d(u,o)})}n(M,"switchBeforeChange");function U(l){let a=!1;return t!=null&&t.disabledTableSwitch&&(typeof t.disabledTableSwitch=="boolean"?a=t.disabledTableSwitch:typeof t.disabledTableSwitch=="function"&&(a=t.disabledTableSwitch(l))),!!a}n(U,"disabledTableSwitch");function j(l){let a=!1;return t!=null&&t.showTableDetail&&(typeof t.showTableDetail=="boolean"?a=t.showTableDetail:typeof t.showTableDetail=="function"&&(a=t.showTableDetail(l))),!!a}n(j,"showTableDetail");function W(l){let a=!1;return t!=null&&t.disabledTableDetail&&(typeof t.disabledTableDetail=="boolean"?a=t.disabledTableDetail:typeof t.disabledTableDetail=="function"&&(a=t.disabledTableDetail(l))),!!a}n(W,"disabledTableDetail");function x(l){let a=!1;return t!=null&&t.showTableEdit&&(typeof t.showTableEdit=="boolean"?a=t.showTableEdit:typeof t.showTableEdit=="function"&&(a=t.showTableEdit(l))),!!a}n(x,"showTableEdit");function G(l){let a=!1;return t!=null&&t.disabledTableEdit&&(typeof t.disabledTableEdit=="boolean"?a=t.disabledTableEdit:typeof t.disabledTableEdit=="function"&&(a=t.disabledTableEdit(l))),!!a}n(G,"disabledTableEdit");function J(l){let a=!1;return t!=null&&t.showTableDel&&(typeof t.showTableDel=="boolean"?a=t.showTableDel:typeof t.showTableDel=="function"&&(a=t.showTableDel(l))),!!a}n(J,"showTableDel");function Q(l){let a=!1;return t!=null&&t.disabledTableDel&&(typeof t.disabledTableDel=="boolean"?a=t.disabledTableDel:typeof t.disabledTableDel=="function"&&(a=t.disabledTableDel(l))),!!a}n(Q,"disabledTableDel");const X=e.h(r.ElDivider,{direction:"vertical"});return w({loadData:h,handleReset:$,isFirst:B,loading:c,currentPage:m,pageSize:b,total:R,FormRef:v,TableRef:C}),(l,a)=>{const i=ae.ElTableColumn,d=oe.ElPopconfirm,u=ne.ElSkeleton;return e.unref(B)?(e.openBlock(),e.createBlock(u,{key:1,rows:5,animated:""})):(e.openBlock(),e.createElementBlock("div",ie,[l.showForm?(e.openBlock(),e.createBlock(ee.default,e.mergeProps({key:0,ref_key:"FormRef",ref:v,class:["mb-6px ls-form-cpo",l.formClass],"label-position":"top","show-btn-loading":!1,colon:!1,inline:!0,"form-data":l.formData,"form-items":l.formItems,loading:e.unref(c),"confirm-text":"查询"},l.formAttrs,{onSubmit:L,onReset:z}),e.createSlots({default:e.withCtx(o=>[e.renderSlot(l.$slots,"form-append",e.normalizeProps(e.guardReactiveProps(o)),void 0,!0)]),_:2},[e.renderList(e.unref(N),o=>({name:E(o,!0),fn:e.withCtx(s=>[e.renderSlot(l.$slots,o,e.normalizeProps(e.guardReactiveProps(s)),void 0,!0)])}))]),1040,["class","form-data","form-items","loading"])):e.createCommentVNode("",!0),l.showOperate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.$slots.operate?e.renderSlot(l.$slots,"operate",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.showOperateDivider?(e.openBlock(),e.createBlock(e.unref(r.ElDivider),{key:0,"border-style":"dashed"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["mt-24px flex items-center justify-start",l.operateClass])},[e.renderSlot(l.$slots,"operate-prepend",{},void 0,!0),l.showAdd?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:0,type:"primary",disabled:e.unref(c)||l.disabledAddBtn,onClick:O},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.addBtnText),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"operate-append",{},void 0,!0)],2)],64))],64)):e.createCommentVNode("",!0),e.createVNode(te.default,e.mergeProps({ref_key:"TableRef",ref:C,class:["ls-table-cpo",[l.showOperate?"mt-16px":"mt-24px"]],"show-overflow-tooltip":!0,loading:e.unref(c),total:e.unref(R),"table-data":e.unref(P),"table-column":l.tableColumn,"current-page":e.unref(m),"onUpdate:currentPage":a[0]||(a[0]=o=>e.isRef(m)?m.value=o:null),"page-size":e.unref(b),"onUpdate:pageSize":a[1]||(a[1]=o=>e.isRef(b)?b.value=o:null)},l.tableAttrs,e.toHandlers(l.tableListeners||{})),e.createSlots({default:e.withCtx(()=>[l.showTableSwitch?(e.openBlock(),e.createBlock(i,e.mergeProps({key:0,prop:l.switchProp,label:"是否开启",width:"100"},l.tableSwitchColumn),{default:e.withCtx(({row:o})=>[e.createVNode(e.unref(r.ElSwitch),{class:"ls-list-table__switch","model-value":o[l.switchProp]?1:0,"active-value":1,"inactive-value":0,loading:e.unref(g)&&o[l.tableRowKey]===e.unref(q),"before-change":n(()=>M(o[l.tableRowKey],o[l.switchProp],o),"before-change"),disabled:U(o)},null,8,["model-value","loading","before-change","disabled"])]),_:1},16,["prop"])):e.createCommentVNode("",!0),l.showTableOperate?(e.openBlock(),e.createBlock(i,e.mergeProps({key:1,fixed:"right",prop:"operate",label:"操作","show-overflow-tooltip":!1},l.tableOperateColumn),{default:e.withCtx(({row:o})=>[e.createElementVNode("div",re,[e.createVNode(e.unref(r.ElSpace),{size:0,spacer:e.unref(X)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"table-operate-prepend",{row:o},void 0,!0),j(o)?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:0,disabled:W(o),link:"",type:"primary",onClick:n(s=>K(o[l.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.tableDetailText||"查看"),1)]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),x(o)?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:1,disabled:G(o),link:"",type:"primary",onClick:n(s=>H(o[l.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.tableEditText||"编辑"),1)]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),J(o)?(e.openBlock(),e.createBlock(d,{key:2,"hide-icon":"",placement:"top",width:"180","confirm-button-text":"确认","cancel-button-text":"取消",title:"是否删除当前列数据?",onConfirm:n(s=>I(o[l.tableRowKey],o),"onConfirm")},{reference:e.withCtx(()=>[e.createVNode(e.unref(r.ElButton),{link:"",type:"danger",disabled:e.unref(f)||Q(o),loading:e.unref(f)&&e.unref(k)===o[l.tableRowKey]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)&&e.unref(k)===o[l.tableRowKey]?"":l.tableDelText||"删除"),1)]),_:2},1032,["disabled","loading"])]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"table-operate-append",{row:o},void 0,!0)]),_:2},1032,["spacer"])])]),_:3},16)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"table-append",{tableData:e.unref(P)},void 0,!0)]),_:2},[e.renderList(e.unref(A),o=>({name:E(o,!1),fn:e.withCtx(s=>[e.renderSlot(l.$slots,o,e.normalizeProps(e.guardReactiveProps(s)),void 0,!0)])}))]),1040,["class","loading","total","table-data","table-column","current-page","page-size"])]))}}});exports.default=de;
|
|
1
|
+
"use strict";var Z=Object.defineProperty;var n=(w,p)=>Z(w,"name",{value:p,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),_=,/* empty css */r=require("element-plus"),ee=,/* empty css */te=,/* empty css */le=,/* empty css */ae=,/* empty css */oe=,/* empty css */ne=,/* empty css */ie=,/* empty css */re={key:0,class:"animate_fadeIn transition-all-300 ls-list-wrap"},se={class:"flex items-center"},de=e.defineComponent({name:"LSList"}),ue=e.defineComponent({...de,props:ee.lsListProps,emits:["submitForm"],setup(w,{expose:p,emit:F}){const{jumpRouteCom:T,currentRouter:D}=ae.default(),t=w,V=F,S=e.useSlots(),v=e.ref(),C=e.ref(),N=e.computed(()=>Object.keys(S).filter(l=>l.toString().endsWith("-form-slot"))),A=e.computed(()=>Object.keys(S).filter(l=>l.toString().endsWith("-table-slot")));function E(l,a=!1){if(l){const i=l.toString().lastIndexOf(`${a?"-form-slot":"-table-slot"}`);return i!==-1?l.toString().slice(0,i):l}return""}n(E,"getSlotName");const{isFirst:B,loading:c,tableData:P,total:R,pageSize:b,currentPage:m,handleReset:$,loadData:h}=_.default(t.listApi,t.formData,{dealData:t==null?void 0:t.dealData,dealParams:t==null?void 0:t.dealParams,...t==null?void 0:t.listHookConfig});function L(l){V("submitForm",l),t!=null&&t.queryFn?t.queryFn(l):h()}n(L,"submitForm");function z(l){console.warn("resetForm",l),$()}n(z,"resetForm");const y=e.computed(()=>D?D.value.path:"");function O(){t!=null&&t.addFn?t.addFn():T({path:t!=null&&t.addRoutePath?t.addRoutePath:`${y.value}/add`},1)}n(O,"onAdd");function K(l,a){t!=null&&t.tableDetailFn?t.tableDetailFn(a):T({path:`${t!=null&&t.detailRoutePath?t.detailRoutePath:`${y.value}/detail`}/${l}`},1)}n(K,"onDetail");function H(l,a){t!=null&&t.tableEditFn?t.tableEditFn(a):T({path:`${t!=null&&t.editRoutePath?t.editRoutePath:`${y.value}/edit`}/${l}`},1)}n(H,"onEdit");const k=e.ref(void 0),f=e.ref(!1);function I(l,a){if(t.delApi){k.value=l,f.value=!0;let i=l;t!=null&&t.dealDelParams&&(i=t.dealDelParams(a)),t.delApi(i).then(()=>{r.ElMessage.success("删除成功"),h()}).catch(d=>{console.warn(d)}).finally(()=>{f.value=!1})}}n(I,"onDel");const q=e.ref(),g=e.ref(!1);function M(l,a,i){q.value=l;const d=n((u,o)=>{if(t.switchApi){g.value=!0;let s=l;t!=null&&t.dealSwitchParams&&(s=t.dealSwitchParams(i)),t.switchApi(s).then(()=>{h(!1),u(!0)}).catch(()=>{o(new Error("Error"))}).finally(()=>{g.value=!1})}else o(new Error("Error"))},"onSwitch");return new Promise((u,o)=>{a?r.ElMessageBox.confirm('<strong class="text-14px">请问是否关闭?</strong>',{confirmButtonText:"确定",cancelButtonText:"取消",dangerouslyUseHTMLString:!0,customStyle:{width:"240px"}}).then(()=>{d(u,o)}).catch(()=>{o(new Error("Error"))}):d(u,o)})}n(M,"switchBeforeChange");function U(l){let a=!1;return t!=null&&t.disabledTableSwitch&&(typeof t.disabledTableSwitch=="boolean"?a=t.disabledTableSwitch:typeof t.disabledTableSwitch=="function"&&(a=t.disabledTableSwitch(l))),!!a}n(U,"disabledTableSwitch");function j(l){let a=!1;return t!=null&&t.showTableDetail&&(typeof t.showTableDetail=="boolean"?a=t.showTableDetail:typeof t.showTableDetail=="function"&&(a=t.showTableDetail(l))),!!a}n(j,"showTableDetail");function W(l){let a=!1;return t!=null&&t.disabledTableDetail&&(typeof t.disabledTableDetail=="boolean"?a=t.disabledTableDetail:typeof t.disabledTableDetail=="function"&&(a=t.disabledTableDetail(l))),!!a}n(W,"disabledTableDetail");function x(l){let a=!1;return t!=null&&t.showTableEdit&&(typeof t.showTableEdit=="boolean"?a=t.showTableEdit:typeof t.showTableEdit=="function"&&(a=t.showTableEdit(l))),!!a}n(x,"showTableEdit");function G(l){let a=!1;return t!=null&&t.disabledTableEdit&&(typeof t.disabledTableEdit=="boolean"?a=t.disabledTableEdit:typeof t.disabledTableEdit=="function"&&(a=t.disabledTableEdit(l))),!!a}n(G,"disabledTableEdit");function J(l){let a=!1;return t!=null&&t.showTableDel&&(typeof t.showTableDel=="boolean"?a=t.showTableDel:typeof t.showTableDel=="function"&&(a=t.showTableDel(l))),!!a}n(J,"showTableDel");function Q(l){let a=!1;return t!=null&&t.disabledTableDel&&(typeof t.disabledTableDel=="boolean"?a=t.disabledTableDel:typeof t.disabledTableDel=="function"&&(a=t.disabledTableDel(l))),!!a}n(Q,"disabledTableDel");const X=e.h(r.ElDivider,{direction:"vertical"}),Y=e.computed(()=>t.showSkeleton?!B.value:!0);return p({loadData:h,handleReset:$,isFirst:B,loading:c,currentPage:m,pageSize:b,total:R,FormRef:v,TableRef:C}),(l,a)=>{const i=oe.ElTableColumn,d=ne.ElPopconfirm,u=ie.ElSkeleton;return e.unref(Y)?(e.openBlock(),e.createElementBlock("div",re,[l.showForm?(e.openBlock(),e.createBlock(te.default,e.mergeProps({key:0,ref_key:"FormRef",ref:v,class:["mb-6px ls-form-cpo",l.formClass],"label-position":"top","show-btn-loading":!1,colon:!1,inline:!0,"form-data":l.formData,"form-items":l.formItems,loading:e.unref(c),"confirm-text":"查询"},l.formAttrs,{onSubmit:L,onReset:z}),e.createSlots({default:e.withCtx(o=>[e.renderSlot(l.$slots,"form-append",e.normalizeProps(e.guardReactiveProps(o)),void 0,!0)]),_:2},[e.renderList(e.unref(N),o=>({name:E(o,!0),fn:e.withCtx(s=>[e.renderSlot(l.$slots,o,e.normalizeProps(e.guardReactiveProps(s)),void 0,!0)])}))]),1040,["class","form-data","form-items","loading"])):e.createCommentVNode("",!0),l.showOperate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.$slots.operate?e.renderSlot(l.$slots,"operate",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.showOperateDivider?(e.openBlock(),e.createBlock(e.unref(r.ElDivider),{key:0,"border-style":"dashed"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["mt-24px flex items-center justify-start",l.operateClass])},[e.renderSlot(l.$slots,"operate-prepend",{},void 0,!0),l.showAdd?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:0,type:"primary",disabled:e.unref(c)||l.disabledAddBtn,onClick:O},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.addBtnText),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"operate-append",{},void 0,!0)],2)],64))],64)):e.createCommentVNode("",!0),e.createVNode(le.default,e.mergeProps({ref_key:"TableRef",ref:C,class:["ls-table-cpo",[l.showOperate?"mt-16px":"mt-24px"]],"show-overflow-tooltip":!0,loading:e.unref(c),total:e.unref(R),"table-data":e.unref(P),"table-column":l.tableColumn,"current-page":e.unref(m),"onUpdate:currentPage":a[0]||(a[0]=o=>e.isRef(m)?m.value=o:null),"page-size":e.unref(b),"onUpdate:pageSize":a[1]||(a[1]=o=>e.isRef(b)?b.value=o:null)},l.tableAttrs,e.toHandlers(l.tableListeners||{})),e.createSlots({default:e.withCtx(()=>[l.showTableSwitch?(e.openBlock(),e.createBlock(i,e.mergeProps({key:0,prop:l.switchProp,label:"是否开启",width:"100"},l.tableSwitchColumn),{default:e.withCtx(({row:o})=>[e.createVNode(e.unref(r.ElSwitch),{class:"ls-list-table__switch","model-value":o[l.switchProp]?1:0,"active-value":1,"inactive-value":0,loading:e.unref(g)&&o[l.tableRowKey]===e.unref(q),"before-change":n(()=>M(o[l.tableRowKey],o[l.switchProp],o),"before-change"),disabled:U(o)},null,8,["model-value","loading","before-change","disabled"])]),_:1},16,["prop"])):e.createCommentVNode("",!0),l.showTableOperate?(e.openBlock(),e.createBlock(i,e.mergeProps({key:1,fixed:"right",prop:"operate",label:"操作","show-overflow-tooltip":!1},l.tableOperateColumn),{default:e.withCtx(({row:o})=>[e.createElementVNode("div",se,[e.createVNode(e.unref(r.ElSpace),{size:0,spacer:e.unref(X)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"table-operate-prepend",{row:o},void 0,!0),j(o)?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:0,disabled:W(o),link:"",type:"primary",onClick:n(s=>K(o[l.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.tableDetailText||"查看"),1)]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),x(o)?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:1,disabled:G(o),link:"",type:"primary",onClick:n(s=>H(o[l.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.tableEditText||"编辑"),1)]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),J(o)?(e.openBlock(),e.createBlock(d,{key:2,"hide-icon":"",placement:"top",width:"180","confirm-button-text":"确认","cancel-button-text":"取消",title:`是否${l.tableDelText||"删除"}当前列数据?`,onConfirm:n(s=>I(o[l.tableRowKey],o),"onConfirm")},{reference:e.withCtx(()=>[e.createVNode(e.unref(r.ElButton),{link:"",type:"danger",disabled:e.unref(f)||Q(o),loading:e.unref(f)&&e.unref(k)===o[l.tableRowKey]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)&&e.unref(k)===o[l.tableRowKey]?"":l.tableDelText||"删除"),1)]),_:2},1032,["disabled","loading"])]),_:2},1032,["title","onConfirm"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"table-operate-append",{row:o},void 0,!0)]),_:2},1032,["spacer"])])]),_:3},16)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"table-append",{tableData:e.unref(P)},void 0,!0)]),_:2},[e.renderList(e.unref(A),o=>({name:E(o,!1),fn:e.withCtx(s=>[e.renderSlot(l.$slots,o,e.normalizeProps(e.guardReactiveProps(s)),void 0,!0)])}))]),1040,["class","loading","total","table-data","table-column","current-page","page-size"])])):(e.openBlock(),e.createBlock(u,e.mergeProps({key:1,rows:5,animated:""},l.skeletonAttrs),null,16))}}});exports.default=ue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var ye = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var i = (R, $) => ye(R, "name", { value: $, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
@@ -10,27 +10,27 @@ var o = (P, R) => ye(P, "name", { value: R, configurable: !0 });
|
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { defineComponent as _, useSlots as
|
|
14
|
-
import
|
|
15
|
-
import { ElDivider as Z, ElButton as
|
|
16
|
-
import { lsListProps as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
13
|
+
import { defineComponent as _, useSlots as De, ref as h, computed as v, h as ge, unref as o, openBlock as n, createElementBlock as B, createBlock as f, mergeProps as T, createSlots as J, withCtx as s, renderSlot as u, normalizeProps as O, guardReactiveProps as z, renderList as N, createCommentVNode as b, Fragment as Q, createElementVNode as X, normalizeClass as ve, createTextVNode as k, toDisplayString as S, createVNode as E, isRef as Y, toHandlers as ke } from "vue";
|
|
14
|
+
import Se from "../../_hooks/useTableListHook/index.js";
|
|
15
|
+
import { ElDivider as Z, ElButton as P, ElSwitch as Ee, ElSpace as Pe, ElMessage as Re, ElMessageBox as $e } from "element-plus";
|
|
16
|
+
import { lsListProps as Ce } from "../types/index.js";
|
|
17
|
+
import Fe from "../../form/Form.vue/index.js";
|
|
18
|
+
import Ae from "../../table/Table.vue/index.js";
|
|
19
19
|
import Le from "../../_hooks/useRouterHook/index.js";
|
|
20
|
-
import { ElTableColumn as
|
|
21
|
-
import { ElPopconfirm as
|
|
22
|
-
import { ElSkeleton as
|
|
23
|
-
const
|
|
20
|
+
import { ElTableColumn as Be } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/table/index/index.js";
|
|
21
|
+
import { ElPopconfirm as Oe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/popconfirm/index/index.js";
|
|
22
|
+
import { ElSkeleton as ze } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/skeleton/index/index.js";
|
|
23
|
+
const Ke = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "animate_fadeIn transition-all-300 ls-list-wrap"
|
|
26
|
-
},
|
|
26
|
+
}, He = { class: "flex items-center" }, Ie = _({
|
|
27
27
|
name: "LSList"
|
|
28
|
-
}),
|
|
29
|
-
...
|
|
30
|
-
props:
|
|
28
|
+
}), nt = /* @__PURE__ */ _({
|
|
29
|
+
...Ie,
|
|
30
|
+
props: Ce,
|
|
31
31
|
emits: ["submitForm"],
|
|
32
|
-
setup(
|
|
33
|
-
const { jumpRouteCom:
|
|
32
|
+
setup(R, { expose: $, emit: x }) {
|
|
33
|
+
const { jumpRouteCom: C, currentRouter: K } = Le(), e = R, ee = x, H = De(), I = h(), V = h(), te = v(() => Object.keys(H).filter((t) => t.toString().endsWith("-form-slot"))), le = v(() => Object.keys(H).filter((t) => t.toString().endsWith("-table-slot")));
|
|
34
34
|
function M(t, l = !1) {
|
|
35
35
|
if (t) {
|
|
36
36
|
const d = t.toString().lastIndexOf(`${l ? "-form-slot" : "-table-slot"}`);
|
|
@@ -38,55 +38,55 @@ const ze = {
|
|
|
38
38
|
}
|
|
39
39
|
return "";
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
const { isFirst: U, loading:
|
|
41
|
+
i(M, "getSlotName");
|
|
42
|
+
const { isFirst: U, loading: w, tableData: q, total: W, pageSize: y, currentPage: D, handleReset: j, loadData: g } = Se(
|
|
43
43
|
e.listApi,
|
|
44
44
|
e.formData,
|
|
45
45
|
{ dealData: e == null ? void 0 : e.dealData, dealParams: e == null ? void 0 : e.dealParams, ...e == null ? void 0 : e.listHookConfig }
|
|
46
46
|
);
|
|
47
47
|
function ae(t) {
|
|
48
|
-
ee("submitForm", t), e != null && e.queryFn ? e.queryFn(t) :
|
|
48
|
+
ee("submitForm", t), e != null && e.queryFn ? e.queryFn(t) : g();
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
function
|
|
50
|
+
i(ae, "submitForm");
|
|
51
|
+
function oe(t) {
|
|
52
52
|
console.warn("resetForm", t), j();
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
function
|
|
57
|
-
e != null && e.addFn ? e.addFn() :
|
|
54
|
+
i(oe, "resetForm");
|
|
55
|
+
const F = v(() => K ? K.value.path : "");
|
|
56
|
+
function ie() {
|
|
57
|
+
e != null && e.addFn ? e.addFn() : C(
|
|
58
58
|
{
|
|
59
|
-
path: e != null && e.addRoutePath ? e.addRoutePath : `${
|
|
59
|
+
path: e != null && e.addRoutePath ? e.addRoutePath : `${F.value}/add`
|
|
60
60
|
},
|
|
61
61
|
1
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
i(ie, "onAdd");
|
|
65
65
|
function ne(t, l) {
|
|
66
|
-
e != null && e.tableDetailFn ? e.tableDetailFn(l) :
|
|
66
|
+
e != null && e.tableDetailFn ? e.tableDetailFn(l) : C(
|
|
67
67
|
{
|
|
68
|
-
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${
|
|
68
|
+
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${F.value}/detail`}/${t}`
|
|
69
69
|
},
|
|
70
70
|
1
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
i(ne, "onDetail");
|
|
74
74
|
function se(t, l) {
|
|
75
|
-
e != null && e.tableEditFn ? e.tableEditFn(l) :
|
|
75
|
+
e != null && e.tableEditFn ? e.tableEditFn(l) : C(
|
|
76
76
|
{
|
|
77
|
-
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${
|
|
77
|
+
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${F.value}/edit`}/${t}`
|
|
78
78
|
},
|
|
79
79
|
1
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
const
|
|
82
|
+
i(se, "onEdit");
|
|
83
|
+
const A = h(void 0), p = h(!1);
|
|
84
84
|
function de(t, l) {
|
|
85
85
|
if (e.delApi) {
|
|
86
|
-
|
|
86
|
+
A.value = t, p.value = !0;
|
|
87
87
|
let d = t;
|
|
88
88
|
e != null && e.dealDelParams && (d = e.dealDelParams(l)), e.delApi(d).then(() => {
|
|
89
|
-
|
|
89
|
+
Re.success("删除成功"), g();
|
|
90
90
|
}).catch((m) => {
|
|
91
91
|
console.warn(m);
|
|
92
92
|
}).finally(() => {
|
|
@@ -94,16 +94,16 @@ const ze = {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
i(de, "onDel");
|
|
98
98
|
const G = h(), L = h(!1);
|
|
99
99
|
function re(t, l, d) {
|
|
100
100
|
G.value = t;
|
|
101
|
-
const m = /* @__PURE__ */
|
|
101
|
+
const m = /* @__PURE__ */ i((c, a) => {
|
|
102
102
|
if (e.switchApi) {
|
|
103
103
|
L.value = !0;
|
|
104
104
|
let r = t;
|
|
105
105
|
e != null && e.dealSwitchParams && (r = e.dealSwitchParams(d)), e.switchApi(r).then(() => {
|
|
106
|
-
|
|
106
|
+
g(!1), c(!0);
|
|
107
107
|
}).catch(() => {
|
|
108
108
|
a(new Error("Error"));
|
|
109
109
|
}).finally(() => {
|
|
@@ -113,7 +113,7 @@ const ze = {
|
|
|
113
113
|
a(new Error("Error"));
|
|
114
114
|
}, "onSwitch");
|
|
115
115
|
return new Promise((c, a) => {
|
|
116
|
-
l ?
|
|
116
|
+
l ? $e.confirm('<strong class="text-14px">请问是否关闭?</strong>', {
|
|
117
117
|
confirmButtonText: "确定",
|
|
118
118
|
cancelButtonText: "取消",
|
|
119
119
|
dangerouslyUseHTMLString: !0,
|
|
@@ -127,61 +127,57 @@ const ze = {
|
|
|
127
127
|
}) : m(c, a);
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
i(re, "switchBeforeChange");
|
|
131
131
|
function fe(t) {
|
|
132
132
|
let l = !1;
|
|
133
133
|
return e != null && e.disabledTableSwitch && (typeof e.disabledTableSwitch == "boolean" ? l = e.disabledTableSwitch : typeof e.disabledTableSwitch == "function" && (l = e.disabledTableSwitch(t))), !!l;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
i(fe, "disabledTableSwitch");
|
|
136
136
|
function ue(t) {
|
|
137
137
|
let l = !1;
|
|
138
138
|
return e != null && e.showTableDetail && (typeof e.showTableDetail == "boolean" ? l = e.showTableDetail : typeof e.showTableDetail == "function" && (l = e.showTableDetail(t))), !!l;
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
i(ue, "showTableDetail");
|
|
141
141
|
function be(t) {
|
|
142
142
|
let l = !1;
|
|
143
143
|
return e != null && e.disabledTableDetail && (typeof e.disabledTableDetail == "boolean" ? l = e.disabledTableDetail : typeof e.disabledTableDetail == "function" && (l = e.disabledTableDetail(t))), !!l;
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
i(be, "disabledTableDetail");
|
|
146
146
|
function me(t) {
|
|
147
147
|
let l = !1;
|
|
148
148
|
return e != null && e.showTableEdit && (typeof e.showTableEdit == "boolean" ? l = e.showTableEdit : typeof e.showTableEdit == "function" && (l = e.showTableEdit(t))), !!l;
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
i(me, "showTableEdit");
|
|
151
151
|
function ce(t) {
|
|
152
152
|
let l = !1;
|
|
153
153
|
return e != null && e.disabledTableEdit && (typeof e.disabledTableEdit == "boolean" ? l = e.disabledTableEdit : typeof e.disabledTableEdit == "function" && (l = e.disabledTableEdit(t))), !!l;
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
i(ce, "disabledTableEdit");
|
|
156
156
|
function he(t) {
|
|
157
157
|
let l = !1;
|
|
158
158
|
return e != null && e.showTableDel && (typeof e.showTableDel == "boolean" ? l = e.showTableDel : typeof e.showTableDel == "function" && (l = e.showTableDel(t))), !!l;
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
i(he, "showTableDel");
|
|
161
161
|
function pe(t) {
|
|
162
162
|
let l = !1;
|
|
163
163
|
return e != null && e.disabledTableDel && (typeof e.disabledTableDel == "boolean" ? l = e.disabledTableDel : typeof e.disabledTableDel == "function" && (l = e.disabledTableDel(t))), !!l;
|
|
164
164
|
}
|
|
165
|
-
|
|
166
|
-
const Te =
|
|
167
|
-
return
|
|
168
|
-
loadData:
|
|
165
|
+
i(pe, "disabledTableDel");
|
|
166
|
+
const Te = ge(Z, { direction: "vertical" }), we = v(() => e.showSkeleton ? !U.value : !0);
|
|
167
|
+
return $({
|
|
168
|
+
loadData: g,
|
|
169
169
|
handleReset: j,
|
|
170
170
|
isFirst: U,
|
|
171
|
-
loading:
|
|
172
|
-
currentPage:
|
|
171
|
+
loading: w,
|
|
172
|
+
currentPage: D,
|
|
173
173
|
pageSize: y,
|
|
174
174
|
total: W,
|
|
175
175
|
FormRef: I,
|
|
176
176
|
TableRef: V
|
|
177
177
|
}), (t, l) => {
|
|
178
|
-
const d =
|
|
179
|
-
return
|
|
180
|
-
|
|
181
|
-
rows: 5,
|
|
182
|
-
animated: ""
|
|
183
|
-
})) : (n(), B("div", ze, [
|
|
184
|
-
t.showForm ? (n(), f(Ce, g({
|
|
178
|
+
const d = Be, m = Oe, c = ze;
|
|
179
|
+
return o(we) ? (n(), B("div", Ke, [
|
|
180
|
+
t.showForm ? (n(), f(Fe, T({
|
|
185
181
|
key: 0,
|
|
186
182
|
ref_key: "FormRef",
|
|
187
183
|
ref: I,
|
|
@@ -192,18 +188,18 @@ const ze = {
|
|
|
192
188
|
inline: !0,
|
|
193
189
|
"form-data": t.formData,
|
|
194
190
|
"form-items": t.formItems,
|
|
195
|
-
loading:
|
|
191
|
+
loading: o(w),
|
|
196
192
|
"confirm-text": "查询"
|
|
197
193
|
}, t.formAttrs, {
|
|
198
194
|
onSubmit: ae,
|
|
199
|
-
onReset:
|
|
195
|
+
onReset: oe
|
|
200
196
|
}), J({
|
|
201
197
|
default: s((a) => [
|
|
202
198
|
u(t.$slots, "form-append", O(z(a)), void 0, !0)
|
|
203
199
|
]),
|
|
204
200
|
_: 2
|
|
205
201
|
}, [
|
|
206
|
-
N(
|
|
202
|
+
N(o(te), (a) => ({
|
|
207
203
|
name: M(a, !0),
|
|
208
204
|
fn: s((r) => [
|
|
209
205
|
u(t.$slots, a, O(z(r)), void 0, !0)
|
|
@@ -212,22 +208,22 @@ const ze = {
|
|
|
212
208
|
]), 1040, ["class", "form-data", "form-items", "loading"])) : b("", !0),
|
|
213
209
|
t.showOperate ? (n(), B(Q, { key: 1 }, [
|
|
214
210
|
t.$slots.operate ? u(t.$slots, "operate", { key: 0 }, void 0, !0) : (n(), B(Q, { key: 1 }, [
|
|
215
|
-
t.showOperateDivider ? (n(), f(
|
|
211
|
+
t.showOperateDivider ? (n(), f(o(Z), {
|
|
216
212
|
key: 0,
|
|
217
213
|
"border-style": "dashed"
|
|
218
214
|
})) : b("", !0),
|
|
219
215
|
X("div", {
|
|
220
|
-
class:
|
|
216
|
+
class: ve(["mt-24px flex items-center justify-start", t.operateClass])
|
|
221
217
|
}, [
|
|
222
218
|
u(t.$slots, "operate-prepend", {}, void 0, !0),
|
|
223
|
-
t.showAdd ? (n(), f(
|
|
219
|
+
t.showAdd ? (n(), f(o(P), {
|
|
224
220
|
key: 0,
|
|
225
221
|
type: "primary",
|
|
226
|
-
disabled:
|
|
227
|
-
onClick:
|
|
222
|
+
disabled: o(w) || t.disabledAddBtn,
|
|
223
|
+
onClick: ie
|
|
228
224
|
}, {
|
|
229
225
|
default: s(() => [
|
|
230
|
-
|
|
226
|
+
k(S(t.addBtnText), 1)
|
|
231
227
|
]),
|
|
232
228
|
_: 1
|
|
233
229
|
}, 8, ["disabled"])) : b("", !0),
|
|
@@ -235,41 +231,41 @@ const ze = {
|
|
|
235
231
|
], 2)
|
|
236
232
|
], 64))
|
|
237
233
|
], 64)) : b("", !0),
|
|
238
|
-
E(
|
|
234
|
+
E(Ae, T({
|
|
239
235
|
ref_key: "TableRef",
|
|
240
236
|
ref: V,
|
|
241
237
|
class: ["ls-table-cpo", [t.showOperate ? "mt-16px" : "mt-24px"]],
|
|
242
238
|
"show-overflow-tooltip": !0,
|
|
243
|
-
loading:
|
|
244
|
-
total:
|
|
245
|
-
"table-data":
|
|
239
|
+
loading: o(w),
|
|
240
|
+
total: o(W),
|
|
241
|
+
"table-data": o(q),
|
|
246
242
|
"table-column": t.tableColumn,
|
|
247
|
-
"current-page":
|
|
248
|
-
"onUpdate:currentPage": l[0] || (l[0] = (a) => Y(
|
|
249
|
-
"page-size":
|
|
243
|
+
"current-page": o(D),
|
|
244
|
+
"onUpdate:currentPage": l[0] || (l[0] = (a) => Y(D) ? D.value = a : null),
|
|
245
|
+
"page-size": o(y),
|
|
250
246
|
"onUpdate:pageSize": l[1] || (l[1] = (a) => Y(y) ? y.value = a : null)
|
|
251
|
-
}, t.tableAttrs,
|
|
247
|
+
}, t.tableAttrs, ke(t.tableListeners || {})), J({
|
|
252
248
|
default: s(() => [
|
|
253
|
-
t.showTableSwitch ? (n(), f(d,
|
|
249
|
+
t.showTableSwitch ? (n(), f(d, T({
|
|
254
250
|
key: 0,
|
|
255
251
|
prop: t.switchProp,
|
|
256
252
|
label: "是否开启",
|
|
257
253
|
width: "100"
|
|
258
254
|
}, t.tableSwitchColumn), {
|
|
259
255
|
default: s(({ row: a }) => [
|
|
260
|
-
E(
|
|
256
|
+
E(o(Ee), {
|
|
261
257
|
class: "ls-list-table__switch",
|
|
262
258
|
"model-value": a[t.switchProp] ? 1 : 0,
|
|
263
259
|
"active-value": 1,
|
|
264
260
|
"inactive-value": 0,
|
|
265
|
-
loading:
|
|
266
|
-
"before-change": /* @__PURE__ */
|
|
261
|
+
loading: o(L) && a[t.tableRowKey] === o(G),
|
|
262
|
+
"before-change": /* @__PURE__ */ i(() => re(a[t.tableRowKey], a[t.switchProp], a), "before-change"),
|
|
267
263
|
disabled: fe(a)
|
|
268
264
|
}, null, 8, ["model-value", "loading", "before-change", "disabled"])
|
|
269
265
|
]),
|
|
270
266
|
_: 1
|
|
271
267
|
}, 16, ["prop"])) : b("", !0),
|
|
272
|
-
t.showTableOperate ? (n(), f(d,
|
|
268
|
+
t.showTableOperate ? (n(), f(d, T({
|
|
273
269
|
key: 1,
|
|
274
270
|
fixed: "right",
|
|
275
271
|
prop: "operate",
|
|
@@ -277,34 +273,34 @@ const ze = {
|
|
|
277
273
|
"show-overflow-tooltip": !1
|
|
278
274
|
}, t.tableOperateColumn), {
|
|
279
275
|
default: s(({ row: a }) => [
|
|
280
|
-
X("div",
|
|
281
|
-
E(
|
|
276
|
+
X("div", He, [
|
|
277
|
+
E(o(Pe), {
|
|
282
278
|
size: 0,
|
|
283
|
-
spacer:
|
|
279
|
+
spacer: o(Te)
|
|
284
280
|
}, {
|
|
285
281
|
default: s(() => [
|
|
286
282
|
u(t.$slots, "table-operate-prepend", { row: a }, void 0, !0),
|
|
287
|
-
ue(a) ? (n(), f(
|
|
283
|
+
ue(a) ? (n(), f(o(P), {
|
|
288
284
|
key: 0,
|
|
289
285
|
disabled: be(a),
|
|
290
286
|
link: "",
|
|
291
287
|
type: "primary",
|
|
292
|
-
onClick: /* @__PURE__ */
|
|
288
|
+
onClick: /* @__PURE__ */ i((r) => ne(a[t.tableRowKey], a), "onClick")
|
|
293
289
|
}, {
|
|
294
290
|
default: s(() => [
|
|
295
|
-
|
|
291
|
+
k(S(t.tableDetailText || "查看"), 1)
|
|
296
292
|
]),
|
|
297
293
|
_: 2
|
|
298
294
|
}, 1032, ["disabled", "onClick"])) : b("", !0),
|
|
299
|
-
me(a) ? (n(), f(
|
|
295
|
+
me(a) ? (n(), f(o(P), {
|
|
300
296
|
key: 1,
|
|
301
297
|
disabled: ce(a),
|
|
302
298
|
link: "",
|
|
303
299
|
type: "primary",
|
|
304
|
-
onClick: /* @__PURE__ */
|
|
300
|
+
onClick: /* @__PURE__ */ i((r) => se(a[t.tableRowKey], a), "onClick")
|
|
305
301
|
}, {
|
|
306
302
|
default: s(() => [
|
|
307
|
-
|
|
303
|
+
k(S(t.tableEditText || "编辑"), 1)
|
|
308
304
|
]),
|
|
309
305
|
_: 2
|
|
310
306
|
}, 1032, ["disabled", "onClick"])) : b("", !0),
|
|
@@ -315,24 +311,24 @@ const ze = {
|
|
|
315
311
|
width: "180",
|
|
316
312
|
"confirm-button-text": "确认",
|
|
317
313
|
"cancel-button-text": "取消",
|
|
318
|
-
title: "
|
|
319
|
-
onConfirm: /* @__PURE__ */
|
|
314
|
+
title: `是否${t.tableDelText || "删除"}当前列数据?`,
|
|
315
|
+
onConfirm: /* @__PURE__ */ i((r) => de(a[t.tableRowKey], a), "onConfirm")
|
|
320
316
|
}, {
|
|
321
317
|
reference: s(() => [
|
|
322
|
-
E(
|
|
318
|
+
E(o(P), {
|
|
323
319
|
link: "",
|
|
324
320
|
type: "danger",
|
|
325
|
-
disabled:
|
|
326
|
-
loading:
|
|
321
|
+
disabled: o(p) || pe(a),
|
|
322
|
+
loading: o(p) && o(A) === a[t.tableRowKey]
|
|
327
323
|
}, {
|
|
328
324
|
default: s(() => [
|
|
329
|
-
|
|
325
|
+
k(S(o(p) && o(A) === a[t.tableRowKey] ? "" : t.tableDelText || "删除"), 1)
|
|
330
326
|
]),
|
|
331
327
|
_: 2
|
|
332
328
|
}, 1032, ["disabled", "loading"])
|
|
333
329
|
]),
|
|
334
330
|
_: 2
|
|
335
|
-
}, 1032, ["onConfirm"])) : b("", !0),
|
|
331
|
+
}, 1032, ["title", "onConfirm"])) : b("", !0),
|
|
336
332
|
u(t.$slots, "table-operate-append", { row: a }, void 0, !0)
|
|
337
333
|
]),
|
|
338
334
|
_: 2
|
|
@@ -341,21 +337,25 @@ const ze = {
|
|
|
341
337
|
]),
|
|
342
338
|
_: 3
|
|
343
339
|
}, 16)) : b("", !0),
|
|
344
|
-
u(t.$slots, "table-append", { tableData:
|
|
340
|
+
u(t.$slots, "table-append", { tableData: o(q) }, void 0, !0)
|
|
345
341
|
]),
|
|
346
342
|
_: 2
|
|
347
343
|
}, [
|
|
348
|
-
N(
|
|
344
|
+
N(o(le), (a) => ({
|
|
349
345
|
name: M(a, !1),
|
|
350
346
|
fn: s((r) => [
|
|
351
347
|
u(t.$slots, a, O(z(r)), void 0, !0)
|
|
352
348
|
])
|
|
353
349
|
}))
|
|
354
350
|
]), 1040, ["class", "loading", "total", "table-data", "table-column", "current-page", "page-size"])
|
|
355
|
-
]))
|
|
351
|
+
])) : (n(), f(c, T({
|
|
352
|
+
key: 1,
|
|
353
|
+
rows: 5,
|
|
354
|
+
animated: ""
|
|
355
|
+
}, t.skeletonAttrs), null, 16));
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
});
|
|
359
359
|
export {
|
|
360
|
-
|
|
360
|
+
nt as default
|
|
361
361
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var t=(e,a)=>l(e,"name",{value:a,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../_utils/runtime/index.cjs"),n=o.buildProps({listApi:{type:Function},dealParams:{type:Function},dealData:{type:Function},listHookConfig:{type:Object},delApi:{type:Function},dealDelParams:{type:Function},switchApi:{type:Function},dealSwitchParams:{type:Function},showForm:{type:Boolean,default:!0},formClass:{type:String,default:""},formData:{type:Object,default:t(()=>({}),"default")},formItems:{type:Array,default:t(()=>[],"default")},formAttrs:{type:Object,default:t(()=>{},"default")},queryFn:{type:Function},tableColumn:{type:Array,default:t(()=>[],"default")},tableRowKey:{type:String,default:"id"},tableAttrs:{type:Object,default:t(()=>{},"default")},tableListeners:{type:Object,default:t(()=>{},"default")},showOperate:{type:Boolean,default:!0},showOperateDivider:{type:Boolean,default:!0},operateClass:{type:String,default:""},showAdd:{type:Boolean,default:!0},disabledAddBtn:{type:Boolean,default:!1},addBtnText:{type:String,default:"添加"},addFn:{type:Function},showTableSwitch:{type:Boolean,default:!1},switchProp:{type:String,default:"status"},tableSwitchColumn:{type:Object,default:t(()=>{},"default")},disabledTableSwitch:{type:[Boolean,Function],default:!1},showTableOperate:{type:Boolean,default:!0},tableOperateColumn:{type:Object,default:t(()=>{},"default")},tableDetailFn:{type:Function},tableEditFn:{type:Function},showTableDetail:{type:[Boolean,Function],default:!0},disabledTableDetail:{type:[Boolean,Function],default:!1},showTableEdit:{type:[Boolean,Function],default:!0},disabledTableEdit:{type:[Boolean,Function],default:!1},showTableDel:{type:[Boolean,Function],default:!0},disabledTableDel:{type:[Boolean,Function],default:!1},addRoutePath:{type:String,default:""},detailRoutePath:{type:String,default:""},editRoutePath:{type:String,default:""},tableDetailText:{type:String,default:"查看"},tableEditText:{type:String,default:"编辑"},tableDelText:{type:String,default:"删除"}});exports.lsListProps=n;
|
|
1
|
+
"use strict";var l=Object.defineProperty;var t=(e,a)=>l(e,"name",{value:a,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../_utils/runtime/index.cjs"),n=o.buildProps({listApi:{type:Function},dealParams:{type:Function},dealData:{type:Function},listHookConfig:{type:Object},delApi:{type:Function},dealDelParams:{type:Function},switchApi:{type:Function},dealSwitchParams:{type:Function},showForm:{type:Boolean,default:!0},formClass:{type:String,default:""},formData:{type:Object,default:t(()=>({}),"default")},formItems:{type:Array,default:t(()=>[],"default")},formAttrs:{type:Object,default:t(()=>{},"default")},queryFn:{type:Function},tableColumn:{type:Array,default:t(()=>[],"default")},tableRowKey:{type:String,default:"id"},tableAttrs:{type:Object,default:t(()=>{},"default")},tableListeners:{type:Object,default:t(()=>{},"default")},showOperate:{type:Boolean,default:!0},showOperateDivider:{type:Boolean,default:!0},operateClass:{type:String,default:""},showAdd:{type:Boolean,default:!0},disabledAddBtn:{type:Boolean,default:!1},addBtnText:{type:String,default:"添加"},addFn:{type:Function},showTableSwitch:{type:Boolean,default:!1},switchProp:{type:String,default:"status"},tableSwitchColumn:{type:Object,default:t(()=>{},"default")},disabledTableSwitch:{type:[Boolean,Function],default:!1},showTableOperate:{type:Boolean,default:!0},tableOperateColumn:{type:Object,default:t(()=>{},"default")},tableDetailFn:{type:Function},tableEditFn:{type:Function},showTableDetail:{type:[Boolean,Function],default:!0},disabledTableDetail:{type:[Boolean,Function],default:!1},showTableEdit:{type:[Boolean,Function],default:!0},disabledTableEdit:{type:[Boolean,Function],default:!1},showTableDel:{type:[Boolean,Function],default:!0},disabledTableDel:{type:[Boolean,Function],default:!1},addRoutePath:{type:String,default:""},detailRoutePath:{type:String,default:""},editRoutePath:{type:String,default:""},tableDetailText:{type:String,default:"查看"},tableEditText:{type:String,default:"编辑"},tableDelText:{type:String,default:"删除"},skeletonAttrs:{type:Object,default:t(()=>{},"default")},showSkeleton:{type:Boolean,default:!0}});exports.lsListProps=n;
|
|
@@ -218,6 +218,17 @@ const d = o({
|
|
|
218
218
|
tableDelText: {
|
|
219
219
|
type: String,
|
|
220
220
|
default: "删除"
|
|
221
|
+
},
|
|
222
|
+
// 表格骨架屏配置
|
|
223
|
+
skeletonAttrs: {
|
|
224
|
+
type: Object,
|
|
225
|
+
default: /* @__PURE__ */ t(() => {
|
|
226
|
+
}, "default")
|
|
227
|
+
},
|
|
228
|
+
// 表格骨架屏是否展示
|
|
229
|
+
showSkeleton: {
|
|
230
|
+
type: Boolean,
|
|
231
|
+
default: !0
|
|
221
232
|
}
|
|
222
233
|
});
|
|
223
234
|
export {
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-c9fb78d8"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c9fb78d8"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|