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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "0.4.3",
4
+ "version": "0.4.4",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "dotnetVersion": "1.4.0",
7
7
  "license": "MIT",
@@ -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('{' + i + '}', array[i + 1]);
54
- result = result.replace('[' + i + ']', window.$t('Model_' + array[i + 1]));
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
 
@@ -533,7 +533,7 @@ export default {
533
533
  // 确认框
534
534
  confirm(title, onConfirm) {
535
535
  let swal = this.$swal.fire({
536
- title: this.$t(title),
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.$t(title),
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.$t(message),
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.$t(message),
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.$t(message),
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('{' + i + '}', array[i + 1]);
712
+ result = result.replace('[' + i + ']', array[i + 1]);
712
713
  }
713
714
  }
714
715
 
@@ -310,6 +310,7 @@
310
310
  .ivu-btn > .ivu-icon {
311
311
  width: 16px;
312
312
  line-height: normal;
313
+ /* margin: auto 2px; */
313
314
  }
314
315
 
315
316
  .ivu-btn > .ivu-icon + span,