@aplus-frontend/ui 6.41.1 → 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/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/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,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 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;
|