@maxax/ui 1.1.36 → 1.1.38
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/components/basic-button-import-max/BasicButtonImportMax.vue.d.ts +22 -14
- package/dist/components/basic-button-import-max/BasicButtonImportMax.vue.d.ts.map +1 -1
- package/dist/components/basic-button-import-max/{BasicButtonImportMaxModal.vue.d.ts → PreviewModal.vue.d.ts} +10 -8
- package/dist/components/basic-button-import-max/PreviewModal.vue.d.ts.map +1 -0
- package/dist/components/basic-button-import-max/{BasicButtonImportUploadModal.vue.d.ts → UploadModal.vue.d.ts} +4 -4
- package/dist/components/basic-button-import-max/UploadModal.vue.d.ts.map +1 -0
- package/dist/components/basic-button-import-max/interface.d.ts +19 -10
- package/dist/components/basic-button-import-max/interface.d.ts.map +1 -1
- package/dist/index.cjs +40 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +40 -29
- package/dist/index.mjs.map +1 -1
- package/dist/locale/lang/en.d.ts.map +1 -1
- package/dist/locale/lang/zh-cn.d.ts.map +1 -1
- package/dist/locales.cjs +2 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.mjs +2 -1
- package/dist/locales.mjs.map +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/light.css +1 -1
- package/dist/{utils-1HQXBF85.js → utils-AJQhiAVr.js} +2 -1
- package/dist/utils-AJQhiAVr.js.map +1 -0
- package/dist/{utils-Di7K635D.cjs → utils-CZ5-pOW7.cjs} +2 -1
- package/dist/utils-CZ5-pOW7.cjs.map +1 -0
- package/package.json +3 -3
- package/dist/components/basic-button-import-max/BasicButtonImportMaxModal.vue.d.ts.map +0 -1
- package/dist/components/basic-button-import-max/BasicButtonImportUploadModal.vue.d.ts.map +0 -1
- package/dist/utils-1HQXBF85.js.map +0 -1
- package/dist/utils-Di7K635D.cjs.map +0 -1
|
@@ -4,7 +4,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
4
4
|
import: (_data: {
|
|
5
5
|
data: any;
|
|
6
6
|
checked: boolean;
|
|
7
|
-
file: Blob;
|
|
7
|
+
file: Blob | null;
|
|
8
|
+
records: any[];
|
|
8
9
|
}) => any;
|
|
9
10
|
preview: (_data: {
|
|
10
11
|
data: any;
|
|
@@ -22,7 +23,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
22
23
|
onImport?: ((_data: {
|
|
23
24
|
data: any;
|
|
24
25
|
checked: boolean;
|
|
25
|
-
file: Blob;
|
|
26
|
+
file: Blob | null;
|
|
27
|
+
records: any[];
|
|
26
28
|
}) => any) | undefined;
|
|
27
29
|
onPreview?: ((_data: {
|
|
28
30
|
data: any;
|
|
@@ -38,9 +40,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
38
40
|
}) => any) | undefined;
|
|
39
41
|
}>, {
|
|
40
42
|
listField: string;
|
|
43
|
+
showPreviewCount: boolean;
|
|
41
44
|
showTplButton: boolean;
|
|
42
45
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
43
|
-
uploadModalRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./interface').
|
|
46
|
+
uploadModalRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./interface').ImportUploadModalProps> & Readonly<{
|
|
44
47
|
onConfirm?: ((_data: {
|
|
45
48
|
file: Blob;
|
|
46
49
|
checked: boolean;
|
|
@@ -65,7 +68,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
65
68
|
C: {};
|
|
66
69
|
M: {};
|
|
67
70
|
Defaults: {};
|
|
68
|
-
}, Readonly<import('./interface').
|
|
71
|
+
}, Readonly<import('./interface').ImportUploadModalProps> & Readonly<{
|
|
69
72
|
onConfirm?: ((_data: {
|
|
70
73
|
file: Blob;
|
|
71
74
|
checked: boolean;
|
|
@@ -91,6 +94,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
91
94
|
readonly onConfirm?: ((_data: {
|
|
92
95
|
data: any[];
|
|
93
96
|
records: any[];
|
|
97
|
+
errors: any[];
|
|
94
98
|
}) => any) | undefined;
|
|
95
99
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
96
100
|
$attrs: {
|
|
@@ -539,13 +543,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
539
543
|
$emit: ((event: "cancel") => void) & ((event: "confirm", _data: {
|
|
540
544
|
data: any[];
|
|
541
545
|
records: any[];
|
|
546
|
+
errors: any[];
|
|
542
547
|
}) => void);
|
|
543
548
|
$el: any;
|
|
544
|
-
$options: import('vue').ComponentOptionsBase<Readonly<import('./interface').
|
|
549
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('./interface').ImportPreviewModalProps> & Readonly<{
|
|
545
550
|
onCancel?: (() => any) | undefined;
|
|
546
551
|
onConfirm?: ((_data: {
|
|
547
552
|
data: any[];
|
|
548
553
|
records: any[];
|
|
554
|
+
errors: any[];
|
|
549
555
|
}) => any) | undefined;
|
|
550
556
|
}>, {
|
|
551
557
|
show: (context: import('../../composable').BasicDrawerModalContext) => void;
|
|
@@ -555,6 +561,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
555
561
|
confirm: (_data: {
|
|
556
562
|
data: any[];
|
|
557
563
|
records: any[];
|
|
564
|
+
errors: any[];
|
|
558
565
|
}) => any;
|
|
559
566
|
}, string, {
|
|
560
567
|
showPreviewCount: boolean;
|
|
@@ -580,11 +587,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
580
587
|
$watch<T_6 extends string | ((...args: any) => any)>(source: T_6, cb: T_6 extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: import('@vue/reactivity').OnCleanup) => any : (args_0: any, args_1: any, args_2: import('@vue/reactivity').OnCleanup) => any, options?: import('vue').WatchOptions<boolean> | undefined): import('vue').WatchStopHandle;
|
|
581
588
|
} & Readonly<{
|
|
582
589
|
showPreviewCount: boolean;
|
|
583
|
-
}> & Omit<Readonly<import('./interface').
|
|
590
|
+
}> & Omit<Readonly<import('./interface').ImportPreviewModalProps> & Readonly<{
|
|
584
591
|
onCancel?: (() => any) | undefined;
|
|
585
592
|
onConfirm?: ((_data: {
|
|
586
593
|
data: any[];
|
|
587
594
|
records: any[];
|
|
595
|
+
errors: any[];
|
|
588
596
|
}) => any) | undefined;
|
|
589
597
|
}>, "show" | "hide" | "showPreviewCount"> & import('vue').ShallowUnwrapRef<{
|
|
590
598
|
show: (context: import('../../composable').BasicDrawerModalContext) => void;
|
|
@@ -592,24 +600,24 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
592
600
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
593
601
|
$slots: {
|
|
594
602
|
'preview-table-before'?(_: {
|
|
595
|
-
|
|
596
|
-
|
|
603
|
+
tableData: any[];
|
|
604
|
+
errorData: any[];
|
|
597
605
|
}): any;
|
|
598
606
|
'preview-table-after'?(_: {
|
|
599
|
-
|
|
600
|
-
|
|
607
|
+
tableData: any[];
|
|
608
|
+
errorData: any[];
|
|
601
609
|
}): any;
|
|
602
610
|
};
|
|
603
611
|
}) | null;
|
|
604
612
|
}, HTMLSpanElement>, {
|
|
605
613
|
default?(_: {}): any;
|
|
606
614
|
'preview-table-before'?(_: {
|
|
607
|
-
|
|
608
|
-
|
|
615
|
+
tableData: any[];
|
|
616
|
+
errorData: any[];
|
|
609
617
|
}): any;
|
|
610
618
|
'preview-table-after'?(_: {
|
|
611
|
-
|
|
612
|
-
|
|
619
|
+
tableData: any[];
|
|
620
|
+
errorData: any[];
|
|
613
621
|
}): any;
|
|
614
622
|
}>;
|
|
615
623
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicButtonImportMax.vue.d.ts","sourceRoot":"","sources":["../../../src/components/basic-button-import-max/BasicButtonImportMax.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BasicButtonImportMax.vue.d.ts","sourceRoot":"","sources":["../../../src/components/basic-button-import-max/BasicButtonImportMax.vue"],"names":[],"mappings":"AAuLA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAO9C,OAAO,KAAK,EAA6B,yBAAyB,EAA8B,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4UnH,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { nextTick } from 'vue';
|
|
2
2
|
import { BasicTableProps } from '../basic-table';
|
|
3
|
-
import {
|
|
4
|
-
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<
|
|
3
|
+
import { ImportPreviewModalProps } from './interface';
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<ImportPreviewModalProps, {
|
|
5
5
|
show: (context: import('../../composable').BasicDrawerModalContext) => void;
|
|
6
6
|
hide: () => void;
|
|
7
7
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -9,12 +9,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
9
9
|
confirm: (_data: {
|
|
10
10
|
data: any[];
|
|
11
11
|
records: any[];
|
|
12
|
+
errors: any[];
|
|
12
13
|
}) => any;
|
|
13
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<ImportPreviewModalProps> & Readonly<{
|
|
14
15
|
onCancel?: (() => any) | undefined;
|
|
15
16
|
onConfirm?: ((_data: {
|
|
16
17
|
data: any[];
|
|
17
18
|
records: any[];
|
|
19
|
+
errors: any[];
|
|
18
20
|
}) => any) | undefined;
|
|
19
21
|
}>, {
|
|
20
22
|
showPreviewCount: boolean;
|
|
@@ -451,12 +453,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ba
|
|
|
451
453
|
}) | null;
|
|
452
454
|
}, any>, {
|
|
453
455
|
'preview-table-before'?(_: {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
+
tableData: any[];
|
|
457
|
+
errorData: any[];
|
|
456
458
|
}): any;
|
|
457
459
|
'preview-table-after'?(_: {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
+
tableData: any[];
|
|
461
|
+
errorData: any[];
|
|
460
462
|
}): any;
|
|
461
463
|
}>;
|
|
462
464
|
export default _default;
|
|
@@ -465,4 +467,4 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
465
467
|
$slots: S;
|
|
466
468
|
};
|
|
467
469
|
};
|
|
468
|
-
//# sourceMappingURL=
|
|
470
|
+
//# sourceMappingURL=PreviewModal.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/basic-button-import-max/PreviewModal.vue"],"names":[],"mappings":"AAgGA,OAAO,EAAY,QAAQ,EAAuB,MAAM,KAAK,CAAA;AAI7D,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,gBAAgB,CAAA;AAEtE,OAAO,KAAK,EAA2B,uBAAuB,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4PnF,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: import('vue').DefineComponent<
|
|
1
|
+
import { ImportUploadModalProps } from './interface';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<ImportUploadModalProps, {
|
|
3
3
|
show: (context: import('../../composable').BasicDrawerModalContext) => void;
|
|
4
4
|
hide: () => void;
|
|
5
5
|
showLoading: () => void;
|
|
@@ -11,7 +11,7 @@ declare const _default: import('vue').DefineComponent<BasicButtonImportUploadMod
|
|
|
11
11
|
checked: boolean;
|
|
12
12
|
}) => any;
|
|
13
13
|
downloadTemplate: () => any;
|
|
14
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<ImportUploadModalProps> & Readonly<{
|
|
15
15
|
onConfirm?: ((_data: {
|
|
16
16
|
file: Blob;
|
|
17
17
|
checked: boolean;
|
|
@@ -19,4 +19,4 @@ declare const _default: import('vue').DefineComponent<BasicButtonImportUploadMod
|
|
|
19
19
|
onDownloadTemplate?: (() => any) | undefined;
|
|
20
20
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
export default _default;
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=UploadModal.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/basic-button-import-max/UploadModal.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAA0B,sBAAsB,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;AAwRjF,wBASG"}
|
|
@@ -19,7 +19,7 @@ export interface BasicButtonImportMaxProps {
|
|
|
19
19
|
previewTitle?: string;
|
|
20
20
|
showPreviewCount?: boolean;
|
|
21
21
|
saveApi?: (..._arg: any) => Promise<any>;
|
|
22
|
-
beforeSaveInterceptor?:
|
|
22
|
+
beforeSaveInterceptor?: (params: BMRunBeforeSaveGuardParams) => Promise<boolean | string> | ((params: BMRunBeforeSaveGuardParams) => boolean | string);
|
|
23
23
|
beforeFetchSave?: Fn;
|
|
24
24
|
afterFetchSave?: Fn;
|
|
25
25
|
}
|
|
@@ -27,7 +27,8 @@ export interface BasicButtonImportMaxEmits {
|
|
|
27
27
|
(_event: 'import', _data: {
|
|
28
28
|
data: any;
|
|
29
29
|
checked: boolean;
|
|
30
|
-
file: Blob;
|
|
30
|
+
file: Blob | null;
|
|
31
|
+
records: any[];
|
|
31
32
|
}): void;
|
|
32
33
|
(_event: 'preview', _data: {
|
|
33
34
|
data: any;
|
|
@@ -42,30 +43,38 @@ export interface BasicButtonImportMaxEmits {
|
|
|
42
43
|
records: any[];
|
|
43
44
|
}): void;
|
|
44
45
|
}
|
|
45
|
-
export interface
|
|
46
|
+
export interface BMRunBeforeSaveGuardParams {
|
|
47
|
+
data: any[];
|
|
48
|
+
records: any[];
|
|
49
|
+
errors: any[];
|
|
50
|
+
checked: boolean;
|
|
51
|
+
file: Blob | null;
|
|
52
|
+
}
|
|
53
|
+
export interface ImportPreviewModalProps {
|
|
46
54
|
previewWidth?: string;
|
|
47
55
|
previewColumns?: BasicColumn[];
|
|
48
56
|
previewTableProps?: Partial<BasicTableProps>;
|
|
49
57
|
previewTitle?: string;
|
|
50
58
|
showPreviewCount?: boolean;
|
|
51
59
|
}
|
|
52
|
-
export interface
|
|
60
|
+
export interface ImportPreviewModalEmits {
|
|
53
61
|
(_event: 'confirm', _data: {
|
|
54
62
|
data: any[];
|
|
55
63
|
records: any[];
|
|
64
|
+
errors: any[];
|
|
56
65
|
}): void;
|
|
57
66
|
(_event: 'cancel'): void;
|
|
58
67
|
}
|
|
59
|
-
export interface
|
|
60
|
-
width?: string;
|
|
61
|
-
showTplButton?: boolean;
|
|
62
|
-
showCoverSwitch?: boolean;
|
|
63
|
-
}
|
|
64
|
-
export interface BasicButtonImportUploadModalEmits {
|
|
68
|
+
export interface ImportUploadModalEmits {
|
|
65
69
|
(_event: 'confirm', _data: {
|
|
66
70
|
file: Blob;
|
|
67
71
|
checked: boolean;
|
|
68
72
|
}): void;
|
|
69
73
|
(_event: 'downloadTemplate'): void;
|
|
70
74
|
}
|
|
75
|
+
export interface ImportUploadModalProps {
|
|
76
|
+
width?: string;
|
|
77
|
+
showTplButton?: boolean;
|
|
78
|
+
showCoverSwitch?: boolean;
|
|
79
|
+
}
|
|
71
80
|
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/components/basic-button-import-max/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAElE,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,yBAAyB;IAExC,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAA;IAE9B,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAE1C,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAE5C,iBAAiB,CAAC,EAAE,EAAE,CAAA;IAEtB,gBAAgB,CAAC,EAAE,EAAE,CAAA;IAErB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,cAAc,CAAC,EAAE,WAAW,EAAE,CAAA;IAE9B,iBAAiB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAE5C,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,gBAAgB,CAAC,EAAE,OAAO,CAA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AE,OAAO,CAAC,eAAe,CAAC,CAAA;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,OAAO,EAAE,GAAG,EAAE,CAAC;QAAC,MAAM,EAAE,GAAG,EAAE,CAAA;KAAE,GAAG,IAAI,CAAA;IAChF,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAA;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;IAClE,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAA;CACnC;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B"}
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const utils = require("@maxax/utils");
|
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const BScroll = require("@better-scroll/core");
|
|
6
6
|
const naiveUi = require("naive-ui");
|
|
7
|
-
const utils$1 = require("./utils-
|
|
7
|
+
const utils$1 = require("./utils-CZ5-pOW7.cjs");
|
|
8
8
|
const lodashEs = require("lodash-es");
|
|
9
9
|
const vxePcUi = require("vxe-pc-ui");
|
|
10
10
|
const vxeTable = require("vxe-table");
|
|
@@ -6596,7 +6596,7 @@ vxeTable.VxeUI.setConfig({
|
|
|
6596
6596
|
});
|
|
6597
6597
|
const XBasicTable = utils.withInstall(_sfc_main$F);
|
|
6598
6598
|
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
6599
|
-
__name: "
|
|
6599
|
+
__name: "PreviewModal",
|
|
6600
6600
|
props: {
|
|
6601
6601
|
previewWidth: {},
|
|
6602
6602
|
previewColumns: {},
|
|
@@ -6611,15 +6611,17 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
6611
6611
|
const basicTableRef = vue.useTemplateRef("basicTableRef");
|
|
6612
6612
|
const { b: bm, e: em } = useNamespace("basic-button-import-max-modal");
|
|
6613
6613
|
const { t } = useLocale();
|
|
6614
|
-
const tableDataCount = vue.ref(0);
|
|
6615
6614
|
const tableData = vue.ref([]);
|
|
6615
|
+
const errorData = vue.ref([]);
|
|
6616
6616
|
const { visible, show, hide } = useBasicDrawerModal({
|
|
6617
6617
|
async onShow(context) {
|
|
6618
|
-
var _a, _b
|
|
6618
|
+
var _a, _b;
|
|
6619
6619
|
await vue.nextTick();
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6620
|
+
const list = ((_a = context.data) == null ? void 0 : _a.list) || [];
|
|
6621
|
+
const errorList = list.filter((item) => item.errorMsg);
|
|
6622
|
+
tableData.value = list;
|
|
6623
|
+
errorData.value = errorList;
|
|
6624
|
+
(_b = basicTableRef.value) == null ? void 0 : _b.setTableData(list);
|
|
6623
6625
|
}
|
|
6624
6626
|
});
|
|
6625
6627
|
const previewModalStyle = vue.computed(() => {
|
|
@@ -6632,8 +6634,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
6632
6634
|
showHeaderOverflow: "tooltip",
|
|
6633
6635
|
height: 400,
|
|
6634
6636
|
toolbarConfig: {
|
|
6635
|
-
|
|
6636
|
-
custom: false
|
|
6637
|
+
enabled: false
|
|
6637
6638
|
},
|
|
6638
6639
|
showCheckboxColumn: false,
|
|
6639
6640
|
...props.previewTableProps,
|
|
@@ -6641,10 +6642,9 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
6641
6642
|
};
|
|
6642
6643
|
});
|
|
6643
6644
|
function onConfirm() {
|
|
6644
|
-
var _a
|
|
6645
|
-
const
|
|
6646
|
-
|
|
6647
|
-
emit("confirm", { data, records });
|
|
6645
|
+
var _a;
|
|
6646
|
+
const records = ((_a = basicTableRef.value) == null ? void 0 : _a.getSelectRows()) || [];
|
|
6647
|
+
emit("confirm", { data: tableData.value, records, errors: errorData.value });
|
|
6648
6648
|
}
|
|
6649
6649
|
__expose({
|
|
6650
6650
|
show,
|
|
@@ -6669,12 +6669,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
6669
6669
|
}, [
|
|
6670
6670
|
vue.createElementVNode("div", {
|
|
6671
6671
|
class: vue.normalizeClass(vue.unref(em)("footer-left"))
|
|
6672
|
-
},
|
|
6673
|
-
props.showPreviewCount ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6674
|
-
key: 0,
|
|
6675
|
-
class: vue.normalizeClass(vue.unref(em)("preview-count"))
|
|
6676
|
-
}, vue.toDisplayString(vue.unref(t)("max.import.totalCount")) + ": " + vue.toDisplayString(tableDataCount.value), 3)) : vue.createCommentVNode("", true)
|
|
6677
|
-
], 2),
|
|
6672
|
+
}, null, 2),
|
|
6678
6673
|
vue.createElementVNode("span", {
|
|
6679
6674
|
class: vue.normalizeClass(vue.unref(em)("footer-right"))
|
|
6680
6675
|
}, [
|
|
@@ -6701,9 +6696,21 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
6701
6696
|
]),
|
|
6702
6697
|
default: vue.withCtx(() => [
|
|
6703
6698
|
vue.renderSlot(_ctx.$slots, "preview-table-before", {
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
})
|
|
6699
|
+
tableData: tableData.value,
|
|
6700
|
+
errorData: errorData.value
|
|
6701
|
+
}, () => [
|
|
6702
|
+
props.showPreviewCount ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
6703
|
+
key: 0,
|
|
6704
|
+
class: vue.normalizeClass(vue.unref(em)("preview-count"))
|
|
6705
|
+
}, [
|
|
6706
|
+
vue.createElementVNode("span", {
|
|
6707
|
+
class: vue.normalizeClass(vue.unref(em)("total-count"))
|
|
6708
|
+
}, vue.toDisplayString(vue.unref(t)("max.import.totalCount")) + ": " + vue.toDisplayString(tableData.value.length), 3),
|
|
6709
|
+
vue.createElementVNode("span", {
|
|
6710
|
+
class: vue.normalizeClass(vue.unref(em)("error-count"))
|
|
6711
|
+
}, vue.toDisplayString(vue.unref(t)("max.import.errorCount")) + ": " + vue.toDisplayString(errorData.value.length), 3)
|
|
6712
|
+
], 2)) : vue.createCommentVNode("", true)
|
|
6713
|
+
]),
|
|
6707
6714
|
vue.createElementVNode("div", {
|
|
6708
6715
|
class: vue.normalizeClass(vue.unref(em)("preview-table"))
|
|
6709
6716
|
}, [
|
|
@@ -6713,8 +6720,8 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
6713
6720
|
}), null, 16)
|
|
6714
6721
|
], 2),
|
|
6715
6722
|
vue.renderSlot(_ctx.$slots, "preview-table-after", {
|
|
6716
|
-
|
|
6717
|
-
|
|
6723
|
+
tableData: tableData.value,
|
|
6724
|
+
errorData: errorData.value
|
|
6718
6725
|
})
|
|
6719
6726
|
]),
|
|
6720
6727
|
_: 3
|
|
@@ -8377,7 +8384,7 @@ const BasicUpload = /* @__PURE__ */ vue.defineComponent({
|
|
|
8377
8384
|
const XBasicUpload = utils.withInstall(BasicUpload);
|
|
8378
8385
|
const _hoisted_1$8 = { key: 0 };
|
|
8379
8386
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
8380
|
-
__name: "
|
|
8387
|
+
__name: "UploadModal",
|
|
8381
8388
|
props: {
|
|
8382
8389
|
width: {},
|
|
8383
8390
|
showTplButton: { type: Boolean },
|
|
@@ -8545,7 +8552,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
8545
8552
|
previewColumns: {},
|
|
8546
8553
|
previewTableProps: {},
|
|
8547
8554
|
previewTitle: {},
|
|
8548
|
-
showPreviewCount: { type: Boolean },
|
|
8555
|
+
showPreviewCount: { type: Boolean, default: true },
|
|
8549
8556
|
saveApi: {},
|
|
8550
8557
|
beforeSaveInterceptor: {},
|
|
8551
8558
|
beforeFetchSave: {},
|
|
@@ -8563,6 +8570,10 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
8563
8570
|
const currentFile = vue.ref(null);
|
|
8564
8571
|
const currentChecked = vue.ref(false);
|
|
8565
8572
|
async function runBeforeSaveGuard(payload) {
|
|
8573
|
+
if (payload.errors.length > 0) {
|
|
8574
|
+
XBasicNotification.error("存在校验失败的数据,请检查");
|
|
8575
|
+
return false;
|
|
8576
|
+
}
|
|
8566
8577
|
if (!props.beforeSaveInterceptor || !lodashEs.isFunction(props.beforeSaveInterceptor)) return true;
|
|
8567
8578
|
try {
|
|
8568
8579
|
const result = await props.beforeSaveInterceptor(payload);
|
|
@@ -8598,7 +8609,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
8598
8609
|
(_b = previewModalRef.value) == null ? void 0 : _b.show({ type: "other", data: { list: resultItems } });
|
|
8599
8610
|
return;
|
|
8600
8611
|
}
|
|
8601
|
-
emit("import", { data: res, checked, file });
|
|
8612
|
+
emit("import", { data: res, checked, file, records: [] });
|
|
8602
8613
|
(_c = uploadModalRef.value) == null ? void 0 : _c.hide();
|
|
8603
8614
|
} catch (error) {
|
|
8604
8615
|
console.error(error);
|
|
@@ -8639,10 +8650,10 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
8639
8650
|
}).catch(() => {
|
|
8640
8651
|
});
|
|
8641
8652
|
}
|
|
8642
|
-
async function onPreviewConfirm({ data, records }) {
|
|
8653
|
+
async function onPreviewConfirm({ data, records, errors }) {
|
|
8643
8654
|
var _a, _b, _c, _d;
|
|
8644
8655
|
if (!currentFile.value) return false;
|
|
8645
|
-
const canSave = await runBeforeSaveGuard({ data, records, checked: currentChecked.value, file: currentFile.value });
|
|
8656
|
+
const canSave = await runBeforeSaveGuard({ data, records, errors, checked: currentChecked.value, file: currentFile.value });
|
|
8646
8657
|
if (!canSave) return false;
|
|
8647
8658
|
if (!props.saveApi) {
|
|
8648
8659
|
emit("preview", { data, checked: currentChecked.value, file: currentFile.value, records });
|