orion-design 0.1.33 → 0.1.35
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/components/Form/{MultiTableSelect/MultiTableSelect.d.ts → TableSelect/TableSelect.d.ts} +3 -3
- package/dist/components/Form/TableSelect/TableSelect.js +5 -0
- package/dist/components/Form/TableSelect/TableSelect.js.map +1 -0
- package/dist/components/Form/{MultiTableSelect/MultiTableSelect.vue.d.ts → TableSelect/TableSelect.vue.d.ts} +3 -3
- package/dist/components/Form/TableSelect/hooks/useTableSelect.d.ts +1 -0
- package/dist/components/Form/TableSelect/hooks/useTableSelect.js +9 -0
- package/dist/components/Form/TableSelect/hooks/useTableSelect.js.map +1 -0
- package/dist/components/Form/TableSelect/index.d.ts +2 -0
- package/dist/components/Form/TableSelect/index.js +7 -0
- package/dist/components/Form/index.d.ts +3 -3
- package/dist/components/Form/index.js +19 -20
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/LovTable/LovPagetable.vue.d.ts +8 -2
- package/dist/components/LovTable/index.d.ts +4 -1
- package/dist/components/Pagetable/Pagetable.d.ts +2 -1
- package/dist/components/Pagetable/index.d.ts +2 -1
- package/dist/components/Pagetable/index.js +302 -288
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/{MultiTableSelectPagetable/MultiTableSelectPagetable.vue.d.ts → TableSelectPagetable/TableSelectPagetable.vue.d.ts} +10 -2
- package/dist/components/{MultiTableSelectPagetable → TableSelectPagetable}/index.d.ts +5 -1
- package/dist/components/TableSelectPagetable/index.js +168 -0
- package/dist/components/TableSelectPagetable/index.js.map +1 -0
- package/dist/components/components.d.ts +1 -1
- package/dist/components/components.js +13 -13
- package/dist/components/index.js +18 -18
- package/dist/{components-DP9bnDLm.js → components-BJrXhY2G.js} +11 -11
- package/dist/{components-DP9bnDLm.js.map → components-BJrXhY2G.js.map} +1 -1
- package/dist/index.js +17 -17
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +1 -1
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Form/MultiTableSelect/MultiTableSelect.js +0 -5
- package/dist/components/Form/MultiTableSelect/MultiTableSelect.js.map +0 -1
- package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.d.ts +0 -1
- package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js +0 -9
- package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js.map +0 -1
- package/dist/components/Form/MultiTableSelect/index.d.ts +0 -2
- package/dist/components/Form/MultiTableSelect/index.js +0 -7
- package/dist/components/MultiTableSelectPagetable/index.js +0 -164
- package/dist/components/MultiTableSelectPagetable/index.js.map +0 -1
- /package/dist/components/Form/{MultiTableSelect → TableSelect}/index.js.map +0 -0
@@ -1,27 +1,27 @@
|
|
1
|
-
import { default as
|
2
|
-
import { T as r } from "../components-
|
1
|
+
import { default as a } from "./Button/index.js";
|
2
|
+
import { T as r } from "../components-BJrXhY2G.js";
|
3
3
|
import { S as l } from "../index-BbsXWo7C.js";
|
4
4
|
import { Colflex as m, Flexitem as p, Rowflex as s } from "./Flex/index.js";
|
5
|
-
import { default as
|
5
|
+
import { default as u } from "./Tabs/index.js";
|
6
6
|
import { default as T } from "./Pagetable/index.js";
|
7
|
-
import { default as
|
8
|
-
import { default as
|
9
|
-
import { default as
|
7
|
+
import { default as P } from "./Querytable/index.js";
|
8
|
+
import { default as c } from "./Modal/index.js";
|
9
|
+
import { default as i } from "./Form/index.js";
|
10
10
|
import { default as C } from "./LovTable/index.js";
|
11
|
-
import { default as
|
11
|
+
import { default as h } from "./TableSelectPagetable/index.js";
|
12
12
|
export {
|
13
|
-
|
13
|
+
a as Button,
|
14
14
|
m as Colflex,
|
15
15
|
p as Flexitem,
|
16
|
-
|
16
|
+
i as Form,
|
17
17
|
C as LovTable,
|
18
|
-
|
19
|
-
M as MultiTableSelectPagetable,
|
18
|
+
c as Modal,
|
20
19
|
T as Pagetable,
|
21
|
-
|
20
|
+
P as Querytable,
|
22
21
|
s as Rowflex,
|
23
22
|
l as Space,
|
24
|
-
|
23
|
+
h as TableSelectPagetable,
|
24
|
+
u as Tabs,
|
25
25
|
r as ThroneContextProvider
|
26
26
|
};
|
27
27
|
//# sourceMappingURL=components.js.map
|
package/dist/components/index.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
import { c as t } from "../components-
|
2
|
-
import { T as
|
3
|
-
import { default as
|
1
|
+
import { c as t } from "../components-BJrXhY2G.js";
|
2
|
+
import { T as x } from "../components-BJrXhY2G.js";
|
3
|
+
import { default as p } from "./Modal/useModal.js";
|
4
4
|
import { default as n } from "./Form/index.js";
|
5
5
|
import { default as c } from "./Button/index.js";
|
6
6
|
import { S as i } from "../index-BbsXWo7C.js";
|
7
7
|
import { Colflex as C, Flexitem as v, Rowflex as y } from "./Flex/index.js";
|
8
|
-
import { default as
|
9
|
-
import { default as
|
10
|
-
import { default as
|
11
|
-
import { default as
|
8
|
+
import { default as P } from "./Tabs/index.js";
|
9
|
+
import { default as h } from "./Pagetable/index.js";
|
10
|
+
import { default as K } from "./Querytable/index.js";
|
11
|
+
import { default as M } from "./Modal/index.js";
|
12
12
|
import { default as j } from "./LovTable/index.js";
|
13
|
-
import { default as w } from "./
|
13
|
+
import { default as w } from "./TableSelectPagetable/index.js";
|
14
14
|
import { formContextKey as E } from "./Form/Form.js";
|
15
15
|
import { default as R } from "./Form/LovInput/hooks/useLov.js";
|
16
16
|
import { lovContextKey as z } from "./Form/LovInput/LovInput.js";
|
17
|
-
import { default as D } from "./Form/
|
18
|
-
import {
|
17
|
+
import { default as D } from "./Form/TableSelect/hooks/useTableSelect.js";
|
18
|
+
import { tableSelectContext as H } from "./Form/TableSelect/TableSelect.js";
|
19
19
|
const f = function(e) {
|
20
20
|
return Object.keys(t).forEach((r) => {
|
21
21
|
const o = t[r];
|
@@ -28,20 +28,20 @@ export {
|
|
28
28
|
v as Flexitem,
|
29
29
|
n as Form,
|
30
30
|
j as LovTable,
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
F as Querytable,
|
31
|
+
M as Modal,
|
32
|
+
h as Pagetable,
|
33
|
+
K as Querytable,
|
35
34
|
y as Rowflex,
|
36
35
|
i as Space,
|
37
|
-
|
38
|
-
|
36
|
+
w as TableSelectPagetable,
|
37
|
+
P as Tabs,
|
38
|
+
x as ThroneContextProvider,
|
39
39
|
E as formContextKey,
|
40
40
|
f as install,
|
41
41
|
z as lovContextKey,
|
42
|
-
H as
|
42
|
+
H as tableSelectContext,
|
43
43
|
R as useLov,
|
44
|
-
|
44
|
+
p as useOModal,
|
45
45
|
D as useTableselect
|
46
46
|
};
|
47
47
|
//# sourceMappingURL=index.js.map
|
@@ -1,21 +1,21 @@
|
|
1
1
|
import r from "./components/Button/index.js";
|
2
2
|
import { defineComponent as t, renderSlot as n } from "vue";
|
3
|
-
import { objectType as
|
4
|
-
import { provideThroneContext as
|
3
|
+
import { objectType as m } from "./components/_util/type.js";
|
4
|
+
import { provideThroneContext as i } from "./Throne/hooks/use-throne-context.js";
|
5
5
|
import "lodash-es";
|
6
6
|
import { withInstall as p } from "./components/_util/vue/install.js";
|
7
7
|
import "element-plus";
|
8
|
-
import { S as
|
9
|
-
import { Colflex as
|
8
|
+
import { S as f } from "./index-BbsXWo7C.js";
|
9
|
+
import { Colflex as l, Flexitem as a, Rowflex as d } from "./components/Flex/index.js";
|
10
10
|
import x from "./components/Tabs/index.js";
|
11
11
|
import s from "./components/Pagetable/index.js";
|
12
12
|
import c from "./components/Querytable/index.js";
|
13
13
|
import T from "./components/Modal/index.js";
|
14
14
|
import b from "./components/Form/index.js";
|
15
15
|
import u from "./components/LovTable/index.js";
|
16
|
-
import P from "./components/
|
16
|
+
import P from "./components/TableSelectPagetable/index.js";
|
17
17
|
const h = () => ({
|
18
|
-
context:
|
18
|
+
context: m()
|
19
19
|
}), v = /* @__PURE__ */ t({
|
20
20
|
name: "OThroneContextProvider",
|
21
21
|
inheritAttrs: !1,
|
@@ -23,21 +23,21 @@ const h = () => ({
|
|
23
23
|
setup(o, {
|
24
24
|
slots: e
|
25
25
|
}) {
|
26
|
-
return
|
26
|
+
return i(o), () => n(e, "default");
|
27
27
|
}
|
28
28
|
}), C = p(v), R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
29
29
|
__proto__: null,
|
30
30
|
Button: r,
|
31
|
-
Colflex:
|
31
|
+
Colflex: l,
|
32
32
|
Flexitem: a,
|
33
33
|
Form: b,
|
34
34
|
LovTable: u,
|
35
35
|
Modal: T,
|
36
|
-
MultiTableSelectPagetable: P,
|
37
36
|
Pagetable: s,
|
38
37
|
Querytable: c,
|
39
38
|
Rowflex: d,
|
40
|
-
Space:
|
39
|
+
Space: f,
|
40
|
+
TableSelectPagetable: P,
|
41
41
|
Tabs: x,
|
42
42
|
ThroneContextProvider: C
|
43
43
|
}, Symbol.toStringTag, { value: "Module" }));
|
@@ -45,4 +45,4 @@ export {
|
|
45
45
|
C as T,
|
46
46
|
R as c
|
47
47
|
};
|
48
|
-
//# sourceMappingURL=components-
|
48
|
+
//# sourceMappingURL=components-BJrXhY2G.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"components-
|
1
|
+
{"version":3,"file":"components-BJrXhY2G.js","sources":["../src/components/Throne/ThroneContextProvider.tsx"],"sourcesContent":["import { defineComponent, renderSlot, watch, provide, computed } from 'vue'\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\n\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../_util/type'\n\nimport { provideThroneContext } from '../../Throne/hooks/use-throne-context'\n\nimport { withInstall } from '../_util'\n\nexport const throneContextProviderProps = () => ({\n context: objectType<Record<string, any>>(),\n})\n\nexport type ThroneContextProviderProps = Partial<ExtractPropTypes<ReturnType<typeof throneContextProviderProps>>>\n\nexport type ThroneContextProviderContext = Partial<ThroneContextProviderProps>\n\nconst ThroneContextProvider = defineComponent({\n name: 'OThroneContextProvider',\n inheritAttrs: false,\n props: throneContextProviderProps(),\n setup(props, { slots }) {\n provideThroneContext(props)\n return () => {\n return renderSlot(slots, 'default')\n }\n },\n})\n\nexport default withInstall<typeof ThroneContextProvider, {}>(ThroneContextProvider)\n"],"names":["throneContextProviderProps","context","objectType","ThroneContextProvider","defineComponent","name","inheritAttrs","props","setup","slots","provideThroneContext","renderSlot","withInstall"],"mappings":";;;;;;;;;;;;;;;;AASO,MAAMA,IAA6BA,OAAO;AAAA,EAC/CC,SAASC,EAAgC;AAC3C,IAMMC,IAAwBC,gBAAAA,EAAgB;AAAA,EAC5CC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOP,EAA4B;AAAA,EACnCQ,MAAMD,GAAO;AAAA,IAAEE,OAAAA;AAAAA,EAAM,GAAG;AACtBC,WAAAA,EAAqBH,CAAK,GACnB,MACEI,EAAWF,GAAO,SAAS;AAAA,EAEtC;AACF,CAAC,GAEcG,IAAAA,EAA8CT,CAAqB;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
@@ -1,48 +1,48 @@
|
|
1
|
-
import { default as
|
1
|
+
import { default as r } from "./error/OrionError.js";
|
2
2
|
import { default as a } from "./Throne/index.js";
|
3
3
|
import { useThroneContext as l } from "./Throne/hooks/use-throne-context.js";
|
4
4
|
import { install as m } from "./components/index.js";
|
5
5
|
import { default as p } from "./version/version.js";
|
6
6
|
import { default as d } from "./components/Modal/useModal.js";
|
7
|
-
import { default as
|
8
|
-
import { default as
|
7
|
+
import { default as b } from "./components/Form/LovInput/hooks/useLov.js";
|
8
|
+
import { default as C } from "./components/Form/TableSelect/hooks/useTableSelect.js";
|
9
9
|
import { default as v } from "./components/Button/index.js";
|
10
|
-
import { T as S } from "./components-
|
10
|
+
import { T as S } from "./components-BJrXhY2G.js";
|
11
11
|
import { S as y } from "./index-BbsXWo7C.js";
|
12
|
-
import { Colflex as
|
13
|
-
import { default as
|
12
|
+
import { Colflex as g, Flexitem as F, Rowflex as K } from "./components/Flex/index.js";
|
13
|
+
import { default as M } from "./components/Tabs/index.js";
|
14
14
|
import { default as w } from "./components/Pagetable/index.js";
|
15
15
|
import { default as E } from "./components/Querytable/index.js";
|
16
16
|
import { default as R } from "./components/Modal/index.js";
|
17
17
|
import { default as k } from "./components/Form/index.js";
|
18
18
|
import { default as z } from "./components/LovTable/index.js";
|
19
|
-
import { default as D } from "./components/
|
19
|
+
import { default as D } from "./components/TableSelectPagetable/index.js";
|
20
20
|
import { formContextKey as H } from "./components/Form/Form.js";
|
21
21
|
import { lovContextKey as J } from "./components/Form/LovInput/LovInput.js";
|
22
|
-
import {
|
22
|
+
import { tableSelectContext as U } from "./components/Form/TableSelect/TableSelect.js";
|
23
23
|
export {
|
24
24
|
v as Button,
|
25
|
-
|
26
|
-
|
25
|
+
g as Colflex,
|
26
|
+
F as Flexitem,
|
27
27
|
k as Form,
|
28
28
|
z as LovTable,
|
29
29
|
R as Modal,
|
30
|
-
|
31
|
-
t as OrionError,
|
30
|
+
r as OrionError,
|
32
31
|
w as Pagetable,
|
33
32
|
E as Querytable,
|
34
|
-
|
33
|
+
K as Rowflex,
|
35
34
|
y as Space,
|
36
|
-
|
35
|
+
D as TableSelectPagetable,
|
36
|
+
M as Tabs,
|
37
37
|
a as Throne,
|
38
38
|
S as ThroneContextProvider,
|
39
39
|
H as formContextKey,
|
40
40
|
m as install,
|
41
41
|
J as lovContextKey,
|
42
|
-
U as
|
43
|
-
|
42
|
+
U as tableSelectContext,
|
43
|
+
b as useLov,
|
44
44
|
d as useOModal,
|
45
|
-
|
45
|
+
C as useTableselect,
|
46
46
|
l as useThroneContext,
|
47
47
|
p as version
|
48
48
|
};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "0.1.
|
1
|
+
declare const _default: "0.1.35";
|
2
2
|
export default _default;
|
package/dist/version/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.
|
1
|
+
{"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.35';"],"names":["version"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MultiTableSelect.js","sources":["../../../../src/components/Form/MultiTableSelect/MultiTableSelect.ts"],"sourcesContent":["import { InjectionKey, Ref } from 'vue'\r\nimport { FormItemRule, Arrayable } from '../Form'\r\n\r\nexport interface MultiTableSelectProps {\r\n name: string\r\n label?: string\r\n span?: number\r\n labelWidth?: string | number\r\n required?: boolean\r\n rules?: Arrayable<FormItemRule>\r\n maxlength?: string | number\r\n placeholder?: string\r\n disabled?: boolean\r\n readonly?: boolean\r\n pick: string | string[]\r\n tag: (row: any) => string\r\n}\r\n\r\nexport type RowCompletionProvider = (data: any[] | undefined) => Promise<any[] | undefined>\r\n\r\nexport interface MultiTableSelectContext {\r\n inputValue: any\r\n selection: any[] | undefined\r\n onSelect: (selection: any[], clear?: boolean) => void\r\n selectDone: () => void\r\n tag: (row: any) => string\r\n registerRowCompletionProvider: (provider: RowCompletionProvider) => void\r\n}\r\n\r\nexport const multiTableSelectContext: InjectionKey<MultiTableSelectContext> = Symbol('multiTableSelectContext')\r\n"],"names":["multiTableSelectContext"],"mappings":"AA6Ba,MAAAA,IAAiE,OAAO,yBAAyB;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function useMultiTableSelect(): import('..').MultiTableSelectContext | undefined;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useMultiTableSelect.js","sources":["../../../../../src/components/Form/MultiTableSelect/hooks/useMultiTableSelect.ts"],"sourcesContent":["import { inject } from 'vue'\r\nimport { multiTableSelectContext } from '../MultiTableSelect'\r\n\r\nexport default function useMultiTableSelect() {\r\n return inject(multiTableSelectContext)\r\n}\r\n"],"names":["useMultiTableSelect","inject","multiTableSelectContext"],"mappings":";;AAGA,SAAwBA,IAAsB;AAC5C,SAAOC,EAAOC,CAAuB;AACvC;"}
|
@@ -1,164 +0,0 @@
|
|
1
|
-
import { intersectionWith as b, isEqual as S, find as c, remove as x } from "lodash-es";
|
2
|
-
import { defineComponent as I, computed as y, useTemplateRef as L, ref as O, watch as k, nextTick as U, resolveComponent as u, openBlock as f, createBlock as w, normalizeStyle as W, withCtx as l, createVNode as n, unref as r, createElementBlock as m, Fragment as E, renderList as T, createTextVNode as d, toDisplayString as C, mergeProps as j, renderSlot as G } from "vue";
|
3
|
-
import { withInstall as H } from "../_util/vue/install.js";
|
4
|
-
import { ElTooltip as J, ElTag as z, ElScrollbar as K } from "element-plus";
|
5
|
-
import Q from "../Pagetable/index.js";
|
6
|
-
import { addUnit as P } from "../_util/dom/style.js";
|
7
|
-
import X from "../Form/MultiTableSelect/hooks/useMultiTableSelect.js";
|
8
|
-
const Y = { style: { margin: "5px", display: "inline-block" } }, Z = /* @__PURE__ */ I({
|
9
|
-
name: "OTableselectPagetable",
|
10
|
-
inheritAttrs: !0,
|
11
|
-
__name: "MultiTableSelectPagetable",
|
12
|
-
props: {
|
13
|
-
data: {},
|
14
|
-
width: { default: 600 },
|
15
|
-
height: { default: 300 }
|
16
|
-
},
|
17
|
-
setup(i) {
|
18
|
-
const R = y(() => ({
|
19
|
-
width: P(i.width),
|
20
|
-
height: P(i.height)
|
21
|
-
})), g = L("table"), o = O([]), h = y(() => o.value.map((a) => e == null ? void 0 : e.tag(a))), B = (a, t) => {
|
22
|
-
c(a, t) ? c(o.value, t) || o.value.push(t) : c(o.value, t) && x(o.value, t), e == null || e.onSelect(o.value);
|
23
|
-
}, D = (a) => {
|
24
|
-
a.length > 0 ? a.forEach((t) => {
|
25
|
-
c(o.value, t) || o.value.push(t);
|
26
|
-
}) : x(o.value, (t) => c(i.data, t)), e == null || e.onSelect(o.value);
|
27
|
-
}, e = X(), A = () => {
|
28
|
-
e == null || e.selectDone();
|
29
|
-
}, M = () => {
|
30
|
-
N(), o.value = [], e == null || e.onSelect([], !0);
|
31
|
-
};
|
32
|
-
k(
|
33
|
-
() => i.data,
|
34
|
-
async () => {
|
35
|
-
i.data.length > 0 && (await U(), v());
|
36
|
-
}
|
37
|
-
), k(() => e == null ? void 0 : e.selection, () => {
|
38
|
-
e != null && e.selection && e.selection.length > 0 && (o.value = e.selection, v());
|
39
|
-
});
|
40
|
-
const v = () => {
|
41
|
-
b(i.data, o.value, S).forEach((t) => {
|
42
|
-
g.value.toggleRowSelection(t, !0);
|
43
|
-
});
|
44
|
-
}, N = () => {
|
45
|
-
b(i.data, o.value, S).forEach((t) => {
|
46
|
-
g.value.toggleRowSelection(t, !1);
|
47
|
-
});
|
48
|
-
};
|
49
|
-
return (a, t) => {
|
50
|
-
const V = u("o-space"), s = u("o-flexitem"), _ = u("o-button"), $ = u("o-buttongroup"), q = u("o-rowflex"), F = u("o-colflex");
|
51
|
-
return f(), w(F, {
|
52
|
-
style: W(R.value)
|
53
|
-
}, {
|
54
|
-
default: l(() => [
|
55
|
-
n(s, { "flex-basic": "need" }, {
|
56
|
-
default: l(() => [
|
57
|
-
n(q, null, {
|
58
|
-
default: l(() => [
|
59
|
-
n(s, { style: { overflow: "hidden", padding: "5px" } }, {
|
60
|
-
default: l(() => [
|
61
|
-
n(r(J), {
|
62
|
-
effect: "light",
|
63
|
-
teleported: !1
|
64
|
-
}, {
|
65
|
-
default: l(() => [
|
66
|
-
n(V, null, {
|
67
|
-
default: l(() => [
|
68
|
-
(f(!0), m(E, null, T(h.value, (p) => (f(), w(r(z), { type: "info" }, {
|
69
|
-
default: l(() => [
|
70
|
-
d(C(p), 1)
|
71
|
-
]),
|
72
|
-
_: 2
|
73
|
-
}, 1024))), 256))
|
74
|
-
]),
|
75
|
-
_: 1
|
76
|
-
})
|
77
|
-
]),
|
78
|
-
content: l(() => [
|
79
|
-
n(r(K), { "max-height": "100" }, {
|
80
|
-
default: l(() => [
|
81
|
-
(f(!0), m(E, null, T(h.value, (p) => (f(), m("div", Y, [
|
82
|
-
n(r(z), { type: "info" }, {
|
83
|
-
default: l(() => [
|
84
|
-
d(C(p), 1)
|
85
|
-
]),
|
86
|
-
_: 2
|
87
|
-
}, 1024)
|
88
|
-
]))), 256))
|
89
|
-
]),
|
90
|
-
_: 1
|
91
|
-
})
|
92
|
-
]),
|
93
|
-
_: 1
|
94
|
-
})
|
95
|
-
]),
|
96
|
-
_: 1
|
97
|
-
}),
|
98
|
-
n(s, {
|
99
|
-
"flex-basic": "need",
|
100
|
-
style: { padding: "5px" }
|
101
|
-
}, {
|
102
|
-
default: l(() => [
|
103
|
-
n($, null, {
|
104
|
-
default: l(() => [
|
105
|
-
n(_, {
|
106
|
-
type: "primary",
|
107
|
-
size: "small",
|
108
|
-
onClick: A
|
109
|
-
}, {
|
110
|
-
default: l(() => t[0] || (t[0] = [
|
111
|
-
d("确定")
|
112
|
-
])),
|
113
|
-
_: 1
|
114
|
-
}),
|
115
|
-
n(_, {
|
116
|
-
size: "small",
|
117
|
-
onClick: M
|
118
|
-
}, {
|
119
|
-
default: l(() => t[1] || (t[1] = [
|
120
|
-
d("清空")
|
121
|
-
])),
|
122
|
-
_: 1
|
123
|
-
})
|
124
|
-
]),
|
125
|
-
_: 1
|
126
|
-
})
|
127
|
-
]),
|
128
|
-
_: 1
|
129
|
-
})
|
130
|
-
]),
|
131
|
-
_: 1
|
132
|
-
})
|
133
|
-
]),
|
134
|
-
_: 1
|
135
|
-
}),
|
136
|
-
n(s, null, {
|
137
|
-
default: l(() => [
|
138
|
-
n(r(Q), j({
|
139
|
-
ref: "table",
|
140
|
-
data: a.data,
|
141
|
-
"selection-mode": "",
|
142
|
-
size: "small",
|
143
|
-
"pagination-teleported": !1,
|
144
|
-
onSelect: B,
|
145
|
-
onSelectAll: D
|
146
|
-
}, a.$attrs), {
|
147
|
-
default: l(() => [
|
148
|
-
G(a.$slots, "default")
|
149
|
-
]),
|
150
|
-
_: 3
|
151
|
-
}, 16, ["data"])
|
152
|
-
]),
|
153
|
-
_: 3
|
154
|
-
})
|
155
|
-
]),
|
156
|
-
_: 3
|
157
|
-
}, 8, ["style"]);
|
158
|
-
};
|
159
|
-
}
|
160
|
-
}), ue = H(Z, {});
|
161
|
-
export {
|
162
|
-
ue as default
|
163
|
-
};
|
164
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/MultiTableSelectPagetable/MultiTableSelectPagetable.vue","../../../src/components/MultiTableSelectPagetable/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 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 <div v-for=\"tag in tags\" style=\"margin: 5px;display: inline-block;\">\r\n <el-tag type=\"info\">{{ tag }}</el-tag>\r\n </div>\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\nimport { computed, nextTick, ref, useTemplateRef, watch } from 'vue'\r\nimport { find, intersectionWith, isEqual, remove } from 'lodash-es';\r\nimport { addUnit } from '../_util';\r\nimport useMultiTableSelect from '../Form/MultiTableSelect/hooks/useMultiTableSelect'\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 tableSelection = ref<any[]>([])\r\nconst tags = computed(() => tableSelection.value.map((item) => mtselect?.tag(item)))\r\n\r\nconst onSelect = (selection: any[], row: any) => {\r\n if (find(selection, row)) {\r\n if (!find(tableSelection.value, row)) {\r\n tableSelection.value.push(row)\r\n }\r\n } else {\r\n if (find(tableSelection.value, row)) {\r\n remove(tableSelection.value, row)\r\n }\r\n }\r\n mtselect?.onSelect(tableSelection.value)\r\n}\r\nconst onSelectAll = (selection: any[]) => {\r\n if (selection.length > 0) {\r\n selection.forEach((item) => {\r\n if (!find(tableSelection.value, item)) {\r\n tableSelection.value.push(item)\r\n }\r\n })\r\n } else {\r\n remove(tableSelection.value, (item) => find(data, item))\r\n }\r\n mtselect?.onSelect(tableSelection.value)\r\n}\r\n\r\nconst mtselect = useMultiTableSelect()\r\nconst selectDone = () => {\r\n mtselect?.selectDone()\r\n}\r\nconst clearSelection = () => {\r\n uncheckSelection()\r\n tableSelection.value = []\r\n mtselect?.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(() => mtselect?.selection, () => {\r\n if (mtselect?.selection && mtselect.selection.length > 0) {\r\n tableSelection.value = mtselect.selection\r\n checkSelection()\r\n }\r\n})\r\n\r\nconst checkSelection = () => {\r\n const selection = intersectionWith(data, tableSelection.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, tableSelection.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 MultiTableSelectPagetable from './MultiTableSelectPagetable.vue'\r\n\r\nexport default withInstall(MultiTableSelectPagetable, {})\r\n"],"names":["style","computed","addUnit","__props","tableRef","useTemplateRef","tableSelection","ref","tags","item","mtselect","onSelect","selection","row","find","remove","onSelectAll","useMultiTableSelect","selectDone","clearSelection","uncheckSelection","watch","nextTick","checkSelection","intersectionWith","isEqual","index","withInstall","MultiTableSelectPagetable"],"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,IAAiBC,EAAW,CAAA,CAAE,GAC9BC,IAAOP,EAAS,MAAMK,EAAe,MAAM,IAAI,CAACG,MAASC,KAAA,gBAAAA,EAAU,IAAID,EAAK,CAAC,GAE7EE,IAAW,CAACC,GAAkBC,MAAa;AACzC,MAAAC,EAAKF,GAAWC,CAAG,IACdC,EAAKR,EAAe,OAAOO,CAAG,KAChBP,EAAA,MAAM,KAAKO,CAAG,IAG7BC,EAAKR,EAAe,OAAOO,CAAG,KACvBE,EAAAT,EAAe,OAAOO,CAAG,GAG9BH,KAAA,QAAAA,EAAA,SAASJ,EAAe;AAAA,IAAK,GAErCU,IAAc,CAACJ,MAAqB;AAClC,MAAAA,EAAU,SAAS,IACTA,EAAA,QAAQ,CAACH,MAAS;AACxB,QAAKK,EAAKR,EAAe,OAAOG,CAAI,KACjBH,EAAA,MAAM,KAAKG,CAAI;AAAA,MAClC,CACH,IAEMM,EAAAT,EAAe,OAAO,CAACG,MAASK,EAAKX,EAAA,MAAMM,CAAI,CAAC,GAEjDC,KAAA,QAAAA,EAAA,SAASJ,EAAe;AAAA,IAAK,GAGrCI,IAAWO,KACXC,IAAa,MAAM;AACrB,MAAAR,KAAA,QAAAA,EAAU;AAAA,IAAW,GAEnBS,IAAiB,MAAM;AACR,MAAAC,KACjBd,EAAe,QAAQ,IACbI,KAAA,QAAAA,EAAA,SAAS,IAAI;AAAA,IAAI;AAG/B,IAAAW;AAAA,MACI,MAAMlB,EAAI;AAAA,MACV,YAAY;AACJ,QAAAA,EAAI,KAAC,SAAS,MACd,MAAMmB,EAAS,GACAC;MAEvB;AAAA,IAAA,GAEEF,EAAA,MAAMX,KAAA,gBAAAA,EAAU,WAAW,MAAM;AACnC,MAAIA,KAAA,QAAAA,EAAU,aAAaA,EAAS,UAAU,SAAS,MACnDJ,EAAe,QAAQI,EAAS,WACjBa;IACnB,CACH;AAED,UAAMA,IAAiB,MAAM;AAEf,MADQC,EAAiBrB,EAAA,MAAMG,EAAe,OAAOmB,CAAO,EAC5D,QAAQ,CAACZ,MAAQ;AAEd,QAAAT,EAAA,MAAO,mBAAmBS,GAAK,EAAI;AAAA,MAAA,CAC/C;AAAA,IAAA,GAGCO,IAAmB,MAAM;AAEjB,MADQI,EAAiBrB,EAAA,MAAMG,EAAe,OAAOmB,CAAO,EAC5D,QAAQ,CAACZ,MAAQ;AAEd,QAAAT,EAAA,MAAO,mBAAmBS,GAAK,EAAK;AAAA,MAAA,CAChD;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICrHLa,KAAeC,EAAYC,GAA2B,EAAE;"}
|
File without changes
|