@lingshugroup/web-plus 1.0.29 → 1.0.30
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 +3 -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 +72 -67
- 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/button/Button.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index.js +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +2 -2
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +105 -91
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index2.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 +98 -99
- 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 +133 -127
- 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/table/Table.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index.js +2 -2
- package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index2.js +145 -136
- 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/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +1 -1
- 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
|
@@ -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:""},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:""}});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-191876bf"]]);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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-191876bf"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Q=Object.defineProperty;var i=(p,w)=>Q(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"),X=,/* empty css */r=require("element-plus"),Y=,/* empty css */Z=,/* empty css */_=,/* empty css */ee=,/* empty css */te=,/* empty css */le=,/* empty css */ae=,/* empty css */oe={key:0,class:"animate_fadeIn transition-all-300 ls-list-wrap"},ie={class:"flex items-center"},ne=e.defineComponent({name:"LSList"}),re=e.defineComponent({...ne,props:Y.lsListProps,emits:["submitForm"],setup(p,{expose:w,emit:$}){const{jumpRouteCom:T,currentRouter:D}=ee.default(),t=p,q=$,S=e.useSlots(),V=e.computed(()=>Object.keys(S).filter(l=>l.toString().endsWith("-form-slot"))),F=e.computed(()=>Object.keys(S).filter(l=>l.toString().endsWith("-table-slot")));function v(l,a=!1){if(l){const n=l.toString().lastIndexOf(`${a?"-form-slot":"-table-slot"}`);return n!==-1?l.toString().slice(0,n):l}return""}i(v,"getSlotName");const{isFirst:C,loading:c,tableData:E,total:B,pageSize:b,currentPage:m,handleReset:P,loadData:h}=X.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 N(l){q("submitForm",l),t!=null&&t.queryFn?t.queryFn(l):h()}i(N,"submitForm");function A(l){console.warn("resetForm",l),P()}i(A,"resetForm");const y=e.computed(()=>D?D.value.path:"");function L(){t!=null&&t.addFn?t.addFn():T({path:t!=null&&t.addRoutePath?t.addRoutePath:`${y.value}/add`},1)}i(L,"onAdd");function z(l,a){t!=null&&t.tableDetailFn?t.tableDetailFn(a):T({path:`${t!=null&&t.detailRoutePath?t.detailRoutePath:`${y.value}/detail`}/${l}`},1)}i(z,"onDetail");function O(l,a){t!=null&&t.tableEditFn?t.tableEditFn(a):T({path:`${t!=null&&t.editRoutePath?t.editRoutePath:`${y.value}/edit`}/${l}`},1)}i(O,"onEdit");const g=e.ref(void 0),f=e.ref(!1);function K(l,a){if(t.delApi){g.value=l,f.value=!0;let n=l;t!=null&&t.dealDelParams&&(n=t.dealDelParams(a)),t.delApi(n).then(()=>{r.ElMessage.success("删除成功"),h()}).catch(d=>{console.warn(d)}).finally(()=>{f.value=!1})}}i(K,"onDel");const R=e.ref(),k=e.ref(!1);function H(l,a,n){R.value=l;const d=i((u,o)=>{if(t.switchApi){k.value=!0;let s=l;t!=null&&t.dealSwitchParams&&(s=t.dealSwitchParams(n)),t.switchApi(s).then(()=>{h(!1),u(!0)}).catch(()=>{o(new Error("Error"))}).finally(()=>{k.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)})}i(H,"switchBeforeChange");function I(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}i(I,"disabledTableSwitch");function M(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}i(M,"showTableDetail");function U(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}i(U,"disabledTableDetail");function j(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}i(j,"showTableEdit");function W(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}i(W,"disabledTableEdit");function x(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}i(x,"showTableDel");function G(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}i(G,"disabledTableDel");const J=e.h(r.ElDivider,{direction:"vertical"});return w({loadData:h,handleReset:P,isFirst:C,loading:c,currentPage:m,pageSize:b,total:B}),(l,a)=>{const n=te.ElTableColumn,d=le.ElPopconfirm,u=ae.ElSkeleton;return e.unref(C)?(e.openBlock(),e.createBlock(u,{key:1,rows:5,animated:""})):(e.openBlock(),e.createElementBlock("div",oe,[l.showForm?(e.openBlock(),e.createBlock(Z.default,e.mergeProps({key:0,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:N,onReset:A}),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(V),o=>({name:v(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:L},{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(_.default,e.mergeProps({class:["ls-table-cpo",[l.showOperate?"mt-16px":"mt-24px"]],"show-overflow-tooltip":!0,loading:e.unref(c),total:e.unref(B),"table-data":e.unref(E),"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(n,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(k)&&o[l.tableRowKey]===e.unref(R),"before-change":i(()=>H(o[l.tableRowKey],o[l.switchProp],o),"before-change"),disabled:I(o)},null,8,["model-value","loading","before-change","disabled"])]),_:1},16,["prop"])):e.createCommentVNode("",!0),l.showTableOperate?(e.openBlock(),e.createBlock(n,e.mergeProps({key:1,fixed:"right",prop:"operate",label:"操作","show-overflow-tooltip":!1},l.tableOperateColumn),{default:e.withCtx(({row:o})=>[e.createElementVNode("div",ie,[e.createVNode(e.unref(r.ElSpace),{size:0,spacer:e.unref(J)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"table-operate-prepend",{row:o},void 0,!0),M(o)?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:0,disabled:U(o),link:"",type:"primary",onClick:i(s=>z(o[l.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.tableDetailText||"查看"),1)]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),j(o)?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:1,disabled:W(o),link:"",type:"primary",onClick:i(s=>O(o[l.tableRowKey],o),"onClick")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.tableEditText||"编辑"),1)]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),x(o)?(e.openBlock(),e.createBlock(d,{key:2,"hide-icon":"",placement:"top",width:"180","confirm-button-text":"确认","cancel-button-text":"取消",title:"是否删除当前列数据?",onConfirm:i(s=>K(o[l.tableRowKey],o),"onConfirm")},{reference:e.withCtx(()=>[e.createVNode(e.unref(r.ElButton),{link:"",type:"danger",disabled:e.unref(f)||G(o),loading:e.unref(f)&&e.unref(g)===o[l.tableRowKey]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)&&e.unref(g)===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(E)},void 0,!0)]),_:2},[e.renderList(e.unref(F),o=>({name:v(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=re;
|
|
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,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var o = (P,
|
|
1
|
+
var ye = Object.defineProperty;
|
|
2
|
+
var o = (P, R) => ye(P, "name", { value: R, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
@@ -10,100 +10,100 @@ var o = (P, $) => pe(P, "name", { value: $, configurable: !0 });
|
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { defineComponent as
|
|
14
|
-
import
|
|
15
|
-
import { ElDivider as
|
|
16
|
-
import { lsListProps as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { ElTableColumn as
|
|
21
|
-
import { ElPopconfirm as
|
|
22
|
-
import { ElSkeleton as
|
|
23
|
-
const
|
|
13
|
+
import { defineComponent as _, useSlots as we, ref as h, computed as A, h as De, unref as i, openBlock as n, createElementBlock as B, createBlock as f, mergeProps as g, 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 ge, createTextVNode as v, toDisplayString as k, createVNode as E, isRef as Y, toHandlers as ve } from "vue";
|
|
14
|
+
import ke from "../../_hooks/useTableListHook/index.js";
|
|
15
|
+
import { ElDivider as Z, ElButton as S, ElSwitch as Ee, ElSpace as Se, ElMessage as Pe, ElMessageBox as Re } from "element-plus";
|
|
16
|
+
import { lsListProps as $e } from "../types/index.js";
|
|
17
|
+
import Ce from "../../form/Form.vue/index.js";
|
|
18
|
+
import Fe from "../../table/Table.vue/index.js";
|
|
19
|
+
import Le from "../../_hooks/useRouterHook/index.js";
|
|
20
|
+
import { ElTableColumn as Ae } 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 Be } 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 Oe } 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 ze = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "animate_fadeIn transition-all-300 ls-list-wrap"
|
|
26
|
-
},
|
|
26
|
+
}, Ke = { class: "flex items-center" }, He = _({
|
|
27
27
|
name: "LSList"
|
|
28
|
-
}),
|
|
29
|
-
...
|
|
30
|
-
props:
|
|
28
|
+
}), ot = /* @__PURE__ */ _({
|
|
29
|
+
...He,
|
|
30
|
+
props: $e,
|
|
31
31
|
emits: ["submitForm"],
|
|
32
|
-
setup(P, { expose:
|
|
33
|
-
const { jumpRouteCom:
|
|
34
|
-
function
|
|
32
|
+
setup(P, { expose: R, emit: x }) {
|
|
33
|
+
const { jumpRouteCom: $, currentRouter: K } = Le(), e = P, ee = x, H = we(), I = h(), V = h(), te = A(() => Object.keys(H).filter((t) => t.toString().endsWith("-form-slot"))), le = A(() => Object.keys(H).filter((t) => t.toString().endsWith("-table-slot")));
|
|
34
|
+
function M(t, l = !1) {
|
|
35
35
|
if (t) {
|
|
36
36
|
const d = t.toString().lastIndexOf(`${l ? "-form-slot" : "-table-slot"}`);
|
|
37
37
|
return d !== -1 ? t.toString().slice(0, d) : t;
|
|
38
38
|
}
|
|
39
39
|
return "";
|
|
40
40
|
}
|
|
41
|
-
o(
|
|
42
|
-
const { isFirst:
|
|
41
|
+
o(M, "getSlotName");
|
|
42
|
+
const { isFirst: U, loading: T, tableData: q, total: W, pageSize: y, currentPage: w, handleReset: j, loadData: D } = ke(
|
|
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
|
-
function
|
|
48
|
-
|
|
47
|
+
function ae(t) {
|
|
48
|
+
ee("submitForm", t), e != null && e.queryFn ? e.queryFn(t) : D();
|
|
49
49
|
}
|
|
50
|
-
o(
|
|
51
|
-
function
|
|
52
|
-
console.warn("resetForm", t),
|
|
50
|
+
o(ae, "submitForm");
|
|
51
|
+
function ie(t) {
|
|
52
|
+
console.warn("resetForm", t), j();
|
|
53
53
|
}
|
|
54
|
-
o(
|
|
55
|
-
const
|
|
56
|
-
function
|
|
57
|
-
e != null && e.addFn ? e.addFn() :
|
|
54
|
+
o(ie, "resetForm");
|
|
55
|
+
const C = A(() => K ? K.value.path : "");
|
|
56
|
+
function oe() {
|
|
57
|
+
e != null && e.addFn ? e.addFn() : $(
|
|
58
58
|
{
|
|
59
|
-
path: e != null && e.addRoutePath ? e.addRoutePath : `${
|
|
59
|
+
path: e != null && e.addRoutePath ? e.addRoutePath : `${C.value}/add`
|
|
60
60
|
},
|
|
61
61
|
1
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
-
o(
|
|
65
|
-
function
|
|
66
|
-
e != null && e.tableDetailFn ? e.tableDetailFn(l) :
|
|
64
|
+
o(oe, "onAdd");
|
|
65
|
+
function ne(t, l) {
|
|
66
|
+
e != null && e.tableDetailFn ? e.tableDetailFn(l) : $(
|
|
67
67
|
{
|
|
68
|
-
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${
|
|
68
|
+
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${C.value}/detail`}/${t}`
|
|
69
69
|
},
|
|
70
70
|
1
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
|
-
o(
|
|
74
|
-
function
|
|
75
|
-
e != null && e.tableEditFn ? e.tableEditFn(l) :
|
|
73
|
+
o(ne, "onDetail");
|
|
74
|
+
function se(t, l) {
|
|
75
|
+
e != null && e.tableEditFn ? e.tableEditFn(l) : $(
|
|
76
76
|
{
|
|
77
|
-
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${
|
|
77
|
+
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${C.value}/edit`}/${t}`
|
|
78
78
|
},
|
|
79
79
|
1
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
o(
|
|
83
|
-
const F =
|
|
84
|
-
function
|
|
82
|
+
o(se, "onEdit");
|
|
83
|
+
const F = h(void 0), p = h(!1);
|
|
84
|
+
function de(t, l) {
|
|
85
85
|
if (e.delApi) {
|
|
86
|
-
F.value = t,
|
|
86
|
+
F.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
|
+
Pe.success("删除成功"), D();
|
|
90
90
|
}).catch((m) => {
|
|
91
91
|
console.warn(m);
|
|
92
92
|
}).finally(() => {
|
|
93
|
-
|
|
93
|
+
p.value = !1;
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
o(
|
|
98
|
-
const
|
|
99
|
-
function
|
|
100
|
-
|
|
97
|
+
o(de, "onDel");
|
|
98
|
+
const G = h(), L = h(!1);
|
|
99
|
+
function re(t, l, d) {
|
|
100
|
+
G.value = t;
|
|
101
101
|
const m = /* @__PURE__ */ o((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
|
+
D(!1), c(!0);
|
|
107
107
|
}).catch(() => {
|
|
108
108
|
a(new Error("Error"));
|
|
109
109
|
}).finally(() => {
|
|
@@ -113,7 +113,7 @@ const Be = {
|
|
|
113
113
|
a(new Error("Error"));
|
|
114
114
|
}, "onSwitch");
|
|
115
115
|
return new Promise((c, a) => {
|
|
116
|
-
l ?
|
|
116
|
+
l ? Re.confirm('<strong class="text-14px">请问是否关闭?</strong>', {
|
|
117
117
|
confirmButtonText: "确定",
|
|
118
118
|
cancelButtonText: "取消",
|
|
119
119
|
dangerouslyUseHTMLString: !0,
|
|
@@ -127,60 +127,64 @@ const Be = {
|
|
|
127
127
|
}) : m(c, a);
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
o(
|
|
131
|
-
function
|
|
130
|
+
o(re, "switchBeforeChange");
|
|
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
|
-
o(
|
|
136
|
-
function
|
|
135
|
+
o(fe, "disabledTableSwitch");
|
|
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
|
-
o(
|
|
141
|
-
function
|
|
140
|
+
o(ue, "showTableDetail");
|
|
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
|
-
o(
|
|
146
|
-
function
|
|
145
|
+
o(be, "disabledTableDetail");
|
|
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
|
-
o(
|
|
151
|
-
function
|
|
150
|
+
o(me, "showTableEdit");
|
|
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
|
-
o(
|
|
156
|
-
function
|
|
155
|
+
o(ce, "disabledTableEdit");
|
|
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
|
-
o(
|
|
161
|
-
function
|
|
160
|
+
o(he, "showTableDel");
|
|
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
|
-
o(
|
|
166
|
-
const
|
|
167
|
-
return
|
|
168
|
-
loadData:
|
|
169
|
-
handleReset:
|
|
170
|
-
isFirst:
|
|
171
|
-
loading:
|
|
165
|
+
o(pe, "disabledTableDel");
|
|
166
|
+
const Te = De(Z, { direction: "vertical" });
|
|
167
|
+
return R({
|
|
168
|
+
loadData: D,
|
|
169
|
+
handleReset: j,
|
|
170
|
+
isFirst: U,
|
|
171
|
+
loading: T,
|
|
172
172
|
currentPage: w,
|
|
173
|
-
pageSize:
|
|
174
|
-
total:
|
|
173
|
+
pageSize: y,
|
|
174
|
+
total: W,
|
|
175
|
+
FormRef: I,
|
|
176
|
+
TableRef: V
|
|
175
177
|
}), (t, l) => {
|
|
176
|
-
const d =
|
|
177
|
-
return i(
|
|
178
|
+
const d = Ae, m = Be, c = Oe;
|
|
179
|
+
return i(U) ? (n(), f(c, {
|
|
178
180
|
key: 1,
|
|
179
181
|
rows: 5,
|
|
180
182
|
animated: ""
|
|
181
|
-
})) : (n(), B("div",
|
|
182
|
-
t.showForm ? (n(), f(
|
|
183
|
+
})) : (n(), B("div", ze, [
|
|
184
|
+
t.showForm ? (n(), f(Ce, g({
|
|
183
185
|
key: 0,
|
|
186
|
+
ref_key: "FormRef",
|
|
187
|
+
ref: I,
|
|
184
188
|
class: ["mb-6px ls-form-cpo", t.formClass],
|
|
185
189
|
"label-position": "top",
|
|
186
190
|
"show-btn-loading": !1,
|
|
@@ -188,42 +192,42 @@ const Be = {
|
|
|
188
192
|
inline: !0,
|
|
189
193
|
"form-data": t.formData,
|
|
190
194
|
"form-items": t.formItems,
|
|
191
|
-
loading: i(
|
|
195
|
+
loading: i(T),
|
|
192
196
|
"confirm-text": "查询"
|
|
193
197
|
}, t.formAttrs, {
|
|
194
|
-
onSubmit:
|
|
195
|
-
onReset:
|
|
196
|
-
}),
|
|
198
|
+
onSubmit: ae,
|
|
199
|
+
onReset: ie
|
|
200
|
+
}), J({
|
|
197
201
|
default: s((a) => [
|
|
198
202
|
u(t.$slots, "form-append", O(z(a)), void 0, !0)
|
|
199
203
|
]),
|
|
200
204
|
_: 2
|
|
201
205
|
}, [
|
|
202
|
-
|
|
203
|
-
name:
|
|
206
|
+
N(i(te), (a) => ({
|
|
207
|
+
name: M(a, !0),
|
|
204
208
|
fn: s((r) => [
|
|
205
209
|
u(t.$slots, a, O(z(r)), void 0, !0)
|
|
206
210
|
])
|
|
207
211
|
}))
|
|
208
212
|
]), 1040, ["class", "form-data", "form-items", "loading"])) : b("", !0),
|
|
209
|
-
t.showOperate ? (n(), B(
|
|
210
|
-
t.$slots.operate ? u(t.$slots, "operate", { key: 0 }, void 0, !0) : (n(), B(
|
|
211
|
-
t.showOperateDivider ? (n(), f(i(
|
|
213
|
+
t.showOperate ? (n(), B(Q, { key: 1 }, [
|
|
214
|
+
t.$slots.operate ? u(t.$slots, "operate", { key: 0 }, void 0, !0) : (n(), B(Q, { key: 1 }, [
|
|
215
|
+
t.showOperateDivider ? (n(), f(i(Z), {
|
|
212
216
|
key: 0,
|
|
213
217
|
"border-style": "dashed"
|
|
214
218
|
})) : b("", !0),
|
|
215
|
-
|
|
216
|
-
class:
|
|
219
|
+
X("div", {
|
|
220
|
+
class: ge(["mt-24px flex items-center justify-start", t.operateClass])
|
|
217
221
|
}, [
|
|
218
222
|
u(t.$slots, "operate-prepend", {}, void 0, !0),
|
|
219
|
-
t.showAdd ? (n(), f(i(
|
|
223
|
+
t.showAdd ? (n(), f(i(S), {
|
|
220
224
|
key: 0,
|
|
221
225
|
type: "primary",
|
|
222
|
-
disabled: i(
|
|
223
|
-
onClick:
|
|
226
|
+
disabled: i(T) || t.disabledAddBtn,
|
|
227
|
+
onClick: oe
|
|
224
228
|
}, {
|
|
225
229
|
default: s(() => [
|
|
226
|
-
v(
|
|
230
|
+
v(k(t.addBtnText), 1)
|
|
227
231
|
]),
|
|
228
232
|
_: 1
|
|
229
233
|
}, 8, ["disabled"])) : b("", !0),
|
|
@@ -231,18 +235,20 @@ const Be = {
|
|
|
231
235
|
], 2)
|
|
232
236
|
], 64))
|
|
233
237
|
], 64)) : b("", !0),
|
|
234
|
-
|
|
238
|
+
E(Fe, g({
|
|
239
|
+
ref_key: "TableRef",
|
|
240
|
+
ref: V,
|
|
235
241
|
class: ["ls-table-cpo", [t.showOperate ? "mt-16px" : "mt-24px"]],
|
|
236
242
|
"show-overflow-tooltip": !0,
|
|
237
|
-
loading: i(
|
|
238
|
-
total: i(
|
|
239
|
-
"table-data": i(
|
|
243
|
+
loading: i(T),
|
|
244
|
+
total: i(W),
|
|
245
|
+
"table-data": i(q),
|
|
240
246
|
"table-column": t.tableColumn,
|
|
241
247
|
"current-page": i(w),
|
|
242
|
-
"onUpdate:currentPage": l[0] || (l[0] = (a) =>
|
|
243
|
-
"page-size": i(
|
|
244
|
-
"onUpdate:pageSize": l[1] || (l[1] = (a) =>
|
|
245
|
-
}, t.tableAttrs,
|
|
248
|
+
"onUpdate:currentPage": l[0] || (l[0] = (a) => Y(w) ? w.value = a : null),
|
|
249
|
+
"page-size": i(y),
|
|
250
|
+
"onUpdate:pageSize": l[1] || (l[1] = (a) => Y(y) ? y.value = a : null)
|
|
251
|
+
}, t.tableAttrs, ve(t.tableListeners || {})), J({
|
|
246
252
|
default: s(() => [
|
|
247
253
|
t.showTableSwitch ? (n(), f(d, g({
|
|
248
254
|
key: 0,
|
|
@@ -251,14 +257,14 @@ const Be = {
|
|
|
251
257
|
width: "100"
|
|
252
258
|
}, t.tableSwitchColumn), {
|
|
253
259
|
default: s(({ row: a }) => [
|
|
254
|
-
|
|
260
|
+
E(i(Ee), {
|
|
255
261
|
class: "ls-list-table__switch",
|
|
256
262
|
"model-value": a[t.switchProp] ? 1 : 0,
|
|
257
263
|
"active-value": 1,
|
|
258
264
|
"inactive-value": 0,
|
|
259
|
-
loading: i(L) && a[t.tableRowKey] === i(
|
|
260
|
-
"before-change": /* @__PURE__ */ o(() =>
|
|
261
|
-
disabled:
|
|
265
|
+
loading: i(L) && a[t.tableRowKey] === i(G),
|
|
266
|
+
"before-change": /* @__PURE__ */ o(() => re(a[t.tableRowKey], a[t.switchProp], a), "before-change"),
|
|
267
|
+
disabled: fe(a)
|
|
262
268
|
}, null, 8, ["model-value", "loading", "before-change", "disabled"])
|
|
263
269
|
]),
|
|
264
270
|
_: 1
|
|
@@ -271,38 +277,38 @@ const Be = {
|
|
|
271
277
|
"show-overflow-tooltip": !1
|
|
272
278
|
}, t.tableOperateColumn), {
|
|
273
279
|
default: s(({ row: a }) => [
|
|
274
|
-
|
|
275
|
-
|
|
280
|
+
X("div", Ke, [
|
|
281
|
+
E(i(Se), {
|
|
276
282
|
size: 0,
|
|
277
|
-
spacer: i(
|
|
283
|
+
spacer: i(Te)
|
|
278
284
|
}, {
|
|
279
285
|
default: s(() => [
|
|
280
286
|
u(t.$slots, "table-operate-prepend", { row: a }, void 0, !0),
|
|
281
|
-
|
|
287
|
+
ue(a) ? (n(), f(i(S), {
|
|
282
288
|
key: 0,
|
|
283
|
-
disabled:
|
|
289
|
+
disabled: be(a),
|
|
284
290
|
link: "",
|
|
285
291
|
type: "primary",
|
|
286
|
-
onClick: /* @__PURE__ */ o((r) =>
|
|
292
|
+
onClick: /* @__PURE__ */ o((r) => ne(a[t.tableRowKey], a), "onClick")
|
|
287
293
|
}, {
|
|
288
294
|
default: s(() => [
|
|
289
|
-
v(
|
|
295
|
+
v(k(t.tableDetailText || "查看"), 1)
|
|
290
296
|
]),
|
|
291
297
|
_: 2
|
|
292
298
|
}, 1032, ["disabled", "onClick"])) : b("", !0),
|
|
293
|
-
|
|
299
|
+
me(a) ? (n(), f(i(S), {
|
|
294
300
|
key: 1,
|
|
295
|
-
disabled:
|
|
301
|
+
disabled: ce(a),
|
|
296
302
|
link: "",
|
|
297
303
|
type: "primary",
|
|
298
|
-
onClick: /* @__PURE__ */ o((r) =>
|
|
304
|
+
onClick: /* @__PURE__ */ o((r) => se(a[t.tableRowKey], a), "onClick")
|
|
299
305
|
}, {
|
|
300
306
|
default: s(() => [
|
|
301
|
-
v(
|
|
307
|
+
v(k(t.tableEditText || "编辑"), 1)
|
|
302
308
|
]),
|
|
303
309
|
_: 2
|
|
304
310
|
}, 1032, ["disabled", "onClick"])) : b("", !0),
|
|
305
|
-
|
|
311
|
+
he(a) ? (n(), f(m, {
|
|
306
312
|
key: 2,
|
|
307
313
|
"hide-icon": "",
|
|
308
314
|
placement: "top",
|
|
@@ -310,17 +316,17 @@ const Be = {
|
|
|
310
316
|
"confirm-button-text": "确认",
|
|
311
317
|
"cancel-button-text": "取消",
|
|
312
318
|
title: "是否删除当前列数据?",
|
|
313
|
-
onConfirm: /* @__PURE__ */ o((r) =>
|
|
319
|
+
onConfirm: /* @__PURE__ */ o((r) => de(a[t.tableRowKey], a), "onConfirm")
|
|
314
320
|
}, {
|
|
315
321
|
reference: s(() => [
|
|
316
|
-
|
|
322
|
+
E(i(S), {
|
|
317
323
|
link: "",
|
|
318
324
|
type: "danger",
|
|
319
|
-
disabled: i(
|
|
320
|
-
loading: i(
|
|
325
|
+
disabled: i(p) || pe(a),
|
|
326
|
+
loading: i(p) && i(F) === a[t.tableRowKey]
|
|
321
327
|
}, {
|
|
322
328
|
default: s(() => [
|
|
323
|
-
v(
|
|
329
|
+
v(k(i(p) && i(F) === a[t.tableRowKey] ? "" : t.tableDelText || "删除"), 1)
|
|
324
330
|
]),
|
|
325
331
|
_: 2
|
|
326
332
|
}, 1032, ["disabled", "loading"])
|
|
@@ -335,12 +341,12 @@ const Be = {
|
|
|
335
341
|
]),
|
|
336
342
|
_: 3
|
|
337
343
|
}, 16)) : b("", !0),
|
|
338
|
-
u(t.$slots, "table-append", { tableData: i(
|
|
344
|
+
u(t.$slots, "table-append", { tableData: i(q) }, void 0, !0)
|
|
339
345
|
]),
|
|
340
346
|
_: 2
|
|
341
347
|
}, [
|
|
342
|
-
|
|
343
|
-
name:
|
|
348
|
+
N(i(le), (a) => ({
|
|
349
|
+
name: M(a, !1),
|
|
344
350
|
fn: s((r) => [
|
|
345
351
|
u(t.$slots, a, O(z(r)), void 0, !0)
|
|
346
352
|
])
|
|
@@ -351,5 +357,5 @@ const Be = {
|
|
|
351
357
|
}
|
|
352
358
|
});
|
|
353
359
|
export {
|
|
354
|
-
|
|
360
|
+
ot as default
|
|
355
361
|
};
|
|
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-399d9b9d"]]);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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-399d9b9d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|