mooho-base-admin-plus 0.4.3 → 0.4.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/package.json
CHANGED
|
@@ -50,8 +50,8 @@ const tParam = str => {
|
|
|
50
50
|
|
|
51
51
|
if (array.length > 1) {
|
|
52
52
|
for (let i = 0; i < array.length - 1; i++) {
|
|
53
|
-
result = result.replace('
|
|
54
|
-
result = result.replace('
|
|
53
|
+
result = result.replace('[' + i + ']', array[i + 1]);
|
|
54
|
+
result = result.replace('{' + i + '}', window.$t('Model_' + array[i + 1]));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
package/src/mixins/page.js
CHANGED
|
@@ -533,7 +533,7 @@ export default {
|
|
|
533
533
|
// 确认框
|
|
534
534
|
confirm(title, onConfirm) {
|
|
535
535
|
let swal = this.$swal.fire({
|
|
536
|
-
title: this
|
|
536
|
+
title: this.tParam(title),
|
|
537
537
|
icon: 'question',
|
|
538
538
|
confirmButtonText: this.$t('Front_Btn_OK'),
|
|
539
539
|
cancelButtonText: this.$t('Front_Btn_Cancel'),
|
|
@@ -553,7 +553,7 @@ export default {
|
|
|
553
553
|
// 带输入的确认框
|
|
554
554
|
confirmInput(title, inputLabel, onConfirm, preConfirm) {
|
|
555
555
|
let swal = this.$swal.fire({
|
|
556
|
-
title: this
|
|
556
|
+
title: this.tParam(title),
|
|
557
557
|
input: 'text',
|
|
558
558
|
confirmButtonText: this.$t('Front_Btn_OK'),
|
|
559
559
|
cancelButtonText: this.$t('Front_Btn_Cancel'),
|
|
@@ -576,7 +576,7 @@ export default {
|
|
|
576
576
|
// 成功提示
|
|
577
577
|
success(message, onConfirm) {
|
|
578
578
|
var swal = this.$swal.fire({
|
|
579
|
-
title: this
|
|
579
|
+
title: this.tParam(message),
|
|
580
580
|
icon: 'success',
|
|
581
581
|
confirmButtonText: this.$t('Front_Btn_OK')
|
|
582
582
|
});
|
|
@@ -592,7 +592,7 @@ export default {
|
|
|
592
592
|
// 警告提示
|
|
593
593
|
warning(message, onConfirm) {
|
|
594
594
|
var swal = this.$swal.fire({
|
|
595
|
-
title: this
|
|
595
|
+
title: this.tParam(message),
|
|
596
596
|
icon: 'warning',
|
|
597
597
|
confirmButtonText: this.$t('Front_Btn_OK')
|
|
598
598
|
});
|
|
@@ -608,7 +608,7 @@ export default {
|
|
|
608
608
|
// 失败提示
|
|
609
609
|
error(message, onConfirm) {
|
|
610
610
|
var swal = this.$swal.fire({
|
|
611
|
-
title: this
|
|
611
|
+
title: this.tParam(message),
|
|
612
612
|
icon: 'error',
|
|
613
613
|
confirmButtonText: this.$t('Front_Btn_OK')
|
|
614
614
|
});
|
|
@@ -703,12 +703,13 @@ export default {
|
|
|
703
703
|
},
|
|
704
704
|
// 解析多语言带参数
|
|
705
705
|
tParam(str) {
|
|
706
|
+
console.log('str', str);
|
|
706
707
|
let array = str.split('|');
|
|
707
708
|
let result = this.$t(array[0]);
|
|
708
709
|
|
|
709
710
|
if (array.length > 1) {
|
|
710
711
|
for (let i = 0; i < array.length - 1; i++) {
|
|
711
|
-
result = result.replace('
|
|
712
|
+
result = result.replace('[' + i + ']', array[i + 1]);
|
|
712
713
|
}
|
|
713
714
|
}
|
|
714
715
|
|