@aplus-frontend/ui 0.1.3 → 0.1.4

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.
@@ -10,4 +10,5 @@
10
10
  color: #0070ff;
11
11
  margin-left: 4px;
12
12
  font-size: 14px;
13
+ display: inline-flex;
13
14
  }
@@ -17,6 +17,9 @@ export interface ApDownLoadProps {
17
17
  * @default false
18
18
  */
19
19
  disabled?: boolean;
20
- fileName: string;
20
+ fileName: Array<string> | string | Array<{
21
+ path: string;
22
+ fileName: string;
23
+ }>;
21
24
  getOssAccess: () => Promise<accessCreate>;
22
25
  }
@@ -2,11 +2,11 @@ import { ApFieldTextProps, FieldMode } from '../interface';
2
2
  import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
3
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
4
  type ApFieldTextSlots = {
5
- addonAfter: any;
6
- addonBefore: any;
7
- prefix: any;
8
- suffix: any;
9
- clearIcon: any;
5
+ addonAfter?: any;
6
+ addonBefore?: any;
7
+ prefix?: any;
8
+ suffix?: any;
9
+ clearIcon?: any;
10
10
  };
11
11
  declare function __VLS_template(): Readonly<ApFieldTextSlots> & ApFieldTextSlots;
12
12
  declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFieldTextProps>, {
@@ -1,7 +1,7 @@
1
1
  import { ModalProps } from 'ant-design-vue';
2
2
  export type CreateModalFuncProps = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer'> & Partial<{
3
- onCancel: (e: MouseEvent) => void | Promise<unknown>;
4
- onOk: (e: MouseEvent) => void | Promise<unknown>;
3
+ onCancel: (params: any) => void | Promise<unknown>;
4
+ onOk: (params: any) => void | Promise<unknown>;
5
5
  getContainer: HTMLElement;
6
6
  content: any;
7
7
  }>;
@@ -1,36 +1,44 @@
1
- import { render as p, defineComponent as f, createVNode as l, mergeProps as m, h as u } from "vue";
2
- import { ConfigProvider as C, Modal as g } from "ant-design-vue";
3
- import { globalConfigCached as O } from "../../config-provider/config-provider.mjs";
4
- const L = (s) => {
5
- let r, n;
6
- function a() {
7
- r && r(!1), setTimeout(() => {
8
- p(null, t), i.removeChild(t);
1
+ import { render as l, defineComponent as C, createVNode as h, mergeProps as g, h as O } from "vue";
2
+ import { ConfigProvider as k, Modal as y } from "ant-design-vue";
3
+ import { globalConfigCached as v } from "../../config-provider/config-provider.mjs";
4
+ const b = (i) => {
5
+ let p, n;
6
+ function d() {
7
+ p && p(!1), setTimeout(() => {
8
+ l(null, r), c.removeChild(r);
9
9
  }, 500);
10
10
  }
11
- function c(e) {
11
+ function m(e) {
12
12
  n && n(e);
13
13
  }
14
- const h = /* @__PURE__ */ f({
14
+ const f = /* @__PURE__ */ C({
15
15
  data() {
16
16
  return {
17
17
  open: !0,
18
- props: s
18
+ props: i
19
19
  };
20
20
  },
21
21
  methods: {
22
- async handleCancel(e) {
23
- var o, d;
24
- (o = this.props) != null && o.onCancel && await ((d = this.props) == null ? void 0 : d.onCancel(e)), a();
22
+ async handleCancel() {
23
+ var e, o, t, s, a;
24
+ if ((e = this.props) != null && e.onCancel) {
25
+ const u = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
26
+ await ((a = this.props) == null ? void 0 : a.onCancel(u));
27
+ }
28
+ d();
25
29
  },
26
- async handleOk(e) {
27
- var o;
30
+ async handleOk() {
31
+ var e, o, t, s;
28
32
  try {
29
- n({
33
+ if (n({
30
34
  confirmLoading: !0
31
- }), (o = this.props) != null && o.onOk && await this.props.onOk(e), n({
35
+ }), (e = this.props) != null && e.onOk) {
36
+ const a = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
37
+ await this.props.onOk(a);
38
+ }
39
+ n({
32
40
  confirmLoading: !1
33
- }), a();
41
+ }), d();
34
42
  } catch {
35
43
  n({
36
44
  confirmLoading: !1
@@ -39,7 +47,7 @@ const L = (s) => {
39
47
  }
40
48
  },
41
49
  created() {
42
- r = (e) => {
50
+ p = (e) => {
43
51
  this.open = e;
44
52
  }, n = (e) => {
45
53
  this.props = {
@@ -52,8 +60,8 @@ const L = (s) => {
52
60
  const {
53
61
  ...e
54
62
  } = this.props;
55
- return delete e.onCancel, delete e.onOk, l(C, O.value, {
56
- default: () => [l(g, m({
63
+ return delete e.onCancel, delete e.onOk, h(k, v.value, {
64
+ default: () => [h(y, g({
57
65
  open: this.open,
58
66
  destroyOnClose: !0,
59
67
  onCancel: this.handleCancel,
@@ -66,12 +74,12 @@ const L = (s) => {
66
74
  })]
67
75
  });
68
76
  }
69
- }), i = s.getContainer || document.body, t = document.createElement("div");
70
- return i.appendChild(t), p(u(h), t), {
71
- destroy: a,
72
- update: c
77
+ }), c = i.getContainer || document.body, r = document.createElement("div");
78
+ return c.appendChild(r), l(O(f), r), {
79
+ destroy: d,
80
+ update: m
73
81
  };
74
82
  };
75
83
  export {
76
- L as createModal
84
+ b as createModal
77
85
  };
@@ -14390,17 +14390,17 @@ export declare const apTableRenderItemMap: {
14390
14390
  emptyText: string;
14391
14391
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
14392
14392
  $slots: Readonly<{
14393
- addonAfter: any;
14394
- addonBefore: any;
14395
- prefix: any;
14396
- suffix: any;
14397
- clearIcon: any;
14393
+ addonAfter?: any;
14394
+ addonBefore?: any;
14395
+ prefix?: any;
14396
+ suffix?: any;
14397
+ clearIcon?: any;
14398
14398
  }> & {
14399
- addonAfter: any;
14400
- addonBefore: any;
14401
- prefix: any;
14402
- suffix: any;
14403
- clearIcon: any;
14399
+ addonAfter?: any;
14400
+ addonBefore?: any;
14401
+ prefix?: any;
14402
+ suffix?: any;
14403
+ clearIcon?: any;
14404
14404
  };
14405
14405
  }) & {
14406
14406
  Password: typeof ApFieldPassword;
@@ -10,4 +10,5 @@
10
10
  color: #0070ff;
11
11
  margin-left: 4px;
12
12
  font-size: 14px;
13
+ display: inline-flex;
13
14
  }
@@ -10,4 +10,5 @@
10
10
  color: #0070ff;
11
11
  margin-left: 4px;
12
12
  font-size: 14px;
13
+ display: inline-flex;
13
14
  }
@@ -17,6 +17,9 @@ export interface ApDownLoadProps {
17
17
  * @default false
18
18
  */
19
19
  disabled?: boolean;
20
- fileName: string;
20
+ fileName: Array<string> | string | Array<{
21
+ path: string;
22
+ fileName: string;
23
+ }>;
21
24
  getOssAccess: () => Promise<accessCreate>;
22
25
  }
@@ -2,11 +2,11 @@ import { ApFieldTextProps, FieldMode } from '../interface';
2
2
  import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
3
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
4
  type ApFieldTextSlots = {
5
- addonAfter: any;
6
- addonBefore: any;
7
- prefix: any;
8
- suffix: any;
9
- clearIcon: any;
5
+ addonAfter?: any;
6
+ addonBefore?: any;
7
+ prefix?: any;
8
+ suffix?: any;
9
+ clearIcon?: any;
10
10
  };
11
11
  declare function __VLS_template(): Readonly<ApFieldTextSlots> & ApFieldTextSlots;
12
12
  declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFieldTextProps>, {
@@ -1,7 +1,7 @@
1
1
  import { ModalProps } from 'ant-design-vue';
2
2
  export type CreateModalFuncProps = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer'> & Partial<{
3
- onCancel: (e: MouseEvent) => void | Promise<unknown>;
4
- onOk: (e: MouseEvent) => void | Promise<unknown>;
3
+ onCancel: (params: any) => void | Promise<unknown>;
4
+ onOk: (params: any) => void | Promise<unknown>;
5
5
  getContainer: HTMLElement;
6
6
  content: any;
7
7
  }>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),l=require("ant-design-vue"),h=require("../../config-provider/config-provider.js"),f=i=>{let a,o;function s(){a&&a(!1),setTimeout(()=>{t.render(null,r),d.removeChild(r)},500)}function p(e){o&&o(e)}const u=t.defineComponent({data(){return{open:!0,props:i}},methods:{async handleCancel(e){var n,c;(n=this.props)!=null&&n.onCancel&&await((c=this.props)==null?void 0:c.onCancel(e)),s()},async handleOk(e){var n;try{o({confirmLoading:!0}),(n=this.props)!=null&&n.onOk&&await this.props.onOk(e),o({confirmLoading:!1}),s()}catch{o({confirmLoading:!1})}}},created(){a=e=>{this.open=e},o=e=>{this.props={...this.props,...e}}},render(){const{...e}=this.props;return delete e.onCancel,delete e.onOk,t.createVNode(l.ConfigProvider,h.globalConfigCached.value,{default:()=>[t.createVNode(l.Modal,t.mergeProps({open:this.open,destroyOnClose:!0,onCancel:this.handleCancel,onOk:this.handleOk},e),{default:()=>{var n;return[(n=this.props)==null?void 0:n.content]}})]})}}),d=i.getContainer||document.body,r=document.createElement("div");return d.appendChild(r),t.render(t.h(u),r),{destroy:s,update:p}};exports.createModal=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("ant-design-vue"),C=require("../../config-provider/config-provider.js"),g=p=>{let i,t;function c(){i&&i(!1),setTimeout(()=>{o.render(null,a),l.removeChild(a)},500)}function h(e){t&&t(e)}const f=o.defineComponent({data(){return{open:!0,props:p}},methods:{async handleCancel(){var e,n,r,s,d;if((e=this.props)!=null&&e.onCancel){const m=((s=(r=(n=this.props)==null?void 0:n.content)==null?void 0:r.component)==null?void 0:s.exposed)??void 0;await((d=this.props)==null?void 0:d.onCancel(m))}c()},async handleOk(){var e,n,r,s;try{if(t({confirmLoading:!0}),(e=this.props)!=null&&e.onOk){const d=((s=(r=(n=this.props)==null?void 0:n.content)==null?void 0:r.component)==null?void 0:s.exposed)??void 0;await this.props.onOk(d)}t({confirmLoading:!1}),c()}catch{t({confirmLoading:!1})}}},created(){i=e=>{this.open=e},t=e=>{this.props={...this.props,...e}}},render(){const{...e}=this.props;return delete e.onCancel,delete e.onOk,o.createVNode(u.ConfigProvider,C.globalConfigCached.value,{default:()=>[o.createVNode(u.Modal,o.mergeProps({open:this.open,destroyOnClose:!0,onCancel:this.handleCancel,onOk:this.handleOk},e),{default:()=>{var n;return[(n=this.props)==null?void 0:n.content]}})]})}}),l=p.getContainer||document.body,a=document.createElement("div");return l.appendChild(a),o.render(o.h(f),a),{destroy:c,update:h}};exports.createModal=g;
@@ -14390,17 +14390,17 @@ export declare const apTableRenderItemMap: {
14390
14390
  emptyText: string;
14391
14391
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
14392
14392
  $slots: Readonly<{
14393
- addonAfter: any;
14394
- addonBefore: any;
14395
- prefix: any;
14396
- suffix: any;
14397
- clearIcon: any;
14393
+ addonAfter?: any;
14394
+ addonBefore?: any;
14395
+ prefix?: any;
14396
+ suffix?: any;
14397
+ clearIcon?: any;
14398
14398
  }> & {
14399
- addonAfter: any;
14400
- addonBefore: any;
14401
- prefix: any;
14402
- suffix: any;
14403
- clearIcon: any;
14399
+ addonAfter?: any;
14400
+ addonBefore?: any;
14401
+ prefix?: any;
14402
+ suffix?: any;
14403
+ clearIcon?: any;
14404
14404
  };
14405
14405
  }) & {
14406
14406
  Password: typeof ApFieldPassword;
@@ -10,4 +10,5 @@
10
10
  color: #0070ff;
11
11
  margin-left: 4px;
12
12
  font-size: 14px;
13
+ display: inline-flex;
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "files": [
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@aplus-frontend/icon": "^1.0.21",
68
- "@aplus-frontend/oss": "^1.0.20",
68
+ "@aplus-frontend/oss": "^1.1.0",
69
69
  "ant-design-vue": "^4.2.1",
70
70
  "vue": "^3.4.38"
71
71
  },