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