@v2coding/ui 0.1.20 → 0.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/v2coding-ui.esm.js +6 -32
- package/dist/v2coding-ui.min.js +2 -2
- package/dist/v2coding-ui.ssr.js +7 -39
- package/package.json +1 -1
package/dist/v2coding-ui.esm.js
CHANGED
|
@@ -535,14 +535,9 @@ const getSetting = () => {
|
|
|
535
535
|
return Objects.merge({}, setting);
|
|
536
536
|
};
|
|
537
537
|
|
|
538
|
-
const isFormErrorResponse = result => {
|
|
539
|
-
return result.code === 'FAILURE_PARAM_ERROR';
|
|
540
|
-
};
|
|
541
538
|
/**
|
|
542
539
|
* 自动解析 get/post 请求并提示信息(解析返回信息中的 message/data 字段)
|
|
543
540
|
*/
|
|
544
|
-
|
|
545
|
-
|
|
546
541
|
var AxiosWithMessage = {
|
|
547
542
|
methods: {
|
|
548
543
|
getWithMessage() {
|
|
@@ -553,22 +548,15 @@ var AxiosWithMessage = {
|
|
|
553
548
|
|
|
554
549
|
const {
|
|
555
550
|
success = false,
|
|
556
|
-
data,
|
|
557
551
|
message
|
|
558
552
|
} = result;
|
|
559
553
|
|
|
560
554
|
if (success) {
|
|
561
555
|
message && this.$nextTick(() => this.$message({
|
|
562
556
|
message,
|
|
563
|
-
type:
|
|
557
|
+
type: 'success'
|
|
564
558
|
}));
|
|
565
|
-
}
|
|
566
|
-
const err = Object.values(data);
|
|
567
|
-
err.length && this.$nextTick(() => this.$message.error({
|
|
568
|
-
dangerouslyUseHTMLString: true,
|
|
569
|
-
message: err.join(';<br/>')
|
|
570
|
-
}));
|
|
571
|
-
} else ;
|
|
559
|
+
}
|
|
572
560
|
|
|
573
561
|
return result;
|
|
574
562
|
});
|
|
@@ -582,22 +570,15 @@ var AxiosWithMessage = {
|
|
|
582
570
|
|
|
583
571
|
const {
|
|
584
572
|
success = false,
|
|
585
|
-
data,
|
|
586
573
|
message = `操作${success ? '成功' : '失败'}`
|
|
587
574
|
} = result;
|
|
588
575
|
|
|
589
576
|
if (success) {
|
|
590
577
|
message && this.$nextTick(() => this.$message({
|
|
591
578
|
message,
|
|
592
|
-
type:
|
|
579
|
+
type: 'success'
|
|
593
580
|
}));
|
|
594
|
-
}
|
|
595
|
-
const err = Object.values(data);
|
|
596
|
-
err.length && this.$nextTick(() => this.$message.error({
|
|
597
|
-
dangerouslyUseHTMLString: true,
|
|
598
|
-
message: err.join(';<br/>')
|
|
599
|
-
}));
|
|
600
|
-
} else ;
|
|
581
|
+
}
|
|
601
582
|
|
|
602
583
|
return result;
|
|
603
584
|
});
|
|
@@ -611,22 +592,15 @@ var AxiosWithMessage = {
|
|
|
611
592
|
|
|
612
593
|
const {
|
|
613
594
|
success = false,
|
|
614
|
-
data,
|
|
615
595
|
message
|
|
616
596
|
} = result;
|
|
617
597
|
|
|
618
598
|
if (success) {
|
|
619
599
|
message && this.$nextTick(() => this.$message({
|
|
620
600
|
message,
|
|
621
|
-
type:
|
|
601
|
+
type: 'success'
|
|
622
602
|
}));
|
|
623
|
-
}
|
|
624
|
-
const err = Object.values(data);
|
|
625
|
-
err.length && this.$nextTick(() => this.$message.error({
|
|
626
|
-
dangerouslyUseHTMLString: true,
|
|
627
|
-
message: err.join(';<br/>')
|
|
628
|
-
}));
|
|
629
|
-
} else ;
|
|
603
|
+
}
|
|
630
604
|
|
|
631
605
|
return result;
|
|
632
606
|
});
|