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