@aplus-frontend/ui 0.4.32 → 0.4.33
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-modal/utils/createModal.mjs +36 -26
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/package.json +3 -3
- package/theme/antd-global-overwrite/admin/index.css +1 -1
- package/theme/antd-global-overwrite/admin/modal.css +1 -1
- package/theme/antd-global-overwrite/admin/modal.less +1 -1
- package/theme/antd-global-overwrite/aplus/index.css +1 -1
- package/theme/antd-global-overwrite/aplus/modal.css +1 -1
- package/theme/antd-global-overwrite/aplus/modal.less +1 -1
- package/theme/ap-form/ap-form-item.css +3 -0
- package/theme/ap-form/ap-form-item.less +9 -0
- package/theme/ap-form/index.css +3 -0
- package/theme/ap-form/search-form.css +3 -0
- package/theme/ap-table/ap-table.css +3 -0
- package/theme/ap-table-modal/index.css +3 -0
- package/theme/editable-table/index.css +3 -0
- package/theme/index.css +3 -0
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import { render as
|
|
2
|
-
import { Modal as
|
|
3
|
-
import { ConfigProvider as P, globalConfigCached as
|
|
1
|
+
import { render as u, defineComponent as w, createVNode as f, mergeProps as y, h as k } from "vue";
|
|
2
|
+
import { Modal as b } from "@aplus-frontend/antdv";
|
|
3
|
+
import { ConfigProvider as P, globalConfigCached as N } from "../../config-provider/config-provider.mjs";
|
|
4
4
|
import { omit as L } from "lodash-unified";
|
|
5
|
-
import { isNumeric as
|
|
6
|
-
|
|
5
|
+
import { isNumeric as E } from "@aplus-frontend/utils";
|
|
6
|
+
import "../../config-provider/index.mjs";
|
|
7
|
+
import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
const z = (d) => {
|
|
7
9
|
let n, t;
|
|
8
10
|
const {
|
|
9
11
|
destroyOnClose: c = !0,
|
|
10
|
-
wrapperOffset:
|
|
11
|
-
} = d
|
|
12
|
+
wrapperOffset: r = !1
|
|
13
|
+
} = d, {
|
|
14
|
+
b: h
|
|
15
|
+
} = H("ap-modal");
|
|
12
16
|
function l() {
|
|
13
17
|
n && n(!1), setTimeout(() => {
|
|
14
18
|
var e;
|
|
15
|
-
|
|
19
|
+
u(null, s), (e = s.parentElement) == null || e.removeChild(s);
|
|
16
20
|
}, 500);
|
|
17
21
|
}
|
|
18
|
-
function
|
|
22
|
+
function C() {
|
|
19
23
|
n && n(!0);
|
|
20
24
|
}
|
|
21
25
|
function m() {
|
|
22
26
|
n && n(!1);
|
|
23
27
|
}
|
|
24
|
-
function
|
|
28
|
+
function g(e) {
|
|
25
29
|
t && t(e);
|
|
26
30
|
}
|
|
27
|
-
const
|
|
31
|
+
const O = /* @__PURE__ */ w({
|
|
28
32
|
data() {
|
|
29
33
|
return {
|
|
30
34
|
open: c,
|
|
@@ -43,20 +47,20 @@ const V = (d) => {
|
|
|
43
47
|
},
|
|
44
48
|
methods: {
|
|
45
49
|
async handleCancel() {
|
|
46
|
-
var e, o,
|
|
50
|
+
var e, o, a, i, p;
|
|
47
51
|
if ((e = this.props) != null && e.onCancel) {
|
|
48
|
-
const v = ((i = (
|
|
52
|
+
const v = ((i = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : i.exposed) ?? void 0;
|
|
49
53
|
await ((p = this.props) == null ? void 0 : p.onCancel(v));
|
|
50
54
|
}
|
|
51
55
|
c ? l() : m();
|
|
52
56
|
},
|
|
53
57
|
async handleOk() {
|
|
54
|
-
var e, o,
|
|
58
|
+
var e, o, a, i;
|
|
55
59
|
try {
|
|
56
60
|
if (t({
|
|
57
61
|
confirmLoading: !0
|
|
58
62
|
}), (e = this.props) != null && e.onOk) {
|
|
59
|
-
const p = ((i = (
|
|
63
|
+
const p = ((i = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : i.exposed) ?? void 0;
|
|
60
64
|
await this.props.onOk(p);
|
|
61
65
|
}
|
|
62
66
|
t({
|
|
@@ -71,8 +75,12 @@ const V = (d) => {
|
|
|
71
75
|
},
|
|
72
76
|
render() {
|
|
73
77
|
const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
|
|
74
|
-
return f(P,
|
|
75
|
-
default: () => [f(
|
|
78
|
+
return f(P, N.value, {
|
|
79
|
+
default: () => [f(b, y({
|
|
80
|
+
class: {
|
|
81
|
+
[h()]: !0,
|
|
82
|
+
[h("wrapper")]: r
|
|
83
|
+
},
|
|
76
84
|
open: this.open,
|
|
77
85
|
onCancel: this.handleCancel,
|
|
78
86
|
onOk: this.handleOk
|
|
@@ -80,23 +88,25 @@ const V = (d) => {
|
|
|
80
88
|
default: () => {
|
|
81
89
|
var o;
|
|
82
90
|
return [f("div", {
|
|
83
|
-
style:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
style: Object.assign({
|
|
92
|
+
padding: "0 20px"
|
|
93
|
+
}, r === !1 ? {} : {
|
|
94
|
+
maxHeight: `${window.innerHeight - (r === !0 ? 100 : E(r) ? Number(r) : 100) * 2}px`,
|
|
95
|
+
overflow: "hidden auto"
|
|
96
|
+
})
|
|
87
97
|
}, [(o = this.props) == null ? void 0 : o.content])];
|
|
88
98
|
}
|
|
89
99
|
})]
|
|
90
100
|
});
|
|
91
101
|
}
|
|
92
|
-
}),
|
|
93
|
-
return
|
|
102
|
+
}), x = d.getContainer || document.body, s = document.createElement("div");
|
|
103
|
+
return x.appendChild(s), u(k(O), s), {
|
|
94
104
|
destroy: l,
|
|
95
|
-
update:
|
|
96
|
-
open:
|
|
105
|
+
update: g,
|
|
106
|
+
open: C,
|
|
97
107
|
close: m
|
|
98
108
|
};
|
|
99
109
|
};
|
|
100
110
|
export {
|
|
101
|
-
|
|
111
|
+
z as createModal
|
|
102
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),b=require("@aplus-frontend/antdv"),m=require("../../config-provider/config-provider.js"),q=require("lodash-unified"),w=require("@aplus-frontend/utils");require("../../config-provider/index.js");const x=require("../../config-provider/hooks/use-namespace.js"),N=p=>{let t,r;const{destroyOnClose:l=!0,wrapperOffset:s=!1}=p,{b:h}=x.useNamespace("ap-modal");function u(){t&&t(!1),setTimeout(()=>{var e;o.render(null,a),(e=a.parentElement)==null||e.removeChild(a)},500)}function g(){t&&t(!0)}function f(){t&&t(!1)}function C(e){r&&r(e)}const v=o.defineComponent({data(){return{open:l,props:p}},created(){t=e=>{this.open=e},r=e=>{this.props={...this.props,...e}}},methods:{async handleCancel(){var e,n,i,d,c;if((e=this.props)!=null&&e.onCancel){const y=((d=(i=(n=this.props)==null?void 0:n.content)==null?void 0:i.component)==null?void 0:d.exposed)??void 0;await((c=this.props)==null?void 0:c.onCancel(y))}l?u():f()},async handleOk(){var e,n,i,d;try{if(r({confirmLoading:!0}),(e=this.props)!=null&&e.onOk){const c=((d=(i=(n=this.props)==null?void 0:n.content)==null?void 0:i.component)==null?void 0:d.exposed)??void 0;await this.props.onOk(c)}r({confirmLoading:!1}),l?u():f()}catch{r({confirmLoading:!1})}}},render(){const e=q.omit(this.props,["onCancel","onOk","open","onUpdate:open","getContainer","icon"]);return o.createVNode(m.ConfigProvider,m.globalConfigCached.value,{default:()=>[o.createVNode(b.Modal,o.mergeProps({class:{[h()]:!0,[h("wrapper")]:s},open:this.open,onCancel:this.handleCancel,onOk:this.handleOk},e),{default:()=>{var n;return[o.createVNode("div",{style:Object.assign({padding:"0 20px"},s===!1?{}:{maxHeight:`${window.innerHeight-(s===!0?100:w.isNumeric(s)?Number(s):100)*2}px`,overflow:"hidden auto"})},[(n=this.props)==null?void 0:n.content])]}})]})}}),O=p.getContainer||document.body,a=document.createElement("div");return O.appendChild(a),o.render(o.h(v),a),{destroy:u,update:C,open:g,close:f}};exports.createModal=N;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.33",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"sortablejs": "^1.15.2",
|
|
66
66
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
67
67
|
"vuedraggable": "^4.1.0",
|
|
68
|
-
"@aplus-frontend/
|
|
69
|
-
"@aplus-frontend/
|
|
68
|
+
"@aplus-frontend/hooks": "1.0.7",
|
|
69
|
+
"@aplus-frontend/utils": "1.0.51"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@aplus-frontend/antdv": "^1.0.12",
|
|
@@ -205,7 +205,7 @@ div[class$='-basic-table-form-container ap-table--sticky'] form[class$='-basic-f
|
|
|
205
205
|
line-height: 24px;
|
|
206
206
|
}
|
|
207
207
|
.ant-modal-root .ant-modal .ant-modal-content .ant-modal-body {
|
|
208
|
-
padding: 20px !important;
|
|
208
|
+
padding: 20px 0 !important;
|
|
209
209
|
}
|
|
210
210
|
.ant-modal-root .ant-modal .ant-modal-content .ant-modal-body > .scrollbar {
|
|
211
211
|
padding: 0;
|
|
@@ -229,7 +229,7 @@ div[class$='-basic-table-form-container ap-table--sticky'] form[class$='-basic-f
|
|
|
229
229
|
line-height: 24px;
|
|
230
230
|
}
|
|
231
231
|
.ant-modal-root .ant-modal .ant-modal-content .ant-modal-body {
|
|
232
|
-
padding: 20px !important;
|
|
232
|
+
padding: 20px 0 !important;
|
|
233
233
|
}
|
|
234
234
|
.ant-modal-root .ant-modal .ant-modal-content .ant-modal-body > .scrollbar {
|
|
235
235
|
padding: 0;
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
.aplus-ap-form-item--bordered .ant-picker {
|
|
17
17
|
padding: 0;
|
|
18
18
|
}
|
|
19
|
+
.aplus-ap-form-item--bordered .ant-form-item-control-input-content > .ant-input-group > .ant-picker-range:nth-child(1) .ant-picker-clear {
|
|
20
|
+
inset-inline-end: 0;
|
|
21
|
+
}
|
|
19
22
|
.aplus-ap-form-item--bordered .ant-space-compact-block .ant-input {
|
|
20
23
|
padding-left: 11px;
|
|
21
24
|
}
|
|
@@ -21,6 +21,15 @@
|
|
|
21
21
|
.ant-picker {
|
|
22
22
|
padding: 0;
|
|
23
23
|
}
|
|
24
|
+
.ant-form-item-control-input-content {
|
|
25
|
+
& > .ant-input-group {
|
|
26
|
+
& > .ant-picker-range:nth-child(1){
|
|
27
|
+
.ant-picker-clear {
|
|
28
|
+
inset-inline-end: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
24
33
|
.ant-space-compact-block {
|
|
25
34
|
.ant-input {
|
|
26
35
|
padding-left: 11px;
|
package/theme/ap-form/index.css
CHANGED
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
.aplus-ap-form-item--bordered .ant-picker {
|
|
26
26
|
padding: 0;
|
|
27
27
|
}
|
|
28
|
+
.aplus-ap-form-item--bordered .ant-form-item-control-input-content > .ant-input-group > .ant-picker-range:nth-child(1) .ant-picker-clear {
|
|
29
|
+
inset-inline-end: 0;
|
|
30
|
+
}
|
|
28
31
|
.aplus-ap-form-item--bordered .ant-space-compact-block .ant-input {
|
|
29
32
|
padding-left: 11px;
|
|
30
33
|
}
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
.aplus-ap-form-item--bordered .ant-picker {
|
|
17
17
|
padding: 0;
|
|
18
18
|
}
|
|
19
|
+
.aplus-ap-form-item--bordered .ant-form-item-control-input-content > .ant-input-group > .ant-picker-range:nth-child(1) .ant-picker-clear {
|
|
20
|
+
inset-inline-end: 0;
|
|
21
|
+
}
|
|
19
22
|
.aplus-ap-form-item--bordered .ant-space-compact-block .ant-input {
|
|
20
23
|
padding-left: 11px;
|
|
21
24
|
}
|
|
@@ -211,6 +211,9 @@
|
|
|
211
211
|
.aplus-ap-form-item--bordered .ant-picker {
|
|
212
212
|
padding: 0;
|
|
213
213
|
}
|
|
214
|
+
.aplus-ap-form-item--bordered .ant-form-item-control-input-content > .ant-input-group > .ant-picker-range:nth-child(1) .ant-picker-clear {
|
|
215
|
+
inset-inline-end: 0;
|
|
216
|
+
}
|
|
214
217
|
.aplus-ap-form-item--bordered .ant-space-compact-block .ant-input {
|
|
215
218
|
padding-left: 11px;
|
|
216
219
|
}
|
|
@@ -211,6 +211,9 @@
|
|
|
211
211
|
.aplus-ap-form-item--bordered .ant-picker {
|
|
212
212
|
padding: 0;
|
|
213
213
|
}
|
|
214
|
+
.aplus-ap-form-item--bordered .ant-form-item-control-input-content > .ant-input-group > .ant-picker-range:nth-child(1) .ant-picker-clear {
|
|
215
|
+
inset-inline-end: 0;
|
|
216
|
+
}
|
|
214
217
|
.aplus-ap-form-item--bordered .ant-space-compact-block .ant-input {
|
|
215
218
|
padding-left: 11px;
|
|
216
219
|
}
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
.aplus-ap-form-item--bordered .ant-picker {
|
|
26
26
|
padding: 0;
|
|
27
27
|
}
|
|
28
|
+
.aplus-ap-form-item--bordered .ant-form-item-control-input-content > .ant-input-group > .ant-picker-range:nth-child(1) .ant-picker-clear {
|
|
29
|
+
inset-inline-end: 0;
|
|
30
|
+
}
|
|
28
31
|
.aplus-ap-form-item--bordered .ant-space-compact-block .ant-input {
|
|
29
32
|
padding-left: 11px;
|
|
30
33
|
}
|
package/theme/index.css
CHANGED
|
@@ -378,6 +378,9 @@
|
|
|
378
378
|
.aplus-ap-form-item--bordered .ant-picker {
|
|
379
379
|
padding: 0;
|
|
380
380
|
}
|
|
381
|
+
.aplus-ap-form-item--bordered .ant-form-item-control-input-content > .ant-input-group > .ant-picker-range:nth-child(1) .ant-picker-clear {
|
|
382
|
+
inset-inline-end: 0;
|
|
383
|
+
}
|
|
381
384
|
.aplus-ap-form-item--bordered .ant-space-compact-block .ant-input {
|
|
382
385
|
padding-left: 11px;
|
|
383
386
|
}
|