@aplus-frontend/ui 6.39.1 → 6.39.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-form/modal-form/index.vue.d.ts +1 -9
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +23 -23
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -9
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
- package/theme/ag-grid-modal/index.css +1 -0
- package/theme/ag-grid-modal/index.less +1 -0
- package/theme/index.css +1 -0
|
@@ -912,15 +912,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
|
|
|
912
912
|
type: PropType<string | number | Partial<Record< Breakpoint, string | number>>>;
|
|
913
913
|
default: string | number | Partial<Record< Breakpoint, string | number>>;
|
|
914
914
|
};
|
|
915
|
-
footer:
|
|
916
|
-
type: PropType< VueNode | ((params: {
|
|
917
|
-
originNode: VueNode;
|
|
918
|
-
extra: {
|
|
919
|
-
okBtn: VueNode;
|
|
920
|
-
cancelBtn: VueNode;
|
|
921
|
-
};
|
|
922
|
-
}) => VueNode)>;
|
|
923
|
-
};
|
|
915
|
+
footer: VueTypeValidableDef<any>;
|
|
924
916
|
okText: VueTypeValidableDef<any>;
|
|
925
917
|
okType: PropType<LegacyButtonType>;
|
|
926
918
|
cancelText: VueTypeValidableDef<any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as E, ref as d, unref as r, computed as G, h as H, createBlock as
|
|
2
|
-
import { message as R, Modal as
|
|
1
|
+
import { defineComponent as E, ref as d, unref as r, computed as G, h as H, createBlock as w, openBlock as g, mergeProps as m, withCtx as k, createCommentVNode as U, createVNode as h, resolveDynamicComponent as q } from "vue";
|
|
2
|
+
import { message as R, Modal as V } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { ApTable as
|
|
5
|
-
import { cloneDeep as
|
|
4
|
+
import { ApTable as $ } from "../../ap-table/index.mjs";
|
|
5
|
+
import { cloneDeep as j, omit as T } from "lodash-unified";
|
|
6
6
|
import { transformTableParams as z } from "@aplus-frontend/utils";
|
|
7
7
|
import "./modal-title.vue.mjs";
|
|
8
8
|
import { AsyncOpenResultError as y } from "./interface.mjs";
|
|
@@ -38,7 +38,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
38
38
|
afterOpenChange: {},
|
|
39
39
|
centered: { type: Boolean, default: void 0 },
|
|
40
40
|
width: {},
|
|
41
|
-
footer: {
|
|
41
|
+
footer: {},
|
|
42
42
|
okText: {},
|
|
43
43
|
okType: {},
|
|
44
44
|
cancelText: {},
|
|
@@ -65,10 +65,10 @@ const ue = /* @__PURE__ */ E({
|
|
|
65
65
|
},
|
|
66
66
|
emits: ["finish"],
|
|
67
67
|
setup(S, { expose: B, emit: P }) {
|
|
68
|
-
const e = S, M = P, s = d(!1), v = d({}), i = d(null), a = d([]),
|
|
68
|
+
const e = S, M = P, s = d(!1), v = d({}), i = d(null), a = d([]), C = d();
|
|
69
69
|
let f = null, u = null;
|
|
70
|
-
const { t:
|
|
71
|
-
switch (a.value = [...t], s.value = !0, v.value = o?.extraParams,
|
|
70
|
+
const { t: b } = W(), K = async (t = [], o = {}) => {
|
|
71
|
+
switch (a.value = [...t], s.value = !0, v.value = o?.extraParams, C.value = o.apTableDataSources || e.apTableProps?.dataSource, o.refreshMode || "reset") {
|
|
72
72
|
case "reset":
|
|
73
73
|
i.value?.reset();
|
|
74
74
|
break;
|
|
@@ -99,7 +99,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
if (e.getRowKey) {
|
|
102
|
-
const t =
|
|
102
|
+
const t = j(r(a)), o = t.map(e.getRowKey);
|
|
103
103
|
if (e.onOk && await e.onOk({
|
|
104
104
|
keys: o,
|
|
105
105
|
rows: t
|
|
@@ -122,7 +122,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
122
122
|
onSelectAll(o, n) {
|
|
123
123
|
if (n.length > e.maxCount) {
|
|
124
124
|
R.warning(
|
|
125
|
-
|
|
125
|
+
b("ap.apTableModal.messageMaxCount", {
|
|
126
126
|
maxCount: e.maxCount
|
|
127
127
|
})
|
|
128
128
|
);
|
|
@@ -130,7 +130,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
130
130
|
}
|
|
131
131
|
const l = i.value?.dataSource;
|
|
132
132
|
if (o) {
|
|
133
|
-
const c = r(l).filter((p) => !a.value.some((
|
|
133
|
+
const c = r(l).filter((p) => !a.value.some((F) => t(F) === t(p)));
|
|
134
134
|
a.value = a.value.concat(c);
|
|
135
135
|
} else
|
|
136
136
|
a.value = a.value?.filter((c) => !l.some((p) => t(p) === t(c)));
|
|
@@ -139,7 +139,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
139
139
|
if (n) {
|
|
140
140
|
if (a.value.length >= e.maxCount) {
|
|
141
141
|
R.warning(
|
|
142
|
-
|
|
142
|
+
b("ap.apTableModal.messageMaxCount", {
|
|
143
143
|
maxCount: e.maxCount
|
|
144
144
|
})
|
|
145
145
|
);
|
|
@@ -159,7 +159,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
159
159
|
}),
|
|
160
160
|
...e.rowSelection || {}
|
|
161
161
|
};
|
|
162
|
-
}),
|
|
162
|
+
}), D = () => e.isRenderModalTitleSuffix ? H(
|
|
163
163
|
J,
|
|
164
164
|
{
|
|
165
165
|
title: e.title,
|
|
@@ -169,9 +169,9 @@ const ue = /* @__PURE__ */ E({
|
|
|
169
169
|
{
|
|
170
170
|
default: e.renderModalTitleSuffix ?? void 0
|
|
171
171
|
}
|
|
172
|
-
) : e.title,
|
|
172
|
+
) : e.title, L = () => i.value, N = () => {
|
|
173
173
|
a.value = [];
|
|
174
|
-
},
|
|
174
|
+
}, A = (t) => {
|
|
175
175
|
const o = e.getRowKey;
|
|
176
176
|
if (!o) return;
|
|
177
177
|
const n = a.value.findIndex(
|
|
@@ -182,8 +182,8 @@ const ue = /* @__PURE__ */ E({
|
|
|
182
182
|
return B({
|
|
183
183
|
open: K,
|
|
184
184
|
close: x,
|
|
185
|
-
getApTableInstance:
|
|
186
|
-
}), (t, o) => (
|
|
185
|
+
getApTableInstance: L
|
|
186
|
+
}), (t, o) => (g(), w(r(V), m(
|
|
187
187
|
{
|
|
188
188
|
open: s.value,
|
|
189
189
|
"onUpdate:open": o[0] || (o[0] = (n) => s.value = n)
|
|
@@ -203,21 +203,21 @@ const ue = /* @__PURE__ */ E({
|
|
|
203
203
|
"tableLayoutConfig"
|
|
204
204
|
]),
|
|
205
205
|
{
|
|
206
|
-
title:
|
|
206
|
+
title: D(),
|
|
207
207
|
centered: e.centered ?? !0,
|
|
208
208
|
onOk: _,
|
|
209
209
|
onCancel: x
|
|
210
210
|
}
|
|
211
211
|
), {
|
|
212
212
|
default: k(() => [
|
|
213
|
-
e.renderHeader ? (
|
|
213
|
+
e.renderHeader ? (g(), w(q(e.renderHeader), { key: 0 })) : U("", !0),
|
|
214
214
|
h(Q, m(e.tableLayoutConfig || {}, {
|
|
215
215
|
"selected-list": a.value,
|
|
216
|
-
onClear:
|
|
217
|
-
onDeleteItem:
|
|
216
|
+
onClear: N,
|
|
217
|
+
onDeleteItem: A
|
|
218
218
|
}), {
|
|
219
219
|
default: k(() => [
|
|
220
|
-
h(r(
|
|
220
|
+
h(r($), m({
|
|
221
221
|
ref_key: "apTableRef",
|
|
222
222
|
ref: i,
|
|
223
223
|
scroll: { y: 450 },
|
|
@@ -226,7 +226,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
226
226
|
request: O,
|
|
227
227
|
"row-key": t.getRowKey,
|
|
228
228
|
"row-selection": I.value,
|
|
229
|
-
"data-source":
|
|
229
|
+
"data-source": C.value,
|
|
230
230
|
"search-form": {
|
|
231
231
|
sortable: !1,
|
|
232
232
|
countPerRow: 2
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.39.
|
|
1
|
+
declare const _default: "6.39.2";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -912,15 +912,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
|
|
|
912
912
|
type: PropType<string | number | Partial<Record< Breakpoint, string | number>>>;
|
|
913
913
|
default: string | number | Partial<Record< Breakpoint, string | number>>;
|
|
914
914
|
};
|
|
915
|
-
footer:
|
|
916
|
-
type: PropType< VueNode | ((params: {
|
|
917
|
-
originNode: VueNode;
|
|
918
|
-
extra: {
|
|
919
|
-
okBtn: VueNode;
|
|
920
|
-
cancelBtn: VueNode;
|
|
921
|
-
};
|
|
922
|
-
}) => VueNode)>;
|
|
923
|
-
};
|
|
915
|
+
footer: VueTypeValidableDef<any>;
|
|
924
916
|
okText: VueTypeValidableDef<any>;
|
|
925
917
|
okType: PropType<LegacyButtonType>;
|
|
926
918
|
cancelText: VueTypeValidableDef<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),p=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const O=require("../../ap-table/index.js"),m=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),p=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const O=require("../../ap-table/index.js"),m=require("lodash-unified"),I=require("@aplus-frontend/utils");require("./modal-title.vue.js");const y=require("./interface.js");require("./table-layout/index.vue.js");const A=require("../../config-provider/hooks/use-locale.js"),L=require("./modal-title.vue2.js"),N=require("./table-layout/index.vue2.js"),D=t.defineComponent({__name:"table-modal",props:{columns:{},getRowKey:{},api:{type:Function,default:async()=>({records:[],total:0})},apTableProps:{},maxCount:{default:1/0},isRenderModalTitleSuffix:{type:Boolean,default:!0},renderModalTitleSuffix:{},disabledCheckbox:{type:[Boolean,Function]},rowSelection:{},tableLayoutConfig:{},renderHeader:{},onOk:{},prefixCls:{},confirmLoading:{type:Boolean,default:void 0},title:{},closable:{type:Boolean,default:void 0},closeIcon:{},onCancel:{},"onUpdate:visible":{},"onUpdate:open":{},onChange:{},afterClose:{},afterOpenChange:{},centered:{type:Boolean,default:void 0},width:{},footer:{},okText:{},okType:{},cancelText:{},icon:{},maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:{},cancelButtonProps:{},destroyOnClose:{type:Boolean,default:void 0},wrapClassName:{},maskTransitionName:{},transitionName:{},getContainer:{type:[String,Boolean,Function],default:void 0},zIndex:{},bodyStyle:{},maskStyle:{},mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:{},focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:{},mousePosition:{},loading:{type:Boolean}},emits:["finish"],setup(g,{expose:w,emit:k}){const e=g,h=k,s=t.ref(!1),v=t.ref({}),u=t.ref(null),n=t.ref([]),C=t.ref();let d=null,i=null;const{t:b}=A.useLocale(),R=async(o=[],a={})=>{switch(n.value=[...o],s.value=!0,v.value=a?.extraParams,C.value=a.apTableDataSources||e.apTableProps?.dataSource,a.refreshMode||"reset"){case"reset":u.value?.reset();break;case"submit":u.value?.submit();break;case"none":break}return new Promise((l,r)=>{d=l,i=r})},x=()=>{s.value=!1,d=null,i?.(y.AsyncOpenResultError.ModalCancel),i=null},T=async o=>{o=I.transformTableParams({...o,...v.value});const a=e.api,{records:l,total:r}=await a(o);return{data:l,total:r}},S=async()=>{if(n.value.length>e.maxCount){i?.(y.AsyncOpenResultError.ExceedMaxCount);return}if(e.getRowKey){const o=m.cloneDeep(t.unref(n)),a=o.map(e.getRowKey);if(e.onOk&&await e.onOk({keys:a,rows:o})===!1)return;h("finish",a,o),d?.({keys:a,rows:o})}else{i?.(y.AsyncOpenResultError.NotFineGetRowKey);return}s.value=!1},_=t.computed(()=>{if(!e.getRowKey)return;const o=e.getRowKey;return{fixed:!0,selectedRowKeys:n.value.map(o),columnWidth:50,preserveSelectedRowKeys:!0,onSelectAll(a,l){if(l.length>e.maxCount){p.message.warning(b("ap.apTableModal.messageMaxCount",{maxCount:e.maxCount}));return}const r=u.value?.dataSource;if(a){const c=t.unref(r).filter(f=>!n.value.some(K=>o(K)===o(f)));n.value=n.value.concat(c)}else n.value=n.value?.filter(c=>!r.some(f=>o(f)===o(c)))},onSelect(a,l){if(l){if(n.value.length>=e.maxCount){p.message.warning(b("ap.apTableModal.messageMaxCount",{maxCount:e.maxCount}));return}e.rowSelection?.type==="radio"?n.value=[a]:n.value.push(a)}else{const r=n.value.findIndex(c=>o(a)===o(c));n.value.splice(r,1)}},getCheckboxProps:a=>({disabled:typeof e.disabledCheckbox=="function"?e.disabledCheckbox(a,n.value):e.disabledCheckbox}),...e.rowSelection||{}}}),B=()=>e.isRenderModalTitleSuffix?t.h(L.default,{title:e.title,count:n.value.length||0,maxCount:e.maxCount},{default:e.renderModalTitleSuffix??void 0}):e.title,P=()=>u.value,M=()=>{n.value=[]},q=o=>{const a=e.getRowKey;if(!a)return;const l=n.value.findIndex(r=>a(o)===a(r));n.value.splice(l,1)};return w({open:R,close:x,getApTableInstance:P}),(o,a)=>(t.openBlock(),t.createBlock(t.unref(p.Modal),t.mergeProps({open:s.value,"onUpdate:open":a[0]||(a[0]=l=>s.value=l)},t.unref(m.omit)(e,["api","getRowKey","centered","apTableProps","onOk","maxCount","title","renderModalTitleSuffix","isRenderModalTitleSuffix","rowSelection","disabledCheckbox","tableLayoutConfig"]),{title:B(),centered:e.centered??!0,onOk:S,onCancel:x}),{default:t.withCtx(()=>[e.renderHeader?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderHeader),{key:0})):t.createCommentVNode("",!0),t.createVNode(N.default,t.mergeProps(e.tableLayoutConfig||{},{"selected-list":n.value,onClear:M,onDeleteItem:q}),{default:t.withCtx(()=>[t.createVNode(t.unref(O.ApTable),t.mergeProps({ref_key:"apTableRef",ref:u,scroll:{y:450},style:{padding:"0px"},columns:o.columns,request:T,"row-key":o.getRowKey,"row-selection":_.value,"data-source":C.value,"search-form":{sortable:!1,countPerRow:2}},t.unref(m.omit)(e.apTableProps,"dataSource")),null,16,["columns","row-key","row-selection","data-source"])]),_:1},16,["selected-list"])]),_:1},16,["open","title","centered"]))}});exports.default=D;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.39.
|
|
1
|
+
declare const _default: "6.39.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.39.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.39.2";exports.default=e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "6.39.
|
|
3
|
+
"version": "6.39.2",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@aplus-frontend/hooks": "1.0.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@aplus-frontend/antdv": "^1.2.
|
|
45
|
-
"@aplus-frontend/icon": "^1.2
|
|
44
|
+
"@aplus-frontend/antdv": "^1.2.16",
|
|
45
|
+
"@aplus-frontend/icon": "^1.3.2",
|
|
46
46
|
"@aplus-frontend/oss": "^1.1.2",
|
|
47
47
|
"vue": "^3.5.17",
|
|
48
48
|
"vxe-table": "^4.13.37"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@aplus-frontend/antdv": "^1.2.
|
|
52
|
-
"@aplus-frontend/icon": "^1.2
|
|
51
|
+
"@aplus-frontend/antdv": "^1.2.16",
|
|
52
|
+
"@aplus-frontend/icon": "^1.3.2",
|
|
53
53
|
"@aplus-frontend/oss": "^1.1.2",
|
|
54
54
|
"@types/sortablejs": "^1.15.8",
|
|
55
55
|
"@vue/test-utils": "^2.4.6",
|
package/theme/index.css
CHANGED
|
@@ -5079,6 +5079,7 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
|
|
|
5079
5079
|
flex-grow: 1;
|
|
5080
5080
|
height: 0;
|
|
5081
5081
|
overflow-y: hidden;
|
|
5082
|
+
padding-top: 8px;
|
|
5082
5083
|
}
|
|
5083
5084
|
.aplus-ag-grid-modal--table-layout-right-content:hover {
|
|
5084
5085
|
overflow-y: auto;
|