@mineadmin/table 1.0.25 → 1.0.29

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/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as $, ref as b, inject as F, onMounted as H, watch as R, onBeforeUnmount as U, computed as q, withDirectives as k, createVNode as i, mergeProps as C, vShow as v, resolveDirective as G, Fragment as P, isVNode as J, getCurrentInstance as K } from "vue";
1
+ import { defineComponent as $, ref as b, inject as F, onMounted as H, watch as P, onBeforeUnmount as v, computed as U, withDirectives as R, createVNode as i, mergeProps as L, vShow as q, resolveDirective as G, Fragment as k, isVNode as J, getCurrentInstance as K } from "vue";
2
2
  import { ElLoadingDirective as Q, ElPagination as W, ElTable as X, ElEmpty as Y, ElTableColumn as Z } from "element-plus";
3
3
  const D = $({ name: "MaTable", props: { options: { type: Object, default: () => ({}) }, columns: { type: Array, default: () => [] } }, directives: { Loading: Q }, emits: ["set-data-callback"], setup(r, { slots: e, attrs: p, emit: m, expose: w }) {
4
4
  const t = b(r.options), d = b(r.columns), N = F("MaTableOptions"), y = b(!1), x = b(), h = () => {
@@ -7,24 +7,25 @@ const D = $({ name: "MaTable", props: { options: { type: Object, default: () =>
7
7
  };
8
8
  H(async () => {
9
9
  y.value = !0;
10
- }), R(() => {
10
+ }), P(() => {
11
11
  var a;
12
12
  return (a = t.value) == null ? void 0 : a.adaption;
13
13
  }, (a) => {
14
14
  a && (window.addEventListener("resize", h), h());
15
- }, { immediate: !0 }), R(() => {
15
+ }, { immediate: !0 }), P(() => {
16
16
  var a;
17
17
  return (a = t.value) == null ? void 0 : a.adaptionOffsetBottom;
18
18
  }, () => {
19
19
  var a;
20
20
  (a = t.value) != null && a.adaption && h();
21
- }, { immediate: !0 }), U(() => {
21
+ }, { immediate: !0 }), v(() => {
22
22
  y.value = !1, window.removeEventListener("resize", h);
23
23
  });
24
- const V = q(() => {
25
- var n;
24
+ const V = U(() => {
25
+ var n, o;
26
26
  const { pagination: a } = t.value;
27
- return k(i("div", { className: "mineadmin-pagination" }, [i("div", { class: "mineadmin-pagination-left" }, [(n = e == null ? void 0 : e.pageLeft) == null ? void 0 : n.call(e)]), a && i("div", { class: "mineadmin-el-page" }, [i(W, C(a, { size: (a == null ? void 0 : a.size) ?? "default", pagerCount: (a == null ? void 0 : a.pagerCount) ?? 5, layout: (a == null ? void 0 : a.layout) ?? "total, prev, pager, next, sizes, jumper" }), null)])]), [[v, e.pageLeft || a]]);
27
+ return R(i("div", { className: "mineadmin-pagination" }, [i("div", { class: "mineadmin-pagination-left" }, [(n = e == null ? void 0 : e.pageLeft) == null ? void 0 : n.call(e)]), (((o = t.value) == null ? void 0 : o.showPagination) ?? !1) && a && i("div", { class: "mineadmin-el-page" }, [i(W, L({ total: 0, onChange: () => {
28
+ } }, a, { size: (a == null ? void 0 : a.size) ?? "default", pagerCount: (a == null ? void 0 : a.pagerCount) ?? 5, layout: (a == null ? void 0 : a.layout) ?? "total, prev, pager, next, sizes, jumper" }), null)])]), [[q, e.pageLeft || a]]);
28
29
  }), T = (a, n) => {
29
30
  var M, A, B, z;
30
31
  if (a != null && a.hide && (a == null ? void 0 : a.hide) instanceof Function && a.hide(p) || a != null && a.hide && typeof (a == null ? void 0 : a.hide) == "boolean" && a.hide) return;
@@ -40,13 +41,13 @@ const D = $({ name: "MaTable", props: { options: { type: Object, default: () =>
40
41
  return (u = e == null ? void 0 : e.filterIcon) == null ? void 0 : u.call(e, s);
41
42
  } };
42
43
  const { label: O, prop: _, children: c, cellRender: aa, headerRender: ea, ...S } = a;
43
- return c && c.length > 0 && (l = c == null ? void 0 : c.map(T)), i(Z, C({ key: n }, S, { label: typeof O == "function" ? O() : O, prop: o, align: (a == null ? void 0 : a.align) ?? ((M = t.value) == null ? void 0 : M.columnAlign) ?? "center", headerAlign: (a == null ? void 0 : a.align) ?? ((A = t.value) == null ? void 0 : A.columnAlign) ?? (a == null ? void 0 : a.headerAlign) ?? ((B = t.value) == null ? void 0 : B.headerAlign) ?? "center", showOverflowTooltip: (a == null ? void 0 : a.showOverflowTooltip) ?? ((z = t.value) == null ? void 0 : z.showOverflowTooltip) ?? !0 }), typeof (L = l) == "function" || Object.prototype.toString.call(L) === "[object Object]" && !J(L) ? l : { default: () => [l] });
44
- var L;
44
+ return c && c.length > 0 && (l = c == null ? void 0 : c.map(T)), i(Z, L({ key: n }, S, { label: typeof O == "function" ? O() : O, prop: o, align: (a == null ? void 0 : a.align) ?? ((M = t.value) == null ? void 0 : M.columnAlign) ?? "center", headerAlign: (a == null ? void 0 : a.align) ?? ((A = t.value) == null ? void 0 : A.columnAlign) ?? (a == null ? void 0 : a.headerAlign) ?? ((B = t.value) == null ? void 0 : B.headerAlign) ?? "center", showOverflowTooltip: (a == null ? void 0 : a.showOverflowTooltip) ?? ((z = t.value) == null ? void 0 : z.showOverflowTooltip) ?? !0 }), typeof (C = l) == "function" || Object.prototype.toString.call(C) === "[object Object]" && !J(C) ? l : { default: () => [l] });
45
+ var C;
45
46
  }, I = () => {
46
47
  const { on: a, pagination: n, ...o } = t.value;
47
- return i(P, null, [i(X, C({ ref: x }, a, o, p), { default: () => {
48
+ return i(k, null, [i(X, L({ ref: x }, a, o, p), { default: () => {
48
49
  var l;
49
- return [i(P, null, [(l = d.value) == null ? void 0 : l.map(T)])];
50
+ return [i(k, null, [(l = d.value) == null ? void 0 : l.map(T)])];
50
51
  }, append: () => {
51
52
  var l;
52
53
  return (l = e.append) == null ? void 0 : l.call(e);
@@ -56,7 +57,7 @@ const D = $({ name: "MaTable", props: { options: { type: Object, default: () =>
56
57
  } }), V.value]);
57
58
  }, j = () => {
58
59
  const { loading: a, loadingConfig: n, height: o, maxHeight: l } = t.value;
59
- return k(i("div", { className: "mineadmin-table", "element-loading-svg": (n == null ? void 0 : n.svg) ?? '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"/></svg>', "element-loading-svg-view-box": (n == null ? void 0 : n.viewBox) ?? "-9, -9, 50, 50", "element-loading-text": (n == null ? void 0 : n.text) ?? null, "element-loading-spinner": (n == null ? void 0 : n.spinner) ?? null, "element-loading-background": (n == null ? void 0 : n.spinner) ?? null, "element-loading-custom-class": (n == null ? void 0 : n.customClass) ?? null }, [I()]), [[G("loading"), a]]);
60
+ return R(i("div", { className: "mineadmin-table", "element-loading-svg": (n == null ? void 0 : n.svg) ?? '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"/></svg>', "element-loading-svg-view-box": (n == null ? void 0 : n.viewBox) ?? "-9, -9, 50, 50", "element-loading-text": (n == null ? void 0 : n.text) ?? null, "element-loading-spinner": (n == null ? void 0 : n.spinner) ?? null, "element-loading-background": (n == null ? void 0 : n.spinner) ?? null, "element-loading-custom-class": (n == null ? void 0 : n.customClass) ?? null }, [I()]), [[G("loading"), a]]);
60
61
  }, E = (a) => d.value = a;
61
62
  return w({ setData: (a) => {
62
63
  t.value.data = a, m("set-data-callback", a);
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(r,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],o):o((r=typeof globalThis<"u"?globalThis:r||self).MaTable={},r.Vue,r.ElementPlus)})(this,function(r,o,m){"use strict";const V=o.defineComponent({name:"MaTable",props:{options:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]}},directives:{Loading:m.ElLoadingDirective},emits:["set-data-callback"],setup(u,{slots:a,attrs:d,emit:g,expose:w}){const t=o.ref(u.options),c=o.ref(u.columns),B=o.inject("MaTableOptions"),y=o.ref(!1),C=o.ref(),b=()=>{const{adaptionOffsetBottom:e}=t.value,l=window.innerHeight-(e??70);t.value.height=`${l}px`};o.onMounted(async()=>{y.value=!0}),o.watch(()=>{var e;return(e=t.value)==null?void 0:e.adaption},e=>{e&&(window.addEventListener("resize",b),b())},{immediate:!0}),o.watch(()=>{var e;return(e=t.value)==null?void 0:e.adaptionOffsetBottom},()=>{var e;(e=t.value)!=null&&e.adaption&&b()},{immediate:!0}),o.onBeforeUnmount(()=>{y.value=!1,window.removeEventListener("resize",b)});const z=o.computed(()=>{var l;const{pagination:e}=t.value;return o.withDirectives(o.createVNode("div",{className:"mineadmin-pagination"},[o.createVNode("div",{class:"mineadmin-pagination-left"},[(l=a==null?void 0:a.pageLeft)==null?void 0:l.call(a)]),e&&o.createVNode("div",{class:"mineadmin-el-page"},[o.createVNode(m.ElPagination,o.mergeProps(e,{size:(e==null?void 0:e.size)??"default",pagerCount:(e==null?void 0:e.pagerCount)??5,layout:(e==null?void 0:e.layout)??"total, prev, pager, next, sizes, jumper"}),null)])]),[[o.vShow,a.pageLeft||e]])}),L=(e,l)=>{var M,E,P,A;if(e!=null&&e.hide&&(e==null?void 0:e.hide)instanceof Function&&e.hide(d)||e!=null&&e.hide&&typeof(e==null?void 0:e.hide)=="boolean"&&e.hide)return;const n=typeof e.prop=="function"?e.prop(l):e.prop;let i={default:s=>{var p,f,h;return((p=e==null?void 0:e.cellRender)==null?void 0:p.call(e,Object.assign(s,{options:t.value,attrs:d})))??((f=a==null?void 0:a[`column-${n}`])==null?void 0:f.call(a,s))??((h=a==null?void 0:a.default)==null?void 0:h.call(a,s))},header:s=>{var p,f,h;return((p=e==null?void 0:e.headerRender)==null?void 0:p.call(e,Object.assign(s,{options:t.value,attrs:d})))??((f=a==null?void 0:a[`header-${n}`])==null?void 0:f.call(a,s))??((h=a==null?void 0:a.header)==null?void 0:h.call(a,s))},filterIcon:s=>{var p;return(p=a==null?void 0:a.filterIcon)==null?void 0:p.call(a,s)}};const{label:O,prop:S,children:v,cellRender:k,headerRender:H,...R}=e;return v&&v.length>0&&(i=v==null?void 0:v.map(L)),o.createVNode(m.ElTableColumn,o.mergeProps({key:l},R,{label:typeof O=="function"?O():O,prop:n,align:(e==null?void 0:e.align)??((M=t.value)==null?void 0:M.columnAlign)??"center",headerAlign:(e==null?void 0:e.align)??((E=t.value)==null?void 0:E.columnAlign)??(e==null?void 0:e.headerAlign)??((P=t.value)==null?void 0:P.headerAlign)??"center",showOverflowTooltip:(e==null?void 0:e.showOverflowTooltip)??((A=t.value)==null?void 0:A.showOverflowTooltip)??!0}),typeof(T=i)=="function"||Object.prototype.toString.call(T)==="[object Object]"&&!o.isVNode(T)?i:{default:()=>[i]});var T},D=()=>{const{on:e,pagination:l,...n}=t.value;return o.createVNode(o.Fragment,null,[o.createVNode(m.ElTable,o.mergeProps({ref:C},e,n,d),{default:()=>{var i;return[o.createVNode(o.Fragment,null,[(i=c.value)==null?void 0:i.map(L)])]},append:()=>{var i;return(i=a.append)==null?void 0:i.call(a)},empty:()=>{var i;return((i=a.empty)==null?void 0:i.call(a))??o.createVNode(m.ElEmpty,null,null)}}),z.value])},N=()=>{const{loading:e,loadingConfig:l,height:n,maxHeight:i}=t.value;return o.withDirectives(o.createVNode("div",{className:"mineadmin-table","element-loading-svg":(l==null?void 0:l.svg)??'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"/></svg>',"element-loading-svg-view-box":(l==null?void 0:l.viewBox)??"-9, -9, 50, 50","element-loading-text":(l==null?void 0:l.text)??null,"element-loading-spinner":(l==null?void 0:l.spinner)??null,"element-loading-background":(l==null?void 0:l.spinner)??null,"element-loading-custom-class":(l==null?void 0:l.customClass)??null},[D()]),[[o.resolveDirective("loading"),e]])},j=e=>c.value=e;return w({setData:e=>{t.value.data=e,g("set-data-callback",e)},setPagination:e=>{var l;return t.value.pagination=Object.assign(((l=t.value)==null?void 0:l.pagination)??{},e)},setLoadingState:e=>t.value.loading=e,setOptions:e=>t.value=Object.assign(t.value,e),getOptions:()=>t.value,setColumns:j,getColumns:()=>c.value,appendColumn:e=>c.value.push(e),removeColumn:e=>j(c.value.filter((l,n)=>(typeof l.prop=="function"?l.prop(n):l.prop)!==e)),getColumnByProp:e=>{var l;return((l=c.value.filter((n,i)=>(typeof n.prop=="function"?n.prop(i):n.prop)!==e))==null?void 0:l[0])??null},getElTableRef:()=>C.value}),()=>B.ssr?y.value&&N():N()}}),x={install(u,a){u.component(V.name,V),u.provide("MaTableOptions",a??{ssr:!1})}};r.MaTable=x,r.default=x,r.useTable=function(u){return new Promise(async(a,d)=>{const g=o.getCurrentInstance();o.onMounted(async()=>{if(g&&g.refs[u]){const w=g.refs[u];a({...w})}else d("[@mineadmin/table]: not found ref for ma-table component")})})},Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(r,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],o):o((r=typeof globalThis<"u"?globalThis:r||self).MaTable={},r.Vue,r.ElementPlus)})(this,function(r,o,m){"use strict";const C=o.defineComponent({name:"MaTable",props:{options:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]}},directives:{Loading:m.ElLoadingDirective},emits:["set-data-callback"],setup(u,{slots:t,attrs:d,emit:g,expose:w}){const l=o.ref(u.options),c=o.ref(u.columns),B=o.inject("MaTableOptions"),y=o.ref(!1),x=o.ref(),b=()=>{const{adaptionOffsetBottom:e}=l.value,a=window.innerHeight-(e??70);l.value.height=`${a}px`};o.onMounted(async()=>{y.value=!0}),o.watch(()=>{var e;return(e=l.value)==null?void 0:e.adaption},e=>{e&&(window.addEventListener("resize",b),b())},{immediate:!0}),o.watch(()=>{var e;return(e=l.value)==null?void 0:e.adaptionOffsetBottom},()=>{var e;(e=l.value)!=null&&e.adaption&&b()},{immediate:!0}),o.onBeforeUnmount(()=>{y.value=!1,window.removeEventListener("resize",b)});const z=o.computed(()=>{var a,n;const{pagination:e}=l.value;return o.withDirectives(o.createVNode("div",{className:"mineadmin-pagination"},[o.createVNode("div",{class:"mineadmin-pagination-left"},[(a=t==null?void 0:t.pageLeft)==null?void 0:a.call(t)]),(((n=l.value)==null?void 0:n.showPagination)??!1)&&e&&o.createVNode("div",{class:"mineadmin-el-page"},[o.createVNode(m.ElPagination,o.mergeProps({total:0,onChange:()=>{}},e,{size:(e==null?void 0:e.size)??"default",pagerCount:(e==null?void 0:e.pagerCount)??5,layout:(e==null?void 0:e.layout)??"total, prev, pager, next, sizes, jumper"}),null)])]),[[o.vShow,t.pageLeft||e]])}),L=(e,a)=>{var M,E,P,A;if(e!=null&&e.hide&&(e==null?void 0:e.hide)instanceof Function&&e.hide(d)||e!=null&&e.hide&&typeof(e==null?void 0:e.hide)=="boolean"&&e.hide)return;const n=typeof e.prop=="function"?e.prop(a):e.prop;let i={default:s=>{var p,f,h;return((p=e==null?void 0:e.cellRender)==null?void 0:p.call(e,Object.assign(s,{options:l.value,attrs:d})))??((f=t==null?void 0:t[`column-${n}`])==null?void 0:f.call(t,s))??((h=t==null?void 0:t.default)==null?void 0:h.call(t,s))},header:s=>{var p,f,h;return((p=e==null?void 0:e.headerRender)==null?void 0:p.call(e,Object.assign(s,{options:l.value,attrs:d})))??((f=t==null?void 0:t[`header-${n}`])==null?void 0:f.call(t,s))??((h=t==null?void 0:t.header)==null?void 0:h.call(t,s))},filterIcon:s=>{var p;return(p=t==null?void 0:t.filterIcon)==null?void 0:p.call(t,s)}};const{label:O,prop:S,children:v,cellRender:k,headerRender:H,...R}=e;return v&&v.length>0&&(i=v==null?void 0:v.map(L)),o.createVNode(m.ElTableColumn,o.mergeProps({key:a},R,{label:typeof O=="function"?O():O,prop:n,align:(e==null?void 0:e.align)??((M=l.value)==null?void 0:M.columnAlign)??"center",headerAlign:(e==null?void 0:e.align)??((E=l.value)==null?void 0:E.columnAlign)??(e==null?void 0:e.headerAlign)??((P=l.value)==null?void 0:P.headerAlign)??"center",showOverflowTooltip:(e==null?void 0:e.showOverflowTooltip)??((A=l.value)==null?void 0:A.showOverflowTooltip)??!0}),typeof(T=i)=="function"||Object.prototype.toString.call(T)==="[object Object]"&&!o.isVNode(T)?i:{default:()=>[i]});var T},D=()=>{const{on:e,pagination:a,...n}=l.value;return o.createVNode(o.Fragment,null,[o.createVNode(m.ElTable,o.mergeProps({ref:x},e,n,d),{default:()=>{var i;return[o.createVNode(o.Fragment,null,[(i=c.value)==null?void 0:i.map(L)])]},append:()=>{var i;return(i=t.append)==null?void 0:i.call(t)},empty:()=>{var i;return((i=t.empty)==null?void 0:i.call(t))??o.createVNode(m.ElEmpty,null,null)}}),z.value])},N=()=>{const{loading:e,loadingConfig:a,height:n,maxHeight:i}=l.value;return o.withDirectives(o.createVNode("div",{className:"mineadmin-table","element-loading-svg":(a==null?void 0:a.svg)??'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"/></svg>',"element-loading-svg-view-box":(a==null?void 0:a.viewBox)??"-9, -9, 50, 50","element-loading-text":(a==null?void 0:a.text)??null,"element-loading-spinner":(a==null?void 0:a.spinner)??null,"element-loading-background":(a==null?void 0:a.spinner)??null,"element-loading-custom-class":(a==null?void 0:a.customClass)??null},[D()]),[[o.resolveDirective("loading"),e]])},j=e=>c.value=e;return w({setData:e=>{l.value.data=e,g("set-data-callback",e)},setPagination:e=>{var a;return l.value.pagination=Object.assign(((a=l.value)==null?void 0:a.pagination)??{},e)},setLoadingState:e=>l.value.loading=e,setOptions:e=>l.value=Object.assign(l.value,e),getOptions:()=>l.value,setColumns:j,getColumns:()=>c.value,appendColumn:e=>c.value.push(e),removeColumn:e=>j(c.value.filter((a,n)=>(typeof a.prop=="function"?a.prop(n):a.prop)!==e)),getColumnByProp:e=>{var a;return((a=c.value.filter((n,i)=>(typeof n.prop=="function"?n.prop(i):n.prop)!==e))==null?void 0:a[0])??null},getElTableRef:()=>x.value}),()=>B.ssr?y.value&&N():N()}}),V={install(u,t){u.component(C.name,C),u.provide("MaTableOptions",t??{ssr:!1})}};r.MaTable=V,r.default=V,r.useTable=function(u){return new Promise(async(t,d)=>{const g=o.getCurrentInstance();o.onMounted(async()=>{if(g&&g.refs[u]){const w=g.refs[u];t({...w})}else d("[@mineadmin/table]: not found ref for ma-table component")})})},Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -12,6 +12,7 @@ export interface ExtraOptions {
12
12
  pagination?: PaginationProps;
13
13
  adaption?: boolean;
14
14
  adaptionOffsetBottom?: number;
15
+ showPagination?: boolean;
15
16
  }
16
17
  /**
17
18
  * @description `element-plus` 的 `table` 属性,未拓展
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mineadmin/table",
3
- "version": "1.0.25",
3
+ "version": "1.0.29",
4
4
  "packageManager": "pnpm@8.6.10",
5
5
  "description": "基于element plus的表格组件,进行封装,提供方便、灵活的配置和使用方式",
6
6
  "keywords": [