@aplus-frontend/ui 6.41.2 → 6.41.3
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/business/hooks/usePageListAgGrid.d.ts +0 -2
- package/es/src/business/hooks/usePageListAgGrid.mjs +24 -24
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/business/hooks/usePageListAgGrid.d.ts +0 -2
- 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,44 +1,43 @@
|
|
|
1
|
-
import { isFunction as
|
|
2
|
-
import { ref as
|
|
3
|
-
import { useKeepAliveFlag as
|
|
4
|
-
function
|
|
5
|
-
const r =
|
|
1
|
+
import { isFunction as g, merge as A, cloneDeep as F } from "lodash-unified";
|
|
2
|
+
import { ref as V } from "vue";
|
|
3
|
+
import { useKeepAliveFlag as w } from "./useKeepAliveFlag.mjs";
|
|
4
|
+
function O(l) {
|
|
5
|
+
const r = V(null), {
|
|
6
6
|
isShowRowSelection: u = !0,
|
|
7
7
|
clearSelectionOnRequest: d = !0,
|
|
8
8
|
transformSearchFormValues: o,
|
|
9
|
-
api:
|
|
10
|
-
tableRefresh:
|
|
9
|
+
api: a,
|
|
10
|
+
tableRefresh: s = !0,
|
|
11
11
|
clearDataOnDeactivated: f = !0,
|
|
12
|
-
|
|
13
|
-
...p
|
|
12
|
+
...m
|
|
14
13
|
} = l || {};
|
|
15
|
-
let
|
|
14
|
+
let n = null;
|
|
16
15
|
const i = () => {
|
|
17
16
|
r.value?.rowSelection?.clearAll();
|
|
18
17
|
}, c = (e) => {
|
|
19
18
|
r.value?.submitWith(e);
|
|
20
|
-
},
|
|
19
|
+
}, p = () => {
|
|
21
20
|
r.value?.reset();
|
|
22
|
-
}, { isDeactivated: h } =
|
|
21
|
+
}, { isDeactivated: h } = w({
|
|
23
22
|
afterActivated() {
|
|
24
|
-
(
|
|
23
|
+
(g(s) ? s() : s) && c();
|
|
25
24
|
},
|
|
26
25
|
afterDeactivated: c
|
|
27
26
|
});
|
|
28
|
-
return [
|
|
27
|
+
return [A(
|
|
29
28
|
{
|
|
30
29
|
// scroll,tableLayout,columnResizable设置表格可拖动
|
|
31
30
|
columnResizable: !0,
|
|
32
|
-
request:
|
|
31
|
+
request: a ? async (e) => {
|
|
33
32
|
if (h() && f)
|
|
34
33
|
return {
|
|
35
34
|
data: [],
|
|
36
35
|
total: 0
|
|
37
36
|
};
|
|
38
|
-
|
|
37
|
+
n = e.sort;
|
|
39
38
|
const t = o ? o(e) : e;
|
|
40
|
-
if (!
|
|
41
|
-
const { records: v, total: S } = await
|
|
39
|
+
if (!a) throw new Error("api is not defined");
|
|
40
|
+
const { records: v, total: S } = await a(t);
|
|
42
41
|
return d && i(), {
|
|
43
42
|
data: v,
|
|
44
43
|
total: S
|
|
@@ -48,16 +47,17 @@ function W(l) {
|
|
|
48
47
|
fixed: "left",
|
|
49
48
|
columnWidth: 38
|
|
50
49
|
} : void 0,
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
/** Jackie 推荐方法 */
|
|
51
|
+
onVnodeBeforeMount(e) {
|
|
52
|
+
r.value = e.component?.exposed;
|
|
53
53
|
},
|
|
54
54
|
// 新UI规范,需要都添加分割线
|
|
55
55
|
card: !0
|
|
56
56
|
},
|
|
57
|
-
|
|
57
|
+
m
|
|
58
58
|
), {
|
|
59
59
|
reload: c,
|
|
60
|
-
reset:
|
|
60
|
+
reset: p,
|
|
61
61
|
getSearchFormValues: (e = !0) => {
|
|
62
62
|
const t = r.value?.getSearchFormValues(!!e) || {};
|
|
63
63
|
return o ? o(t) : t;
|
|
@@ -65,11 +65,11 @@ function W(l) {
|
|
|
65
65
|
getAgGridInstance: () => r.value,
|
|
66
66
|
getSearchFormValuesAndSorted: (e = !0) => {
|
|
67
67
|
const t = r.value?.getSearchFormValues(!!e) || {};
|
|
68
|
-
return t.sort =
|
|
68
|
+
return t.sort = n && F(n), o ? o(t) : t;
|
|
69
69
|
},
|
|
70
70
|
clearSelection: i
|
|
71
71
|
}];
|
|
72
72
|
}
|
|
73
73
|
export {
|
|
74
|
-
|
|
74
|
+
O as usePageListAgGrid
|
|
75
75
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.41.
|
|
1
|
+
declare const _default: "6.41.3";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -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"),F=require("vue"),V=require("./useKeepAliveFlag.js");function q(l){const r=F.ref(null),{isShowRowSelection:d=!0,clearSelectionOnRequest:f=!0,transformSearchFormValues:o,api:a,tableRefresh:s=!0,clearDataOnDeactivated:g=!0,...v}=l||{};let n=null;const u=()=>{r.value?.rowSelection?.clearAll()},i=e=>{r.value?.submitWith(e)},p=()=>{r.value?.reset()},{isDeactivated:S}=V.useKeepAliveFlag({afterActivated(){(c.isFunction(s)?s():s)&&i()},afterDeactivated:i}),h=async e=>{if(S()&&g)return{data:[],total:0};n=e.sort;const t=o?o(e):e;if(!a)throw new Error("api is not defined");const{records:m,total:A}=await a(t);return f&&u(),{data:m,total:A}};return[c.merge({columnResizable:!0,request:a?h:void 0,rowSelection:d?{fixed:"left",columnWidth:38}:void 0,onVnodeBeforeMount(e){r.value=e.component?.exposed},card:!0},v),{reload:i,reset:p,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=n&&c.cloneDeep(n),o?o(t):t},clearSelection:u}]}exports.usePageListAgGrid=q;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.41.
|
|
1
|
+
declare const _default: "6.41.3";
|
|
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.3";exports.default=e;
|