orion-design 0.1.35 → 0.1.36

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ declare function __VLS_template(): {
3
3
  default?(_: {}): any;
4
4
  };
5
5
  refs: {
6
- out: unknown;
6
+ div: HTMLDivElement;
7
7
  table: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
8
8
  data: {
9
9
  type: import('vue').PropType<any[]>;
@@ -447,7 +447,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
447
447
  width: number | string;
448
448
  height: number | string;
449
449
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
450
- out: unknown;
450
+ div: HTMLDivElement;
451
451
  table: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
452
452
  data: {
453
453
  type: import('vue').PropType<any[]>;
@@ -8,7 +8,7 @@ declare const _default: import('../_util').SFCWithInstall<{
8
8
  width: number | string;
9
9
  height: number | string;
10
10
  }> & Readonly<{}>, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
11
- out: unknown;
11
+ div: HTMLDivElement;
12
12
  table: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
13
13
  data: {
14
14
  type: import('vue').PropType<any[]>;
@@ -1,11 +1,15 @@
1
- import { intersectionWith as S, isEqual as x, find as c, remove as y } from "lodash-es";
2
- import { defineComponent as L, computed as k, useTemplateRef as O, ref as U, watch as w, nextTick as W, resolveComponent as u, openBlock as f, createBlock as p, normalizeStyle as j, withCtx as o, createVNode as a, unref as r, createElementBlock as E, Fragment as T, renderList as C, createTextVNode as d, toDisplayString as z, mergeProps as G, renderSlot as H } from "vue";
3
- import { withInstall as J } from "../_util/vue/install.js";
4
- import { ElTooltip as K, ElTag as P, ElScrollbar as M } from "element-plus";
5
- import Q from "../Pagetable/index.js";
6
- import { addUnit as R } from "../_util/dom/style.js";
7
- import X from "../Form/TableSelect/hooks/useTableSelect.js";
8
- const Y = /* @__PURE__ */ L({
1
+ import { intersectionWith as E, isEqual as k, find as d, remove as w } from "lodash-es";
2
+ import { defineComponent as q, computed as T, useTemplateRef as C, ref as b, onMounted as F, watch as z, nextTick as I, resolveComponent as p, openBlock as r, createBlock as g, normalizeStyle as U, withCtx as n, createVNode as a, createElementVNode as f, createElementBlock as x, Fragment as R, renderList as N, unref as c, createTextVNode as m, toDisplayString as P, createCommentVNode as G, mergeProps as H, renderSlot as J } from "vue";
3
+ import { withInstall as K } from "../_util/vue/install.js";
4
+ import { ElTag as V, ElTooltip as Q, ElScrollbar as X } from "element-plus";
5
+ import Y from "../Pagetable/index.js";
6
+ import { m as Z } from "../../index-Bm0F5NQQ.js";
7
+ import { addUnit as B } from "../_util/dom/style.js";
8
+ import ee from "../Form/TableSelect/hooks/useTableSelect.js";
9
+ const te = { style: { display: "flex", padding: "5px" } }, le = {
10
+ ref: "div",
11
+ style: { flex: "1 1 0px", display: "flex", gap: "5px", overflow: "hidden" }
12
+ }, oe = { style: { flex: "none", width: "150px", display: "flex", gap: "5px", justifyContent: "right" } }, ne = { key: 0 }, ae = /* @__PURE__ */ q({
9
13
  name: "OTableselectPagetable",
10
14
  inheritAttrs: !0,
11
15
  __name: "TableSelectPagetable",
@@ -15,141 +19,140 @@ const Y = /* @__PURE__ */ L({
15
19
  height: { default: 300 }
16
20
  },
17
21
  setup(i) {
18
- const b = k(() => ({
19
- width: R(i.width),
20
- height: R(i.height)
21
- })), g = O("table"), l = U([]), h = k(() => l.value.map((n) => e == null ? void 0 : e.tag(n))), B = (n, t) => {
22
- c(n, t) ? c(l.value, t) || l.value.push(t) : c(l.value, t) && y(l.value, t), e == null || e.onSelect(l.value);
23
- }, D = (n) => {
24
- n.length > 0 ? n.forEach((t) => {
25
- c(l.value, t) || l.value.push(t);
26
- }) : y(l.value, (t) => c(i.data, t)), e == null || e.onSelect(l.value);
27
- }, e = X(), A = () => {
22
+ const D = T(() => ({
23
+ width: B(i.width),
24
+ height: B(i.height)
25
+ })), y = C("table"), l = b([]), S = T(() => l.value.map((o) => e == null ? void 0 : e.tag(o))), v = b(!1), L = C("div");
26
+ F(() => {
27
+ new MutationObserver((t) => {
28
+ t.forEach((s) => {
29
+ if (s.type == "childList") {
30
+ const u = s.target;
31
+ u.scrollWidth > u.clientWidth ? v.value = !0 : v.value = !1;
32
+ }
33
+ });
34
+ }).observe(L.value, {
35
+ childList: !0
36
+ });
37
+ });
38
+ const W = (o, t) => {
39
+ d(o, t) ? d(l.value, t) || l.value.push(t) : d(l.value, t) && w(l.value, t), e == null || e.onSelect(l.value);
40
+ }, A = (o) => {
41
+ o.length > 0 ? o.forEach((t) => {
42
+ d(l.value, t) || l.value.push(t);
43
+ }) : w(l.value, (t) => d(i.data, t)), e == null || e.onSelect(l.value);
44
+ }, e = ee(), M = () => {
28
45
  e == null || e.selectDone();
29
- }, N = () => {
30
- V(), l.value = [], e == null || e.onSelect([], !0);
46
+ }, O = () => {
47
+ $(), l.value = [], e == null || e.onSelect([], !0);
31
48
  };
32
- w(
49
+ z(
33
50
  () => i.data,
34
51
  async () => {
35
- i.data.length > 0 && (await W(), v());
52
+ i.data.length > 0 && (await I(), _());
36
53
  }
37
- ), w(() => e == null ? void 0 : e.selection, () => {
38
- e != null && e.selection && e.selection.length > 0 && (l.value = e.selection, v());
54
+ ), z(() => e == null ? void 0 : e.selection, () => {
55
+ e != null && e.selection && e.selection.length > 0 && (l.value = e.selection, _());
39
56
  });
40
- const v = () => {
41
- S(i.data, l.value, x).forEach((t) => {
42
- g.value.toggleRowSelection(t, !0);
57
+ const _ = () => {
58
+ E(i.data, l.value, k).forEach((t) => {
59
+ y.value.toggleRowSelection(t, !0);
43
60
  });
44
- }, V = () => {
45
- S(i.data, l.value, x).forEach((t) => {
46
- g.value.toggleRowSelection(t, !1);
61
+ }, $ = () => {
62
+ E(i.data, l.value, k).forEach((t) => {
63
+ y.value.toggleRowSelection(t, !1);
47
64
  });
48
65
  };
49
- return (n, t) => {
50
- const $ = u("o-space"), s = u("o-flexitem"), _ = u("o-button"), q = u("o-buttongroup"), F = u("o-rowflex"), I = u("o-colflex");
51
- return f(), p(I, {
52
- style: j(b.value)
66
+ return (o, t) => {
67
+ const s = p("o-button"), u = p("o-flexitem"), j = p("o-colflex");
68
+ return r(), g(j, {
69
+ style: U(D.value)
53
70
  }, {
54
- default: o(() => [
55
- a(s, { "flex-basic": "need" }, {
56
- default: o(() => [
57
- a(F, null, {
58
- default: o(() => [
59
- a(s, {
60
- ref: "out",
61
- style: { overflow: "hidden", padding: "5px" }
62
- }, {
63
- default: o(() => [
64
- a(r(K), {
65
- effect: "light",
66
- teleported: !1
67
- }, {
68
- default: o(() => [
69
- a($, null, {
70
- default: o(() => [
71
- (f(!0), E(T, null, C(h.value, (m) => (f(), p(r(P), { type: "info" }, {
72
- default: o(() => [
73
- d(z(m), 1)
74
- ]),
75
- _: 2
76
- }, 1024))), 256))
77
- ]),
78
- _: 1
79
- })
80
- ]),
81
- content: o(() => [
82
- a(r(M), { "max-height": "100" }, {
83
- default: o(() => [
84
- (f(!0), E(T, null, C(h.value, (m) => (f(), p(r(P), {
85
- type: "info",
86
- style: { margin: "5px" }
87
- }, {
88
- default: o(() => [
89
- d(z(m), 1)
90
- ]),
91
- _: 2
92
- }, 1024))), 256))
93
- ]),
94
- _: 1
95
- })
96
- ]),
97
- _: 1
98
- })
71
+ default: n(() => [
72
+ a(u, { "flex-basic": "need" }, {
73
+ default: n(() => [
74
+ f("div", te, [
75
+ f("div", le, [
76
+ (r(!0), x(R, null, N(S.value, (h) => (r(), g(c(V), { type: "info" }, {
77
+ default: n(() => [
78
+ m(P(h), 1)
99
79
  ]),
100
- _: 1
101
- }, 512),
102
- a(s, {
103
- "flex-basic": "need",
104
- style: { padding: "5px" }
105
- }, {
106
- default: o(() => [
107
- a(q, null, {
108
- default: o(() => [
109
- a(_, {
110
- type: "primary",
111
- size: "small",
112
- onClick: A
113
- }, {
114
- default: o(() => t[0] || (t[0] = [
115
- d("确定")
116
- ])),
117
- _: 1
118
- }),
119
- a(_, {
120
- size: "small",
121
- onClick: N
122
- }, {
123
- default: o(() => t[1] || (t[1] = [
124
- d("清空")
125
- ])),
126
- _: 1
127
- })
128
- ]),
129
- _: 1
130
- })
131
- ]),
132
- _: 1
133
- })
134
- ]),
135
- _: 1
136
- })
80
+ _: 2
81
+ }, 1024))), 256))
82
+ ], 512),
83
+ f("div", oe, [
84
+ v.value ? (r(), x("div", ne, [
85
+ a(c(Q), {
86
+ effect: "light",
87
+ teleported: !1
88
+ }, {
89
+ default: n(() => [
90
+ a(s, {
91
+ size: "small",
92
+ icon: c(Z),
93
+ text: ""
94
+ }, null, 8, ["icon"])
95
+ ]),
96
+ content: n(() => [
97
+ a(c(X), { "max-height": "100" }, {
98
+ default: n(() => [
99
+ (r(!0), x(R, null, N(S.value, (h) => (r(), g(c(V), {
100
+ type: "info",
101
+ style: { margin: "5px" }
102
+ }, {
103
+ default: n(() => [
104
+ m(P(h), 1)
105
+ ]),
106
+ _: 2
107
+ }, 1024))), 256))
108
+ ]),
109
+ _: 1
110
+ })
111
+ ]),
112
+ _: 1
113
+ })
114
+ ])) : G("", !0),
115
+ f("div", null, [
116
+ a(s, {
117
+ type: "primary",
118
+ size: "small",
119
+ onClick: M
120
+ }, {
121
+ default: n(() => t[0] || (t[0] = [
122
+ m("确定")
123
+ ])),
124
+ _: 1
125
+ })
126
+ ]),
127
+ f("div", null, [
128
+ a(s, {
129
+ size: "small",
130
+ onClick: O
131
+ }, {
132
+ default: n(() => t[1] || (t[1] = [
133
+ m("清空")
134
+ ])),
135
+ _: 1
136
+ })
137
+ ])
138
+ ])
139
+ ])
137
140
  ]),
138
141
  _: 1
139
142
  }),
140
- a(s, null, {
141
- default: o(() => [
142
- a(r(Q), G({
143
+ a(u, null, {
144
+ default: n(() => [
145
+ a(c(Y), H({
143
146
  ref: "table",
144
- data: n.data,
147
+ data: o.data,
145
148
  "selection-mode": "",
146
149
  size: "small",
147
150
  "pagination-teleported": !1,
148
- onSelect: B,
149
- onSelectAll: D
150
- }, n.$attrs), {
151
- default: o(() => [
152
- H(n.$slots, "default")
151
+ onSelect: W,
152
+ onSelectAll: A
153
+ }, o.$attrs), {
154
+ default: n(() => [
155
+ J(o.$slots, "default")
153
156
  ]),
154
157
  _: 3
155
158
  }, 16, ["data"])
@@ -161,8 +164,8 @@ const Y = /* @__PURE__ */ L({
161
164
  }, 8, ["style"]);
162
165
  };
163
166
  }
164
- }), ie = J(Y, {});
167
+ }), ve = K(ae, {});
165
168
  export {
166
- ie as default
169
+ ve as default
167
170
  };
168
171
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/TableSelectPagetable/TableSelectPagetable.vue","../../../src/components/TableSelectPagetable/index.ts"],"sourcesContent":["<template>\r\n <o-colflex :style=\"style\">\r\n <o-flexitem flex-basic=\"need\">\r\n <o-rowflex>\r\n <o-flexitem ref=\"out\" :style=\"{ overflow: 'hidden', padding: '5px' }\">\r\n <el-tooltip effect=\"light\" :teleported=\"false\">\r\n <template #default>\r\n <o-space>\r\n <el-tag v-for=\"tag in tags\" type=\"info\">{{ tag }}</el-tag>\r\n </o-space>\r\n </template>\r\n <template #content>\r\n <el-scrollbar max-height=\"100\">\r\n <el-tag v-for=\"tag in tags\" type=\"info\" :style=\"{ margin: '5px' }\">{{ tag }}</el-tag>\r\n </el-scrollbar>\r\n </template>\r\n </el-tooltip>\r\n </o-flexitem>\r\n <o-flexitem flex-basic=\"need\" :style=\"{ padding: '5px' }\">\r\n <o-buttongroup>\r\n <o-button type=\"primary\" size=\"small\" @click=\"selectDone\">确定</o-button>\r\n <o-button size=\"small\" @click=\"clearSelection\">清空</o-button>\r\n </o-buttongroup>\r\n </o-flexitem>\r\n </o-rowflex>\r\n </o-flexitem>\r\n <o-flexitem>\r\n <pagetable ref=\"table\" :data=\"data\" selection-mode size=\"small\" :pagination-teleported=\"false\"\r\n @select=\"onSelect\" @select-all=\"onSelectAll\" v-bind=\"$attrs\">\r\n <slot></slot>\r\n </pagetable>\r\n </o-flexitem>\r\n </o-colflex>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport Pagetable from '../Pagetable'\r\nimport { ElTag, ElTooltip, ElScrollbar } from 'element-plus'\r\n// import { More } from '@element-plus/icons-vue'\r\nimport { computed, nextTick, onMounted, ref, useTemplateRef, watch } from 'vue'\r\nimport { find, intersectionWith, isEqual, remove } from 'lodash-es';\r\nimport { addUnit } from '../_util';\r\nimport { useTableselect } from '../Form/TableSelect'\r\n// import { useElementSize } from '@vueuse/core'\r\n\r\ndefineOptions({ name: 'OTableselectPagetable', inheritAttrs: true })\r\n\r\nconst { data, width = 600, height = 300 } = defineProps<{ data: any[], width: number | string, height: number | string }>()\r\nconst style = computed(() => {\r\n return {\r\n width: addUnit(width),\r\n height: addUnit(height)\r\n }\r\n})\r\nconst tableRef = useTemplateRef('table')\r\nconst selection = ref<any[]>([])\r\nconst tags = computed(() => selection.value.map((item) => tableselect?.tag(item)))\r\n\r\nconst onSelect = (_selection: any[], _row: any) => {\r\n if (find(_selection, _row)) {\r\n if (!find(selection.value, _row)) {\r\n selection.value.push(_row)\r\n }\r\n } else {\r\n if (find(selection.value, _row)) {\r\n remove(selection.value, _row)\r\n }\r\n }\r\n tableselect?.onSelect(selection.value)\r\n}\r\nconst onSelectAll = (_selection: any[]) => {\r\n if (_selection.length > 0) {\r\n _selection.forEach((item) => {\r\n if (!find(selection.value, item)) {\r\n selection.value.push(item)\r\n }\r\n })\r\n } else {\r\n remove(selection.value, (item) => find(data, item))\r\n }\r\n tableselect?.onSelect(selection.value)\r\n}\r\n\r\nconst tableselect = useTableselect()\r\nconst selectDone = () => {\r\n tableselect?.selectDone()\r\n}\r\nconst clearSelection = () => {\r\n uncheckSelection()\r\n selection.value = []\r\n tableselect?.onSelect([], true)\r\n}\r\n\r\nwatch(\r\n () => data,\r\n async () => {\r\n if (data.length > 0) {\r\n await nextTick()\r\n checkSelection()\r\n }\r\n }\r\n)\r\nwatch(() => tableselect?.selection, () => {\r\n if (tableselect?.selection && tableselect.selection.length > 0) {\r\n selection.value = tableselect.selection\r\n checkSelection()\r\n }\r\n})\r\n\r\nconst checkSelection = () => {\r\n const _selection = intersectionWith(data, selection.value, isEqual)\r\n _selection.forEach((row) => {\r\n //@ts-ignore\r\n tableRef.value!.toggleRowSelection(row, true)\r\n })\r\n}\r\n\r\nconst uncheckSelection = () => {\r\n const _selection = intersectionWith(data, selection.value, isEqual)\r\n _selection.forEach((row) => {\r\n //@ts-ignore\r\n tableRef.value!.toggleRowSelection(row, false)\r\n })\r\n}\r\n</script>","import { withInstall } from '../_util'\r\n\r\nimport TableSelectPagetable from './TableSelectPagetable.vue'\r\n\r\nexport default withInstall(TableSelectPagetable, {})\r\n"],"names":["style","computed","addUnit","__props","tableRef","useTemplateRef","selection","ref","tags","item","tableselect","onSelect","_selection","_row","find","remove","onSelectAll","useTableselect","selectDone","clearSelection","uncheckSelection","watch","nextTick","checkSelection","intersectionWith","isEqual","row","index","withInstall","TableSelectPagetable"],"mappings":";;;;;;;;;;;;;;;;;AA+CM,UAAAA,IAAQC,EAAS,OACZ;AAAA,MACH,OAAOC,EAAQC,EAAA,KAAK;AAAA,MACpB,QAAQD,EAAQC,EAAM,MAAA;AAAA,IAAA,EAE7B,GACKC,IAAWC,EAAe,OAAO,GACjCC,IAAYC,EAAW,CAAA,CAAE,GACzBC,IAAOP,EAAS,MAAMK,EAAU,MAAM,IAAI,CAACG,MAASC,KAAA,gBAAAA,EAAa,IAAID,EAAK,CAAC,GAE3EE,IAAW,CAACC,GAAmBC,MAAc;AAC3C,MAAAC,EAAKF,GAAYC,CAAI,IAChBC,EAAKR,EAAU,OAAOO,CAAI,KACjBP,EAAA,MAAM,KAAKO,CAAI,IAGzBC,EAAKR,EAAU,OAAOO,CAAI,KACnBE,EAAAT,EAAU,OAAOO,CAAI,GAGvBH,KAAA,QAAAA,EAAA,SAASJ,EAAU;AAAA,IAAK,GAEnCU,I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;;;;;;;;;;;;;;;;;;;;ICrHLC,KAAeC,EAAYC,GAAsB,EAAE;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/TableSelectPagetable/TableSelectPagetable.vue","../../../src/components/TableSelectPagetable/index.ts"],"sourcesContent":["<template>\r\n <o-colflex :style=\"style\">\r\n <o-flexitem flex-basic=\"need\">\r\n <div :style=\"{ display: 'flex', padding: '5px' }\">\r\n <div ref=\"div\" :style=\"{ flex: '1 1 0px', display: 'flex', gap: '5px', overflow: 'hidden' }\">\r\n <el-tag v-for=\"tag in tags\" type=\"info\">{{ tag }}</el-tag>\r\n </div>\r\n <div :style=\"{ flex: 'none', width: '150px', display: 'flex', gap: '5px', justifyContent: 'right' }\">\r\n <div v-if=\"visiable\">\r\n <el-tooltip effect=\"light\" :teleported=\"false\">\r\n <template #default>\r\n <o-button size=\"small\" :icon=\"More\" text />\r\n </template>\r\n <template #content>\r\n <el-scrollbar max-height=\"100\">\r\n <el-tag v-for=\"tag in tags\" type=\"info\" :style=\"{ margin: '5px' }\">\r\n {{ tag }}\r\n </el-tag>\r\n </el-scrollbar>\r\n </template>\r\n </el-tooltip>\r\n </div>\r\n <div>\r\n <o-button type=\"primary\" size=\"small\" @click=\"selectDone\">确定</o-button>\r\n </div>\r\n <div>\r\n <o-button size=\"small\" @click=\"clearSelection\">清空</o-button>\r\n </div>\r\n </div>\r\n </div>\r\n </o-flexitem>\r\n <o-flexitem>\r\n <pagetable ref=\"table\" :data=\"data\" selection-mode size=\"small\" :pagination-teleported=\"false\"\r\n @select=\"onSelect\" @select-all=\"onSelectAll\" v-bind=\"$attrs\">\r\n <slot></slot>\r\n </pagetable>\r\n </o-flexitem>\r\n </o-colflex>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport Pagetable from '../Pagetable'\r\nimport { ElTag, ElTooltip, ElScrollbar } from 'element-plus'\r\nimport { More } from '@element-plus/icons-vue'\r\nimport { computed, nextTick, onMounted, ref, useTemplateRef, watch, watchPostEffect } from 'vue'\r\nimport { find, intersectionWith, isEqual, remove } from 'lodash-es';\r\nimport { addUnit } from '../_util';\r\nimport { useTableselect } from '../Form/TableSelect'\r\n\r\ndefineOptions({ name: 'OTableselectPagetable', inheritAttrs: true })\r\n\r\nconst { data, width = 600, height = 300 } = defineProps<{ data: any[], width: number | string, height: number | string }>()\r\nconst style = computed(() => {\r\n return {\r\n width: addUnit(width),\r\n height: addUnit(height)\r\n }\r\n})\r\nconst tableRef = useTemplateRef('table')\r\nconst selection = ref<any[]>([])\r\nconst tags = computed(() => selection.value.map((item) => tableselect?.tag(item)))\r\n\r\nconst visiable = ref(false)\r\nconst divRef = useTemplateRef('div')\r\nonMounted(() => {\r\n const observer = new MutationObserver((mutations) => {\r\n mutations.forEach((mutation) => {\r\n if (mutation.type == 'childList') {\r\n const target = mutation.target as HTMLDivElement\r\n if (target.scrollWidth > target.clientWidth) {\r\n visiable.value = true\r\n } else {\r\n visiable.value = false\r\n }\r\n }\r\n });\r\n });\r\n observer.observe(divRef.value!, {\r\n childList: true\r\n });\r\n})\r\n\r\nconst onSelect = (_selection: any[], _row: any) => {\r\n if (find(_selection, _row)) {\r\n if (!find(selection.value, _row)) {\r\n selection.value.push(_row)\r\n }\r\n } else {\r\n if (find(selection.value, _row)) {\r\n remove(selection.value, _row)\r\n }\r\n }\r\n tableselect?.onSelect(selection.value)\r\n}\r\nconst onSelectAll = (_selection: any[]) => {\r\n if (_selection.length > 0) {\r\n _selection.forEach((item) => {\r\n if (!find(selection.value, item)) {\r\n selection.value.push(item)\r\n }\r\n })\r\n } else {\r\n remove(selection.value, (item) => find(data, item))\r\n }\r\n tableselect?.onSelect(selection.value)\r\n}\r\n\r\nconst tableselect = useTableselect()\r\nconst selectDone = () => {\r\n tableselect?.selectDone()\r\n}\r\nconst clearSelection = () => {\r\n uncheckSelection()\r\n selection.value = []\r\n tableselect?.onSelect([], true)\r\n}\r\n\r\nwatch(\r\n () => data,\r\n async () => {\r\n if (data.length > 0) {\r\n await nextTick()\r\n checkSelection()\r\n }\r\n }\r\n)\r\nwatch(() => tableselect?.selection, () => {\r\n if (tableselect?.selection && tableselect.selection.length > 0) {\r\n selection.value = tableselect.selection\r\n checkSelection()\r\n }\r\n})\r\n\r\nconst checkSelection = () => {\r\n const _selection = intersectionWith(data, selection.value, isEqual)\r\n _selection.forEach((row) => {\r\n //@ts-ignore\r\n tableRef.value!.toggleRowSelection(row, true)\r\n })\r\n}\r\n\r\nconst uncheckSelection = () => {\r\n const _selection = intersectionWith(data, selection.value, isEqual)\r\n _selection.forEach((row) => {\r\n //@ts-ignore\r\n tableRef.value!.toggleRowSelection(row, false)\r\n })\r\n}\r\n</script>","import { withInstall } from '../_util'\r\n\r\nimport TableSelectPagetable from './TableSelectPagetable.vue'\r\n\r\nexport default withInstall(TableSelectPagetable, {})\r\n"],"names":["style","computed","addUnit","__props","tableRef","useTemplateRef","selection","ref","tags","item","tableselect","visiable","divRef","onMounted","mutations","mutation","target","onSelect","_selection","_row","find","remove","onSelectAll","useTableselect","selectDone","clearSelection","uncheckSelection","watch","nextTick","checkSelection","intersectionWith","isEqual","row","index","withInstall","TableSelectPagetable"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmDM,UAAAA,IAAQC,EAAS,OACZ;AAAA,MACH,OAAOC,EAAQC,EAAA,KAAK;AAAA,MACpB,QAAQD,EAAQC,EAAM,MAAA;AAAA,IAAA,EAE7B,GACKC,IAAWC,EAAe,OAAO,GACjCC,IAAYC,EAAW,CAAA,CAAE,GACzBC,IAAOP,EAAS,MAAMK,EAAU,MAAM,IAAI,CAACG,MAASC,KAAA,gBAAAA,EAAa,IAAID,EAAK,CAAC,GAE3EE,IAAWJ,EAAI,EAAK,GACpBK,IAASP,EAAe,KAAK;AACnC,IAAAQ,EAAU,MAAM;AAaH,MAZQ,IAAI,iBAAiB,CAACC,MAAc;AACvC,QAAAA,EAAA,QAAQ,CAACC,MAAa;AACxB,cAAAA,EAAS,QAAQ,aAAa;AAC9B,kBAAMC,IAASD,EAA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;IACnB,CACH;AAED,UAAMA,IAAiB,MAAM;AAEd,MADQC,EAAiB3B,QAAMG,EAAU,OAAOyB,CAAO,EACvD,QAAQ,CAACC,MAAQ;AAEf,QAAA5B,EAAA,MAAO,mBAAmB4B,GAAK,EAAI;AAAA,MAAA,CAC/C;AAAA,IAAA,GAGCN,IAAmB,MAAM;AAEhB,MADQI,EAAiB3B,QAAMG,EAAU,OAAOyB,CAAO,EACvD,QAAQ,CAACC,MAAQ;AAEf,QAAA5B,EAAA,MAAO,mBAAmB4B,GAAK,EAAK;AAAA,MAAA,CAChD;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IC7ILC,KAAeC,EAAYC,IAAsB,EAAE;"}
@@ -12,7 +12,7 @@ import { tabsRootContextKey as Q } from "./constants.js";
12
12
  import { t as he, r as ye, i as Oe, b as Le, n as Fe, c as Me, d as Ve, e as Z } from "../../index-C9tCD90X.js";
13
13
  import { capitalize as I } from "../_util/strings.js";
14
14
  import { throwError as q } from "../_util/error.js";
15
- import { e as Qe, f as Ue } from "../../index-ChkLOmNK.js";
15
+ import { e as Qe, f as Ue } from "../../index-Bm0F5NQQ.js";
16
16
  import { mutable as We } from "../_util/typescript.js";
17
17
  import { EVENT_CODE as je } from "../_constants/aria.js";
18
18
  import { tabBarProps as De } from "./tab-bar.js";
@@ -1,4 +1,4 @@
1
- import { c as e, s as l, i as s, w as o, a as c, l as n, b as i, d as a } from "../../../index-ChkLOmNK.js";
1
+ import { c as e, s as l, i as s, w as o, a as c, l as n, b as i, d as a } from "../../../index-Bm0F5NQQ.js";
2
2
  import { definePropType as t } from "./props/runtime.js";
3
3
  const f = t([
4
4
  String,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as a, openBlock as _, createElementBlock as r, createElementVNode as e } from "vue";
2
2
  /*! Element Plus Icons Vue v2.3.1 */
3
- var c = /* @__PURE__ */ a({
3
+ var u = /* @__PURE__ */ a({
4
4
  name: "ArrowDown",
5
5
  __name: "arrow-down",
6
6
  setup(t) {
@@ -14,7 +14,7 @@ var c = /* @__PURE__ */ a({
14
14
  })
15
15
  ]));
16
16
  }
17
- }), L = c, u = /* @__PURE__ */ a({
17
+ }), C = u, c = /* @__PURE__ */ a({
18
18
  name: "ArrowLeft",
19
19
  __name: "arrow-left",
20
20
  setup(t) {
@@ -28,7 +28,7 @@ var c = /* @__PURE__ */ a({
28
28
  })
29
29
  ]));
30
30
  }
31
- }), C = u, o = /* @__PURE__ */ a({
31
+ }), M = c, o = /* @__PURE__ */ a({
32
32
  name: "ArrowRight",
33
33
  __name: "arrow-right",
34
34
  setup(t) {
@@ -42,7 +42,7 @@ var c = /* @__PURE__ */ a({
42
42
  })
43
43
  ]));
44
44
  }
45
- }), M = o, p = /* @__PURE__ */ a({
45
+ }), B = o, p = /* @__PURE__ */ a({
46
46
  name: "ArrowUp",
47
47
  __name: "arrow-up",
48
48
  setup(t) {
@@ -56,7 +56,7 @@ var c = /* @__PURE__ */ a({
56
56
  })
57
57
  ]));
58
58
  }
59
- }), B = p, n = /* @__PURE__ */ a({
59
+ }), y = p, n = /* @__PURE__ */ a({
60
60
  name: "CircleCheck",
61
61
  __name: "circle-check",
62
62
  setup(t) {
@@ -74,7 +74,7 @@ var c = /* @__PURE__ */ a({
74
74
  })
75
75
  ]));
76
76
  }
77
- }), y = n, v = /* @__PURE__ */ a({
77
+ }), z = n, v = /* @__PURE__ */ a({
78
78
  name: "CircleCloseFilled",
79
79
  __name: "circle-close-filled",
80
80
  setup(t) {
@@ -88,7 +88,7 @@ var c = /* @__PURE__ */ a({
88
88
  })
89
89
  ]));
90
90
  }
91
- }), z = v, w = /* @__PURE__ */ a({
91
+ }), k = v, w = /* @__PURE__ */ a({
92
92
  name: "CircleClose",
93
93
  __name: "circle-close",
94
94
  setup(t) {
@@ -106,7 +106,7 @@ var c = /* @__PURE__ */ a({
106
106
  })
107
107
  ]));
108
108
  }
109
- }), k = w, i = /* @__PURE__ */ a({
109
+ }), A = w, i = /* @__PURE__ */ a({
110
110
  name: "Close",
111
111
  __name: "close",
112
112
  setup(t) {
@@ -120,7 +120,7 @@ var c = /* @__PURE__ */ a({
120
120
  })
121
121
  ]));
122
122
  }
123
- }), A = i, d = /* @__PURE__ */ a({
123
+ }), F = i, m = /* @__PURE__ */ a({
124
124
  name: "InfoFilled",
125
125
  __name: "info-filled",
126
126
  setup(t) {
@@ -134,7 +134,7 @@ var c = /* @__PURE__ */ a({
134
134
  })
135
135
  ]));
136
136
  }
137
- }), F = d, g = /* @__PURE__ */ a({
137
+ }), V = m, d = /* @__PURE__ */ a({
138
138
  name: "Loading",
139
139
  __name: "loading",
140
140
  setup(t) {
@@ -148,7 +148,21 @@ var c = /* @__PURE__ */ a({
148
148
  })
149
149
  ]));
150
150
  }
151
- }), V = g, f = /* @__PURE__ */ a({
151
+ }), E = d, g = /* @__PURE__ */ a({
152
+ name: "More",
153
+ __name: "more",
154
+ setup(t) {
155
+ return (l, s) => (_(), r("svg", {
156
+ xmlns: "http://www.w3.org/2000/svg",
157
+ viewBox: "0 0 1024 1024"
158
+ }, [
159
+ e("path", {
160
+ fill: "currentColor",
161
+ d: "M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"
162
+ })
163
+ ]));
164
+ }
165
+ }), H = g, f = /* @__PURE__ */ a({
152
166
  name: "Search",
153
167
  __name: "search",
154
168
  setup(t) {
@@ -162,7 +176,7 @@ var c = /* @__PURE__ */ a({
162
176
  })
163
177
  ]));
164
178
  }
165
- }), E = f, m = /* @__PURE__ */ a({
179
+ }), S = f, h = /* @__PURE__ */ a({
166
180
  name: "SuccessFilled",
167
181
  __name: "success-filled",
168
182
  setup(t) {
@@ -176,7 +190,7 @@ var c = /* @__PURE__ */ a({
176
190
  })
177
191
  ]));
178
192
  }
179
- }), H = m, h = /* @__PURE__ */ a({
193
+ }), b = h, x = /* @__PURE__ */ a({
180
194
  name: "WarningFilled",
181
195
  __name: "warning-filled",
182
196
  setup(t) {
@@ -190,20 +204,21 @@ var c = /* @__PURE__ */ a({
190
204
  })
191
205
  ]));
192
206
  }
193
- }), S = h;
207
+ }), j = x;
194
208
  export {
195
- z as a,
196
- y as b,
197
- A as c,
198
- k as d,
199
- C as e,
200
- M as f,
201
- E as g,
202
- B as h,
203
- F as i,
204
- L as j,
205
- V as l,
206
- H as s,
207
- S as w
209
+ k as a,
210
+ z as b,
211
+ F as c,
212
+ A as d,
213
+ M as e,
214
+ B as f,
215
+ S as g,
216
+ y as h,
217
+ V as i,
218
+ C as j,
219
+ E as l,
220
+ H as m,
221
+ b as s,
222
+ j as w
208
223
  };
209
- //# sourceMappingURL=index-ChkLOmNK.js.map
224
+ //# sourceMappingURL=index-Bm0F5NQQ.js.map