@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.
- package/es/src/ap-action/style/item-dropdown.css +1 -0
- package/es/src/ap-download/interface.d.ts +4 -1
- package/es/src/ap-field/text/index.vue.d.ts +5 -5
- package/es/src/ap-modal/type.d.ts +2 -2
- package/es/src/ap-modal/utils/createModal.mjs +35 -27
- package/es/src/ap-table/constants.d.ts +10 -10
- package/es/src/theme/ap-action/item-dropdown.css +1 -0
- package/lib/src/ap-action/style/item-dropdown.css +1 -0
- package/lib/src/ap-download/interface.d.ts +4 -1
- package/lib/src/ap-field/text/index.vue.d.ts +5 -5
- package/lib/src/ap-modal/type.d.ts +2 -2
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/constants.d.ts +10 -10
- package/lib/src/theme/ap-action/item-dropdown.css +1 -0
- package/package.json +2 -2
|
@@ -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
|
|
6
|
-
addonBefore
|
|
7
|
-
prefix
|
|
8
|
-
suffix
|
|
9
|
-
clearIcon
|
|
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: (
|
|
4
|
-
onOk: (
|
|
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
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { globalConfigCached as
|
|
4
|
-
const
|
|
5
|
-
let
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
11
|
+
function m(e) {
|
|
12
12
|
n && n(e);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const f = /* @__PURE__ */ C({
|
|
15
15
|
data() {
|
|
16
16
|
return {
|
|
17
17
|
open: !0,
|
|
18
|
-
props:
|
|
18
|
+
props: i
|
|
19
19
|
};
|
|
20
20
|
},
|
|
21
21
|
methods: {
|
|
22
|
-
async handleCancel(
|
|
23
|
-
var o,
|
|
24
|
-
(
|
|
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(
|
|
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
|
-
}), (
|
|
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
|
-
}),
|
|
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
|
-
|
|
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,
|
|
56
|
-
default: () => [
|
|
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
|
-
}),
|
|
70
|
-
return
|
|
71
|
-
destroy:
|
|
72
|
-
update:
|
|
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
|
-
|
|
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
|
|
14394
|
-
addonBefore
|
|
14395
|
-
prefix
|
|
14396
|
-
suffix
|
|
14397
|
-
clearIcon
|
|
14393
|
+
addonAfter?: any;
|
|
14394
|
+
addonBefore?: any;
|
|
14395
|
+
prefix?: any;
|
|
14396
|
+
suffix?: any;
|
|
14397
|
+
clearIcon?: any;
|
|
14398
14398
|
}> & {
|
|
14399
|
-
addonAfter
|
|
14400
|
-
addonBefore
|
|
14401
|
-
prefix
|
|
14402
|
-
suffix
|
|
14403
|
-
clearIcon
|
|
14399
|
+
addonAfter?: any;
|
|
14400
|
+
addonBefore?: any;
|
|
14401
|
+
prefix?: any;
|
|
14402
|
+
suffix?: any;
|
|
14403
|
+
clearIcon?: any;
|
|
14404
14404
|
};
|
|
14405
14405
|
}) & {
|
|
14406
14406
|
Password: typeof ApFieldPassword;
|
|
@@ -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
|
|
6
|
-
addonBefore
|
|
7
|
-
prefix
|
|
8
|
-
suffix
|
|
9
|
-
clearIcon
|
|
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: (
|
|
4
|
-
onOk: (
|
|
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
|
|
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
|
|
14394
|
-
addonBefore
|
|
14395
|
-
prefix
|
|
14396
|
-
suffix
|
|
14397
|
-
clearIcon
|
|
14393
|
+
addonAfter?: any;
|
|
14394
|
+
addonBefore?: any;
|
|
14395
|
+
prefix?: any;
|
|
14396
|
+
suffix?: any;
|
|
14397
|
+
clearIcon?: any;
|
|
14398
14398
|
}> & {
|
|
14399
|
-
addonAfter
|
|
14400
|
-
addonBefore
|
|
14401
|
-
prefix
|
|
14402
|
-
suffix
|
|
14403
|
-
clearIcon
|
|
14399
|
+
addonAfter?: any;
|
|
14400
|
+
addonBefore?: any;
|
|
14401
|
+
prefix?: any;
|
|
14402
|
+
suffix?: any;
|
|
14403
|
+
clearIcon?: any;
|
|
14404
14404
|
};
|
|
14405
14405
|
}) & {
|
|
14406
14406
|
Password: typeof ApFieldPassword;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.1.
|
|
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
|
|
68
|
+
"@aplus-frontend/oss": "^1.1.0",
|
|
69
69
|
"ant-design-vue": "^4.2.1",
|
|
70
70
|
"vue": "^3.4.38"
|
|
71
71
|
},
|