@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.
@@ -1,30 +1,34 @@
1
- import { render as h, defineComponent as x, createVNode as f, mergeProps as y, h as k } from "vue";
2
- import { Modal as w } from "@aplus-frontend/antdv";
3
- import { ConfigProvider as P, globalConfigCached as b } from "../../config-provider/config-provider.mjs";
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 N } from "@aplus-frontend/utils";
6
- const V = (d) => {
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: a = !1
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
- h(null, r), (e = r.parentElement) == null || e.removeChild(r);
19
+ u(null, s), (e = s.parentElement) == null || e.removeChild(s);
16
20
  }, 500);
17
21
  }
18
- function u() {
22
+ function C() {
19
23
  n && n(!0);
20
24
  }
21
25
  function m() {
22
26
  n && n(!1);
23
27
  }
24
- function C(e) {
28
+ function g(e) {
25
29
  t && t(e);
26
30
  }
27
- const g = /* @__PURE__ */ x({
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, s, i, p;
50
+ var e, o, a, i, p;
47
51
  if ((e = this.props) != null && e.onCancel) {
48
- const v = ((i = (s = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : s.component) == null ? void 0 : i.exposed) ?? void 0;
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, s, i;
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 = (s = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : s.component) == null ? void 0 : i.exposed) ?? void 0;
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, b.value, {
75
- default: () => [f(w, y({
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: a === !1 ? {} : {
84
- maxHeight: `${window.innerHeight - (a === !0 ? 100 : N(a) ? Number(a) : 100) * 2}px`,
85
- overflow: "auto"
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
- }), O = d.getContainer || document.body, r = document.createElement("div");
93
- return O.appendChild(r), h(k(g), r), {
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: C,
96
- open: u,
105
+ update: g,
106
+ open: C,
97
107
  close: m
98
108
  };
99
109
  };
100
110
  export {
101
- V as createModal
111
+ z as createModal
102
112
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),y=require("@aplus-frontend/antdv"),h=require("../../config-provider/config-provider.js"),P=require("lodash-unified"),k=require("@aplus-frontend/utils"),w=p=>{let t,r;const{destroyOnClose:l=!0,wrapperOffset:d=!1}=p;function u(){t&&t(!1),setTimeout(()=>{var e;o.render(null,s),(e=s.parentElement)==null||e.removeChild(s)},500)}function m(){t&&t(!0)}function f(){t&&t(!1)}function C(e){r&&r(e)}const g=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,a,c;if((e=this.props)!=null&&e.onCancel){const O=((a=(i=(n=this.props)==null?void 0:n.content)==null?void 0:i.component)==null?void 0:a.exposed)??void 0;await((c=this.props)==null?void 0:c.onCancel(O))}l?u():f()},async handleOk(){var e,n,i,a;try{if(r({confirmLoading:!0}),(e=this.props)!=null&&e.onOk){const c=((a=(i=(n=this.props)==null?void 0:n.content)==null?void 0:i.component)==null?void 0:a.exposed)??void 0;await this.props.onOk(c)}r({confirmLoading:!1}),l?u():f()}catch{r({confirmLoading:!1})}}},render(){const e=P.omit(this.props,["onCancel","onOk","open","onUpdate:open","getContainer","icon"]);return o.createVNode(h.ConfigProvider,h.globalConfigCached.value,{default:()=>[o.createVNode(y.Modal,o.mergeProps({open:this.open,onCancel:this.handleCancel,onOk:this.handleOk},e),{default:()=>{var n;return[o.createVNode("div",{style:d===!1?{}:{maxHeight:`${window.innerHeight-(d===!0?100:k.isNumeric(d)?Number(d):100)*2}px`,overflow:"auto"}},[(n=this.props)==null?void 0:n.content])]}})]})}}),v=p.getContainer||document.body,s=document.createElement("div");return v.appendChild(s),o.render(o.h(g),s),{destroy:u,update:C,open:m,close:f}};exports.createModal=w;
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.32",
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/utils": "1.0.51",
69
- "@aplus-frontend/hooks": "1.0.7"
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;
@@ -54,7 +54,7 @@
54
54
  line-height: 24px;
55
55
  }
56
56
  .ant-modal-root .ant-modal .ant-modal-content .ant-modal-body {
57
- padding: 20px !important;
57
+ padding: 20px 0 !important;
58
58
  }
59
59
  .ant-modal-root .ant-modal .ant-modal-content .ant-modal-body > .scrollbar {
60
60
  padding: 0;
@@ -65,7 +65,7 @@
65
65
  }
66
66
 
67
67
  .ant-modal-body {
68
- padding: 20px !important;
68
+ padding: 20px 0 !important;
69
69
 
70
70
  & > .scrollbar {
71
71
  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;
@@ -48,7 +48,7 @@
48
48
  line-height: 24px;
49
49
  }
50
50
  .ant-modal-root .ant-modal .ant-modal-content .ant-modal-body {
51
- padding: 20px !important;
51
+ padding: 20px 0 !important;
52
52
  }
53
53
  .ant-modal-root .ant-modal .ant-modal-content .ant-modal-body > .scrollbar {
54
54
  padding: 0;
@@ -60,7 +60,7 @@
60
60
  }
61
61
 
62
62
  .ant-modal-body {
63
- padding: 20px !important;
63
+ padding: 20px 0 !important;
64
64
 
65
65
  & > .scrollbar {
66
66
  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;
@@ -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
  }