@funcho/ui 1.1.20 → 1.1.21
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/dist/cjs/business/EditFormCard/EditFormCard.vue.js +7 -3
- package/dist/cjs/business/FormDialog/FormDialog.vue.js +7 -3
- package/dist/cjs/packages/ui/package.json.js +1 -1
- package/dist/esm/business/EditFormCard/EditFormCard.vue.mjs +7 -3
- package/dist/esm/business/FormDialog/FormDialog.vue.mjs +7 -3
- package/dist/esm/packages/ui/package.json.mjs +1 -1
- package/dist/types/business/EditFormCard/EditFormCard.vue.d.ts +4 -0
- package/dist/types/business/EditFormCard/index.d.ts +12 -0
- package/dist/types/business/FormDialog/FormDialog.vue.d.ts +4 -0
- package/dist/types/business/FormDialog/index.d.ts +12 -0
- package/package.json +3 -3
|
@@ -95,6 +95,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
95
95
|
showEditButton: { type: Boolean, default: true },
|
|
96
96
|
requestApi: { type: Function, default: void 0 },
|
|
97
97
|
submitApi: { type: Function, default: void 0 },
|
|
98
|
+
successMessage: { default: "修改成功!" },
|
|
99
|
+
showSuccessMessage: { type: Boolean, default: true },
|
|
98
100
|
inline: { type: Boolean, default: true },
|
|
99
101
|
columns: {},
|
|
100
102
|
labelPosition: { default: "top" },
|
|
@@ -152,9 +154,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
152
154
|
const res = await props.submitApi(model);
|
|
153
155
|
isDisabled.value = true;
|
|
154
156
|
emits("submit", model, res);
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
if (props.showSuccessMessage) {
|
|
158
|
+
index$2.FcNotification.success({
|
|
159
|
+
message: props.successMessage
|
|
160
|
+
});
|
|
161
|
+
}
|
|
158
162
|
initData();
|
|
159
163
|
} catch (err) {
|
|
160
164
|
console.error("提交失败", err);
|
|
@@ -25,6 +25,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
confirmButtonText: { default: "确定" },
|
|
26
26
|
showCancelButton: { type: Boolean, default: true },
|
|
27
27
|
submitApi: { type: Function, default: void 0 },
|
|
28
|
+
successMessage: { default: "提交成功!" },
|
|
29
|
+
showSuccessMessage: { type: Boolean, default: true },
|
|
28
30
|
inline: { type: Boolean, default: false },
|
|
29
31
|
columns: {},
|
|
30
32
|
labelPosition: { default: "left" },
|
|
@@ -53,9 +55,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
53
55
|
submitting.value = true;
|
|
54
56
|
const res = await props.submitApi(model);
|
|
55
57
|
emits("submit", model, res);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
if (props.showSuccessMessage) {
|
|
59
|
+
index.FcNotification.success({
|
|
60
|
+
message: props.successMessage
|
|
61
|
+
});
|
|
62
|
+
}
|
|
59
63
|
visible.value = false;
|
|
60
64
|
} catch (err) {
|
|
61
65
|
console.error("提交失败", err);
|
|
@@ -91,6 +91,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
showEditButton: { type: Boolean, default: true },
|
|
92
92
|
requestApi: { type: Function, default: void 0 },
|
|
93
93
|
submitApi: { type: Function, default: void 0 },
|
|
94
|
+
successMessage: { default: "修改成功!" },
|
|
95
|
+
showSuccessMessage: { type: Boolean, default: true },
|
|
94
96
|
inline: { type: Boolean, default: true },
|
|
95
97
|
columns: {},
|
|
96
98
|
labelPosition: { default: "top" },
|
|
@@ -148,9 +150,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
148
150
|
const res = await props.submitApi(model);
|
|
149
151
|
isDisabled.value = true;
|
|
150
152
|
emits("submit", model, res);
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
if (props.showSuccessMessage) {
|
|
154
|
+
FcNotification.success({
|
|
155
|
+
message: props.successMessage
|
|
156
|
+
});
|
|
157
|
+
}
|
|
154
158
|
initData();
|
|
155
159
|
} catch (err) {
|
|
156
160
|
console.error("提交失败", err);
|
|
@@ -21,6 +21,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
confirmButtonText: { default: "确定" },
|
|
22
22
|
showCancelButton: { type: Boolean, default: true },
|
|
23
23
|
submitApi: { type: Function, default: void 0 },
|
|
24
|
+
successMessage: { default: "提交成功!" },
|
|
25
|
+
showSuccessMessage: { type: Boolean, default: true },
|
|
24
26
|
inline: { type: Boolean, default: false },
|
|
25
27
|
columns: {},
|
|
26
28
|
labelPosition: { default: "left" },
|
|
@@ -49,9 +51,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
51
|
submitting.value = true;
|
|
50
52
|
const res = await props.submitApi(model);
|
|
51
53
|
emits("submit", model, res);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
if (props.showSuccessMessage) {
|
|
55
|
+
FcNotification.success({
|
|
56
|
+
message: props.successMessage
|
|
57
|
+
});
|
|
58
|
+
}
|
|
55
59
|
visible.value = false;
|
|
56
60
|
} catch (err) {
|
|
57
61
|
console.error("提交失败", err);
|
|
@@ -6,6 +6,8 @@ type __VLS_Props = {
|
|
|
6
6
|
submitApi?: (data: any) => Promise<{
|
|
7
7
|
data: {};
|
|
8
8
|
}>;
|
|
9
|
+
successMessage?: string;
|
|
10
|
+
showSuccessMessage?: boolean;
|
|
9
11
|
} & TProFormProps;
|
|
10
12
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
11
13
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -196,6 +198,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
196
198
|
submitApi: (data: any) => Promise<{
|
|
197
199
|
data: {};
|
|
198
200
|
}>;
|
|
201
|
+
successMessage: string;
|
|
202
|
+
showSuccessMessage: boolean;
|
|
199
203
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
200
204
|
formRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<TProFormProps> & Readonly<{}>, {
|
|
201
205
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -6,6 +6,8 @@ export declare const FcProEditFormCard: {
|
|
|
6
6
|
submitApi?: (data: any) => Promise<{
|
|
7
7
|
data: {};
|
|
8
8
|
}>;
|
|
9
|
+
successMessage?: string;
|
|
10
|
+
showSuccessMessage?: boolean;
|
|
9
11
|
} & import('..').TProFormProps> & Readonly<{
|
|
10
12
|
onSubmit?: ((model?: any, res?: any) => any) | undefined;
|
|
11
13
|
onLoaded?: ((data: any) => any) | undefined;
|
|
@@ -195,6 +197,8 @@ export declare const FcProEditFormCard: {
|
|
|
195
197
|
submitApi: (data: any) => Promise<{
|
|
196
198
|
data: {};
|
|
197
199
|
}>;
|
|
200
|
+
successMessage: string;
|
|
201
|
+
showSuccessMessage: boolean;
|
|
198
202
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
199
203
|
formRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('..').TProFormProps> & Readonly<{}>, {
|
|
200
204
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -1178,6 +1182,8 @@ export declare const FcProEditFormCard: {
|
|
|
1178
1182
|
submitApi?: (data: any) => Promise<{
|
|
1179
1183
|
data: {};
|
|
1180
1184
|
}>;
|
|
1185
|
+
successMessage?: string;
|
|
1186
|
+
showSuccessMessage?: boolean;
|
|
1181
1187
|
} & import('..').TProFormProps> & Readonly<{
|
|
1182
1188
|
onSubmit?: ((model?: any, res?: any) => any) | undefined;
|
|
1183
1189
|
onLoaded?: ((data: any) => any) | undefined;
|
|
@@ -1364,6 +1370,8 @@ export declare const FcProEditFormCard: {
|
|
|
1364
1370
|
submitApi: (data: any) => Promise<{
|
|
1365
1371
|
data: {};
|
|
1366
1372
|
}>;
|
|
1373
|
+
successMessage: string;
|
|
1374
|
+
showSuccessMessage: boolean;
|
|
1367
1375
|
}>;
|
|
1368
1376
|
__isFragment?: never;
|
|
1369
1377
|
__isTeleport?: never;
|
|
@@ -1375,6 +1383,8 @@ export declare const FcProEditFormCard: {
|
|
|
1375
1383
|
submitApi?: (data: any) => Promise<{
|
|
1376
1384
|
data: {};
|
|
1377
1385
|
}>;
|
|
1386
|
+
successMessage?: string;
|
|
1387
|
+
showSuccessMessage?: boolean;
|
|
1378
1388
|
} & import('..').TProFormProps> & Readonly<{
|
|
1379
1389
|
onSubmit?: ((model?: any, res?: any) => any) | undefined;
|
|
1380
1390
|
onLoaded?: ((data: any) => any) | undefined;
|
|
@@ -1564,6 +1574,8 @@ export declare const FcProEditFormCard: {
|
|
|
1564
1574
|
submitApi: (data: any) => Promise<{
|
|
1565
1575
|
data: {};
|
|
1566
1576
|
}>;
|
|
1577
|
+
successMessage: string;
|
|
1578
|
+
showSuccessMessage: boolean;
|
|
1567
1579
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
1568
1580
|
export default FcProEditFormCard;
|
|
1569
1581
|
export * from './EditFormCard.types';
|
|
@@ -9,6 +9,8 @@ type __VLS_Props = {
|
|
|
9
9
|
submitApi?: (data: any) => Promise<{
|
|
10
10
|
data: {};
|
|
11
11
|
}>;
|
|
12
|
+
successMessage?: string;
|
|
13
|
+
showSuccessMessage?: boolean;
|
|
12
14
|
} & TProFormProps;
|
|
13
15
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
14
16
|
open: (data?: any) => void;
|
|
@@ -32,6 +34,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
32
34
|
submitApi: (data: any) => Promise<{
|
|
33
35
|
data: {};
|
|
34
36
|
}>;
|
|
37
|
+
successMessage: string;
|
|
38
|
+
showSuccessMessage: boolean;
|
|
35
39
|
showCancelButton: boolean;
|
|
36
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
37
41
|
formRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<TProFormProps> & Readonly<{}>, {
|
|
@@ -8,6 +8,8 @@ export declare const FcProFormDialog: {
|
|
|
8
8
|
submitApi?: (data: any) => Promise<{
|
|
9
9
|
data: {};
|
|
10
10
|
}>;
|
|
11
|
+
successMessage?: string;
|
|
12
|
+
showSuccessMessage?: boolean;
|
|
11
13
|
} & import('..').TProFormProps> & Readonly<{
|
|
12
14
|
onSubmit?: ((model?: any, res?: any) => any) | undefined;
|
|
13
15
|
onCancel?: (() => any) | undefined;
|
|
@@ -30,6 +32,8 @@ export declare const FcProFormDialog: {
|
|
|
30
32
|
submitApi: (data: any) => Promise<{
|
|
31
33
|
data: {};
|
|
32
34
|
}>;
|
|
35
|
+
successMessage: string;
|
|
36
|
+
showSuccessMessage: boolean;
|
|
33
37
|
showCancelButton: boolean;
|
|
34
38
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
35
39
|
formRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('..').TProFormProps> & Readonly<{}>, {
|
|
@@ -1016,6 +1020,8 @@ export declare const FcProFormDialog: {
|
|
|
1016
1020
|
submitApi?: (data: any) => Promise<{
|
|
1017
1021
|
data: {};
|
|
1018
1022
|
}>;
|
|
1023
|
+
successMessage?: string;
|
|
1024
|
+
showSuccessMessage?: boolean;
|
|
1019
1025
|
} & import('..').TProFormProps> & Readonly<{
|
|
1020
1026
|
onSubmit?: ((model?: any, res?: any) => any) | undefined;
|
|
1021
1027
|
onCancel?: (() => any) | undefined;
|
|
@@ -1035,6 +1041,8 @@ export declare const FcProFormDialog: {
|
|
|
1035
1041
|
submitApi: (data: any) => Promise<{
|
|
1036
1042
|
data: {};
|
|
1037
1043
|
}>;
|
|
1044
|
+
successMessage: string;
|
|
1045
|
+
showSuccessMessage: boolean;
|
|
1038
1046
|
showCancelButton: boolean;
|
|
1039
1047
|
}>;
|
|
1040
1048
|
__isFragment?: never;
|
|
@@ -1049,6 +1057,8 @@ export declare const FcProFormDialog: {
|
|
|
1049
1057
|
submitApi?: (data: any) => Promise<{
|
|
1050
1058
|
data: {};
|
|
1051
1059
|
}>;
|
|
1060
|
+
successMessage?: string;
|
|
1061
|
+
showSuccessMessage?: boolean;
|
|
1052
1062
|
} & import('..').TProFormProps> & Readonly<{
|
|
1053
1063
|
onSubmit?: ((model?: any, res?: any) => any) | undefined;
|
|
1054
1064
|
onCancel?: (() => any) | undefined;
|
|
@@ -1071,6 +1081,8 @@ export declare const FcProFormDialog: {
|
|
|
1071
1081
|
submitApi: (data: any) => Promise<{
|
|
1072
1082
|
data: {};
|
|
1073
1083
|
}>;
|
|
1084
|
+
successMessage: string;
|
|
1085
|
+
showSuccessMessage: boolean;
|
|
1074
1086
|
showCancelButton: boolean;
|
|
1075
1087
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
1076
1088
|
export default FcProFormDialog;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funcho/ui",
|
|
3
3
|
"description": "@funcho ui library",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.21",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/esm/index.mjs",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"vite-plugin-dts": "^4.5.4",
|
|
47
47
|
"vitest": "^4.0.7",
|
|
48
48
|
"vue": "^3.5.22",
|
|
49
|
-
"@funcho/
|
|
50
|
-
"@funcho/
|
|
49
|
+
"@funcho/icons-vue": "1.0.3",
|
|
50
|
+
"@funcho/typescript-config": "0.0.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"vue": "^3.5.22",
|