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