@aplus-frontend/ui 6.41.0 → 6.41.2
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/es/src/ap-action/item-dropdown/index.vue.mjs +22 -21
- package/es/src/ap-grid/utils/col.mjs +33 -33
- package/es/src/business/hooks/usePageListAgGrid.d.ts +2 -0
- package/es/src/business/hooks/usePageListAgGrid.mjs +21 -20
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/business/hooks/usePageListAgGrid.d.ts +2 -0
- package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, ref as k, computed as w, createBlock as n, openBlock as r, unref as o, withCtx as l, createElementVNode as u, normalizeClass as s, createVNode as c, normalizeProps as B, guardReactiveProps as A, renderSlot as b, createCommentVNode as C, createElementBlock as I, Fragment as P, renderList as D, mergeProps as m } from "vue";
|
|
2
2
|
import { Dropdown as N, Menu as $, MenuItem as h } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../item/index.vue.mjs";
|
|
4
4
|
import "../item-modal/index.vue2.mjs";
|
|
@@ -7,10 +7,10 @@ import { IconApAdLineDown as L } from "@aplus-frontend/icon";
|
|
|
7
7
|
import "../../config-provider/index.mjs";
|
|
8
8
|
import { isUndefined as V, omit as z } from "lodash-unified";
|
|
9
9
|
import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
-
import
|
|
10
|
+
import d from "../item/index.vue2.mjs";
|
|
11
11
|
import F from "../item-modal/index.vue.mjs";
|
|
12
12
|
import M from "../item-popconfirm/index.vue.mjs";
|
|
13
|
-
const T = /* @__PURE__ */
|
|
13
|
+
const T = /* @__PURE__ */ v({
|
|
14
14
|
name: "ApActionItemDropDown",
|
|
15
15
|
__name: "index",
|
|
16
16
|
props: {
|
|
@@ -28,29 +28,29 @@ const T = /* @__PURE__ */ _({
|
|
|
28
28
|
iconFirst: { type: Boolean },
|
|
29
29
|
tooltip: {}
|
|
30
30
|
},
|
|
31
|
-
setup(
|
|
32
|
-
const f =
|
|
31
|
+
setup(g) {
|
|
32
|
+
const f = g, p = k(!1), { e: i } = E("action-item-dropdown"), y = w(() => f.actions.filter((e) => e.visible || V(e.visible)).map((e) => ({
|
|
33
33
|
...e,
|
|
34
34
|
onAction: async (a) => {
|
|
35
35
|
try {
|
|
36
36
|
await e.onAction?.(a);
|
|
37
37
|
} finally {
|
|
38
|
-
|
|
38
|
+
p.value = !1;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
})));
|
|
42
42
|
return (e, a) => (r(), n(o(N), {
|
|
43
|
-
open:
|
|
44
|
-
"onUpdate:open": a[0] || (a[0] = (t) =>
|
|
43
|
+
open: p.value,
|
|
44
|
+
"onUpdate:open": a[0] || (a[0] = (t) => p.value = t),
|
|
45
45
|
trigger: e.trigger,
|
|
46
46
|
placement: e.placement
|
|
47
47
|
}, {
|
|
48
48
|
overlay: l(() => [
|
|
49
|
-
|
|
49
|
+
c(o($), null, {
|
|
50
50
|
default: l(() => [
|
|
51
|
-
(r(!0), I(P, null, D(
|
|
52
|
-
key:
|
|
53
|
-
class: s(o(
|
|
51
|
+
(r(!0), I(P, null, D(y.value, (t, _) => (r(), n(o(h), {
|
|
52
|
+
key: _,
|
|
53
|
+
class: s(o(i)("item"))
|
|
54
54
|
}, {
|
|
55
55
|
default: l(() => [
|
|
56
56
|
t.modalProps ? (r(), n(F, m({
|
|
@@ -59,7 +59,7 @@ const T = /* @__PURE__ */ _({
|
|
|
59
59
|
}, t), null, 16)) : t.popconfirmProps ? (r(), n(M, m({
|
|
60
60
|
key: 1,
|
|
61
61
|
ref_for: !0
|
|
62
|
-
}, t), null, 16)) : (r(), n(
|
|
62
|
+
}, t), null, 16)) : (r(), n(d, m({
|
|
63
63
|
key: 2,
|
|
64
64
|
ref_for: !0
|
|
65
65
|
}, t), null, 16))
|
|
@@ -71,19 +71,20 @@ const T = /* @__PURE__ */ _({
|
|
|
71
71
|
})
|
|
72
72
|
]),
|
|
73
73
|
default: l(() => [
|
|
74
|
-
|
|
75
|
-
class: s(o(
|
|
74
|
+
u("span", {
|
|
75
|
+
class: s(o(i)("wrapper"))
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
c(d, B(A(o(z)(f, ["actions", "trigger", "placement"]))), {
|
|
78
78
|
default: l(() => [
|
|
79
|
-
|
|
79
|
+
b(e.$slots, "default")
|
|
80
80
|
]),
|
|
81
81
|
_: 3
|
|
82
82
|
}, 16),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
u("span", {
|
|
84
|
+
class: s(o(i)("icon"))
|
|
85
|
+
}, [
|
|
86
|
+
e.showIcon ? (r(), n(o(L), { key: 0 })) : C("", !0)
|
|
87
|
+
], 2)
|
|
87
88
|
], 2)
|
|
88
89
|
]),
|
|
89
90
|
_: 3
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { createVNode as u, Fragment as
|
|
2
|
-
import { isArray as
|
|
3
|
-
import { valueEnumToArray as S, objectToString as $, getTableTitle as
|
|
1
|
+
import { createVNode as u, Fragment as T } from "vue";
|
|
2
|
+
import { isArray as x, isUndefined as E, isString as o, isBoolean as F, isNumber as O, pick as R } from "lodash-unified";
|
|
3
|
+
import { valueEnumToArray as S, objectToString as $, getTableTitle as v, getTableRenderType as V, getTableRenderProps as B, getTableCellRenderNode as M } from "../../ap-table/utils.mjs";
|
|
4
4
|
import { noRenderAsFormItemValueList as _ } from "../../ap-table/constants.mjs";
|
|
5
5
|
import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
|
|
6
6
|
import j from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
|
|
7
|
-
function
|
|
7
|
+
function c(e, t) {
|
|
8
8
|
if (t)
|
|
9
|
-
return
|
|
9
|
+
return x(t) ? t.reduce((r, n) => r?.[n], e) : e?.[t];
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function A(e) {
|
|
12
12
|
if (!E(e))
|
|
13
|
-
return
|
|
13
|
+
return x(e) ? e.reduce((t, r) => o(r) ? `${t}${t ? "." : ""}${r}` : `${t}[${r}]`, "") : String(e);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function N(e) {
|
|
16
16
|
if (e)
|
|
17
17
|
return e === !0 ? "left" : e;
|
|
18
18
|
}
|
|
19
19
|
function q(e) {
|
|
20
|
-
return
|
|
20
|
+
return F(e) ? {
|
|
21
21
|
sortable: e
|
|
22
22
|
} : e ? {
|
|
23
23
|
sortable: !0,
|
|
@@ -29,7 +29,7 @@ function q(e) {
|
|
|
29
29
|
}
|
|
30
30
|
function I(e) {
|
|
31
31
|
let t;
|
|
32
|
-
return
|
|
32
|
+
return F(e.filters) && e.valueEnum ? t = S(e.valueEnum) : t = e.filters, t?.map((r) => ({
|
|
33
33
|
label: o(r.text) ? r.text : "",
|
|
34
34
|
value: r.value
|
|
35
35
|
}));
|
|
@@ -65,10 +65,10 @@ function z(e, t, r) {
|
|
|
65
65
|
}
|
|
66
66
|
return r;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
const n =
|
|
70
|
-
return n.field =
|
|
71
|
-
header: () =>
|
|
68
|
+
function y(e, t, r) {
|
|
69
|
+
const n = R(e, ["width", "minWidth", "align"]);
|
|
70
|
+
return n.field = A(e.dataIndex), n.fixed = N(e.fixed), n.slots = {
|
|
71
|
+
header: () => v(e, r, void 0, t)
|
|
72
72
|
}, n.headerAlign = e.align, n.showOverflow = !1, n.showFooterOverflow = !1, n;
|
|
73
73
|
}
|
|
74
74
|
function D(e, t, r) {
|
|
@@ -88,65 +88,65 @@ const G = ({
|
|
|
88
88
|
}), l = M(s, d, t.record, n), a = r.renderText?.({
|
|
89
89
|
value: e,
|
|
90
90
|
...t
|
|
91
|
-
}) || e, p = r.renderText ? u(
|
|
91
|
+
}) || e, p = r.renderText ? u(T, null, [r.renderText?.({
|
|
92
92
|
value: e,
|
|
93
93
|
...t
|
|
94
94
|
})]) : l;
|
|
95
95
|
let f = i ? z(r, a, p) : p;
|
|
96
96
|
if (r.customRender) {
|
|
97
|
-
const
|
|
97
|
+
const w = r._path || [], h = D(t.record, t.rowIndex, t.params?.rowKey);
|
|
98
98
|
f = r.customRender({
|
|
99
99
|
value: e,
|
|
100
100
|
...t,
|
|
101
101
|
column: r,
|
|
102
102
|
originalNode: f,
|
|
103
103
|
originalText: a,
|
|
104
|
-
path: [...
|
|
104
|
+
path: h && [...w, String(h)]
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
return u(
|
|
107
|
+
return u(T, null, [f]);
|
|
108
108
|
};
|
|
109
|
-
function
|
|
110
|
-
const i =
|
|
111
|
-
i.field =
|
|
109
|
+
function b(e, t, r, n) {
|
|
110
|
+
const i = R(e, ["width", "minWidth", "align", "resizable", "className", "headerClassName", "footerClassName", "treeNode"]);
|
|
111
|
+
i.field = A(e.dataIndex), i.fixed = N(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, q(e.sorter)), i.filters = I(e), i.filterMultiple = e.filterMultiple, i.filterMethod = W(e.onFilter);
|
|
112
112
|
const s = ({
|
|
113
113
|
row: d,
|
|
114
114
|
rowIndex: l
|
|
115
115
|
}) => G({
|
|
116
|
-
value:
|
|
117
|
-
text:
|
|
116
|
+
value: c(d, e.dataIndex),
|
|
117
|
+
text: c(d, e.dataIndex),
|
|
118
118
|
record: d,
|
|
119
119
|
index: l,
|
|
120
120
|
renderIndex: l,
|
|
121
121
|
column: e
|
|
122
122
|
}, e, n);
|
|
123
123
|
return i.slots = {
|
|
124
|
-
header: () =>
|
|
124
|
+
header: () => v(e, r, void 0, t),
|
|
125
125
|
default: s,
|
|
126
126
|
footer: s
|
|
127
127
|
}, e.html && (delete i.slots.default, delete i.slots.footer, i.type = "html"), e.seq && (i.type = "seq", i.slots = {}), i;
|
|
128
128
|
}
|
|
129
129
|
function X(e, t, r, n) {
|
|
130
130
|
if (!e.children?.length)
|
|
131
|
-
return
|
|
131
|
+
return b(e, t, r, n);
|
|
132
132
|
function i(d) {
|
|
133
133
|
return d.map((l) => {
|
|
134
134
|
if (l.children?.length) {
|
|
135
|
-
const a =
|
|
135
|
+
const a = y(l, t, r);
|
|
136
136
|
return a.children = i(l.children), a;
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return b(l, t, r, n);
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
const s =
|
|
141
|
+
const s = y(e, t, r);
|
|
142
142
|
return s.children = i(e.children), s;
|
|
143
143
|
}
|
|
144
144
|
export {
|
|
145
145
|
G as contentCustom,
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
A as dataIndexToField,
|
|
147
|
+
c as getValueByDataIndex,
|
|
148
148
|
X as transformCol,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
N as transformFixed,
|
|
150
|
+
y as transformToColGroup,
|
|
151
|
+
b as transformToColumn
|
|
152
152
|
};
|
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
import { isFunction as
|
|
1
|
+
import { isFunction as A, merge as F, cloneDeep as R } from "lodash-unified";
|
|
2
2
|
import { ref as w } from "vue";
|
|
3
|
-
import { useKeepAliveFlag as
|
|
4
|
-
function
|
|
3
|
+
import { useKeepAliveFlag as V } from "./useKeepAliveFlag.mjs";
|
|
4
|
+
function W(l) {
|
|
5
5
|
const r = w(null), {
|
|
6
6
|
isShowRowSelection: u = !0,
|
|
7
7
|
clearSelectionOnRequest: d = !0,
|
|
8
8
|
transformSearchFormValues: o,
|
|
9
|
-
api:
|
|
10
|
-
tableRefresh:
|
|
9
|
+
api: s,
|
|
10
|
+
tableRefresh: n = !0,
|
|
11
11
|
clearDataOnDeactivated: f = !0,
|
|
12
|
-
|
|
12
|
+
onRef: m,
|
|
13
|
+
...p
|
|
13
14
|
} = l || {};
|
|
14
|
-
let
|
|
15
|
+
let a = null;
|
|
15
16
|
const i = () => {
|
|
16
17
|
r.value?.rowSelection?.clearAll();
|
|
17
18
|
}, c = (e) => {
|
|
18
19
|
r.value?.submitWith(e);
|
|
19
|
-
},
|
|
20
|
+
}, g = () => {
|
|
20
21
|
r.value?.reset();
|
|
21
|
-
}, { isDeactivated: h } =
|
|
22
|
+
}, { isDeactivated: h } = V({
|
|
22
23
|
afterActivated() {
|
|
23
|
-
(
|
|
24
|
+
(A(n) ? n() : n) && c();
|
|
24
25
|
},
|
|
25
26
|
afterDeactivated: c
|
|
26
27
|
});
|
|
27
|
-
return [
|
|
28
|
+
return [F(
|
|
28
29
|
{
|
|
29
30
|
// scroll,tableLayout,columnResizable设置表格可拖动
|
|
30
31
|
columnResizable: !0,
|
|
31
|
-
request:
|
|
32
|
+
request: s ? async (e) => {
|
|
32
33
|
if (h() && f)
|
|
33
34
|
return {
|
|
34
35
|
data: [],
|
|
35
36
|
total: 0
|
|
36
37
|
};
|
|
37
|
-
|
|
38
|
+
a = e.sort, console.log("_sortedInfo", a);
|
|
38
39
|
const t = o ? o(e) : e;
|
|
39
|
-
if (!
|
|
40
|
-
const { records: v, total: S } = await
|
|
40
|
+
if (!s) throw new Error("api is not defined");
|
|
41
|
+
const { records: v, total: S } = await s(t);
|
|
41
42
|
return d && i(), {
|
|
42
43
|
data: v,
|
|
43
44
|
total: S
|
|
@@ -48,15 +49,15 @@ function O(l) {
|
|
|
48
49
|
columnWidth: 38
|
|
49
50
|
} : void 0,
|
|
50
51
|
ref(e) {
|
|
51
|
-
r.value = e;
|
|
52
|
+
r.value = e, m?.(e);
|
|
52
53
|
},
|
|
53
54
|
// 新UI规范,需要都添加分割线
|
|
54
55
|
card: !0
|
|
55
56
|
},
|
|
56
|
-
|
|
57
|
+
p
|
|
57
58
|
), {
|
|
58
59
|
reload: c,
|
|
59
|
-
reset:
|
|
60
|
+
reset: g,
|
|
60
61
|
getSearchFormValues: (e = !0) => {
|
|
61
62
|
const t = r.value?.getSearchFormValues(!!e) || {};
|
|
62
63
|
return o ? o(t) : t;
|
|
@@ -64,11 +65,11 @@ function O(l) {
|
|
|
64
65
|
getAgGridInstance: () => r.value,
|
|
65
66
|
getSearchFormValuesAndSorted: (e = !0) => {
|
|
66
67
|
const t = r.value?.getSearchFormValues(!!e) || {};
|
|
67
|
-
return t.sort =
|
|
68
|
+
return t.sort = a && R(a), o ? o(t) : t;
|
|
68
69
|
},
|
|
69
70
|
clearSelection: i
|
|
70
71
|
}];
|
|
71
72
|
}
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
W as usePageListAgGrid
|
|
74
75
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.41.
|
|
1
|
+
declare const _default: "6.41.2";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");const f=require("@aplus-frontend/icon");require("../../config-provider/index.js");const s=require("lodash-unified"),m=require("../../config-provider/hooks/use-namespace.js"),i=require("../item/index.vue2.js"),_=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),k=e.defineComponent({name:"ApActionItemDropDown",__name:"index",props:{trigger:{default:()=>["hover"]},placement:{default:"bottomLeft"},actions:{default:()=>[]},showIcon:{type:Boolean,default:!0},text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onClick:{},loading:{type:Boolean,default:!1},icon:{},iconFirst:{type:Boolean},tooltip:{}},setup(c){const u=c,n=e.ref(!1),{e:l}=m.useNamespace("action-item-dropdown"),p=e.computed(()=>u.actions.filter(t=>t.visible||s.isUndefined(t.visible)).map(t=>({...t,onAction:async o=>{try{await t.onAction?.(o)}finally{n.value=!1}}})));return(t,o)=>(e.openBlock(),e.createBlock(e.unref(a.Dropdown),{open:n.value,"onUpdate:open":o[0]||(o[0]=r=>n.value=r),trigger:t.trigger,placement:t.placement},{overlay:e.withCtx(()=>[e.createVNode(e.unref(a.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(r,d)=>(e.openBlock(),e.createBlock(e.unref(a.MenuItem),{key:d,class:e.normalizeClass(e.unref(l)("item"))},{default:e.withCtx(()=>[r.modalProps?(e.openBlock(),e.createBlock(_.default,e.mergeProps({key:0,ref_for:!0},r),null,16)):r.popconfirmProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:1,ref_for:!0},r),null,16)):(e.openBlock(),e.createBlock(i.default,e.mergeProps({key:2,ref_for:!0},r),null,16))]),_:2},1032,["class"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("wrapper"))},[e.createVNode(i.default,e.normalizeProps(e.guardReactiveProps(e.unref(s.omit)(u,["actions","trigger","placement"]))),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16),t.showIcon?(e.openBlock(),e.createBlock(e.unref(f.IconApAdLineDown),{key:0
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");const f=require("@aplus-frontend/icon");require("../../config-provider/index.js");const s=require("lodash-unified"),m=require("../../config-provider/hooks/use-namespace.js"),i=require("../item/index.vue2.js"),_=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),k=e.defineComponent({name:"ApActionItemDropDown",__name:"index",props:{trigger:{default:()=>["hover"]},placement:{default:"bottomLeft"},actions:{default:()=>[]},showIcon:{type:Boolean,default:!0},text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onClick:{},loading:{type:Boolean,default:!1},icon:{},iconFirst:{type:Boolean},tooltip:{}},setup(c){const u=c,n=e.ref(!1),{e:l}=m.useNamespace("action-item-dropdown"),p=e.computed(()=>u.actions.filter(t=>t.visible||s.isUndefined(t.visible)).map(t=>({...t,onAction:async o=>{try{await t.onAction?.(o)}finally{n.value=!1}}})));return(t,o)=>(e.openBlock(),e.createBlock(e.unref(a.Dropdown),{open:n.value,"onUpdate:open":o[0]||(o[0]=r=>n.value=r),trigger:t.trigger,placement:t.placement},{overlay:e.withCtx(()=>[e.createVNode(e.unref(a.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(r,d)=>(e.openBlock(),e.createBlock(e.unref(a.MenuItem),{key:d,class:e.normalizeClass(e.unref(l)("item"))},{default:e.withCtx(()=>[r.modalProps?(e.openBlock(),e.createBlock(_.default,e.mergeProps({key:0,ref_for:!0},r),null,16)):r.popconfirmProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:1,ref_for:!0},r),null,16)):(e.openBlock(),e.createBlock(i.default,e.mergeProps({key:2,ref_for:!0},r),null,16))]),_:2},1032,["class"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("wrapper"))},[e.createVNode(i.default,e.normalizeProps(e.guardReactiveProps(e.unref(s.omit)(u,["actions","trigger","placement"]))),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16),e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("icon"))},[t.showIcon?(e.openBlock(),e.createBlock(e.unref(f.IconApAdLineDown),{key:0})):e.createCommentVNode("",!0)],2)],2)]),_:3},8,["open","trigger","placement"]))}});exports.default=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("vue"),l=require("lodash-unified"),u=require("../../ap-table/utils.js"),q=require("../../ap-table/constants.js");require("../../ap-table/components/paragraph-ellipsis/index.vue.js");const A=require("../../ap-table/components/paragraph-ellipsis/index.vue2.js");function p(e,t){if(t)return l.isArray(t)?t.reduce((r,i)=>r?.[i],e):e?.[t]}function y(e){if(!l.isUndefined(e))return l.isArray(e)?e.reduce((t,r)=>l.isString(r)?`${t}${t?".":""}${r}`:`${t}[${r}]`,""):String(e)}function b(e){if(e)return e===!0?"left":e}function N(e){return l.isBoolean(e)?{sortable:e}:e?{sortable:!0,sortType:e?.type,sortBy:e?.by}:{sortable:!1}}function R(e){let t;return l.isBoolean(e.filters)&&e.valueEnum?t=u.valueEnumToArray(e.valueEnum):t=e.filters,t?.map(r=>({label:l.isString(r.text)?r.text:"",value:r.value}))}function _(e){if(e)return t=>e(t.value,t.row)}function V(e,t){return e?l.isNumber(e)?{tooltip:t,rows:e}:e===!0||e==="tooltip"?{tooltip:t,rows:1}:{tooltip:null,rows:1,htmlTitle:e==="title"?t:""}:!1}function O(e,t,r){if(q.noRenderAsFormItemValueList.includes(e.valueType))return r;if(e.copyable||e.ellipsis){const i=V(e.ellipsis,t),n=u.objectToString(t);return f.createVNode(A.default,{rawValue:n,copyable:e.copyable,ellipsis:i,content:r},null)}return r}function c(e,t,r){const i=l.pick(e,["width","minWidth","align"]);return i.field=y(e.dataIndex),i.fixed=b(e.fixed),i.slots={header:()=>u.getTableTitle(e,r,void 0,t)},i.headerAlign=e.align,i.showOverflow=!1,i.showFooterOverflow=!1,i}function g(e,t,r){if(r)return l.isString(r)?e[r]:r(e,t)}const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("vue"),l=require("lodash-unified"),u=require("../../ap-table/utils.js"),q=require("../../ap-table/constants.js");require("../../ap-table/components/paragraph-ellipsis/index.vue.js");const A=require("../../ap-table/components/paragraph-ellipsis/index.vue2.js");function p(e,t){if(t)return l.isArray(t)?t.reduce((r,i)=>r?.[i],e):e?.[t]}function y(e){if(!l.isUndefined(e))return l.isArray(e)?e.reduce((t,r)=>l.isString(r)?`${t}${t?".":""}${r}`:`${t}[${r}]`,""):String(e)}function b(e){if(e)return e===!0?"left":e}function N(e){return l.isBoolean(e)?{sortable:e}:e?{sortable:!0,sortType:e?.type,sortBy:e?.by}:{sortable:!1}}function R(e){let t;return l.isBoolean(e.filters)&&e.valueEnum?t=u.valueEnumToArray(e.valueEnum):t=e.filters,t?.map(r=>({label:l.isString(r.text)?r.text:"",value:r.value}))}function _(e){if(e)return t=>e(t.value,t.row)}function V(e,t){return e?l.isNumber(e)?{tooltip:t,rows:e}:e===!0||e==="tooltip"?{tooltip:t,rows:1}:{tooltip:null,rows:1,htmlTitle:e==="title"?t:""}:!1}function O(e,t,r){if(q.noRenderAsFormItemValueList.includes(e.valueType))return r;if(e.copyable||e.ellipsis){const i=V(e.ellipsis,t),n=u.objectToString(t);return f.createVNode(A.default,{rawValue:n,copyable:e.copyable,ellipsis:i,content:r},null)}return r}function c(e,t,r){const i=l.pick(e,["width","minWidth","align"]);return i.field=y(e.dataIndex),i.fixed=b(e.fixed),i.slots={header:()=>u.getTableTitle(e,r,void 0,t)},i.headerAlign=e.align,i.showOverflow=!1,i.showFooterOverflow=!1,i}function g(e,t,r){if(r)return l.isString(r)?e[r]:r(e,t)}const v=({value:e,...t},r,i,n=!0)=>{const a=u.getTableRenderType(r),d=u.getTableRenderProps({...r,valueType:a},{value:e,...t}),s=u.getTableCellRenderNode(a,d,t.record,i),o=r.renderText?.({value:e,...t})||e,x=r.renderText?f.createVNode(f.Fragment,null,[r.renderText?.({value:e,...t})]):s;let h=n?O(r,o,x):x;if(r.customRender){const S=r._path||[],F=g(t.record,t.rowIndex,t.params?.rowKey);h=r.customRender({value:e,...t,column:r,originalNode:h,originalText:o,path:F&&[...S,String(F)]})}return f.createVNode(f.Fragment,null,[h])};function T(e,t,r,i){const n=l.pick(e,["width","minWidth","align","resizable","className","headerClassName","footerClassName","treeNode"]);n.field=y(e.dataIndex),n.fixed=b(e.fixed),n.headerAlign=e.align,n.footerAlign=e.align,n.showOverflow=!1,n.showFooterOverflow=!1,Object.assign(n,N(e.sorter)),n.filters=R(e),n.filterMultiple=e.filterMultiple,n.filterMethod=_(e.onFilter);const a=({row:d,rowIndex:s})=>v({value:p(d,e.dataIndex),text:p(d,e.dataIndex),record:d,index:s,renderIndex:s,column:e},e,i);return n.slots={header:()=>u.getTableTitle(e,r,void 0,t),default:a,footer:a},e.html&&(delete n.slots.default,delete n.slots.footer,n.type="html"),e.seq&&(n.type="seq",n.slots={}),n}function w(e,t,r,i){if(!e.children?.length)return T(e,t,r,i);function n(d){return d.map(s=>{if(s.children?.length){const o=c(s,t,r);return o.children=n(s.children),o}return T(s,t,r,i)})}const a=c(e,t,r);return a.children=n(e.children),a}exports.contentCustom=v;exports.dataIndexToField=y;exports.getValueByDataIndex=p;exports.transformCol=w;exports.transformFixed=b;exports.transformToColGroup=c;exports.transformToColumn=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lodash-unified"),R=require("vue"),q=require("./useKeepAliveFlag.js");function w(u){const r=R.ref(null),{isShowRowSelection:d=!0,clearSelectionOnRequest:f=!0,transformSearchFormValues:o,api:s,tableRefresh:n=!0,clearDataOnDeactivated:g=!0,onRef:v,...S}=u||{};let a=null;const l=()=>{r.value?.rowSelection?.clearAll()},i=e=>{r.value?.submitWith(e)},h=()=>{r.value?.reset()},{isDeactivated:p}=q.useKeepAliveFlag({afterActivated(){(c.isFunction(n)?n():n)&&i()},afterDeactivated:i}),m=async e=>{if(p()&&g)return{data:[],total:0};a=e.sort,console.log("_sortedInfo",a);const t=o?o(e):e;if(!s)throw new Error("api is not defined");const{records:A,total:F}=await s(t);return f&&l(),{data:A,total:F}};return[c.merge({columnResizable:!0,request:s?m:void 0,rowSelection:d?{fixed:"left",columnWidth:38}:void 0,ref(e){r.value=e,v?.(e)},card:!0},S),{reload:i,reset:h,getSearchFormValues:(e=!0)=>{const t=r.value?.getSearchFormValues(!!e)||{};return o?o(t):t},getAgGridInstance:()=>r.value,getSearchFormValuesAndSorted:(e=!0)=>{const t=r.value?.getSearchFormValues(!!e)||{};return t.sort=a&&c.cloneDeep(a),o?o(t):t},clearSelection:l}]}exports.usePageListAgGrid=w;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.41.
|
|
1
|
+
declare const _default: "6.41.2";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.41.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.41.2";exports.default=e;
|