mooho-base-admin-plus 2.2.6 → 2.2.7

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": "2.2.6",
4
+ "version": "2.2.7",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -329,15 +329,39 @@
329
329
  let key = item.split(':')[0];
330
330
  let value = item.split(':')[1];
331
331
 
332
- column.dataSource.push({
333
- id: key,
334
- name: value
335
- });
332
+ if (column.dataType == 'Integer' || column.dataType == 'BigInteger') {
333
+ column.dataSource.push({
334
+ id: parseInt(key),
335
+ name: value
336
+ });
337
+ } else if (column.dataType == 'Decimal' || column.dataType == 'Float' || column.dataType == 'Double') {
338
+ column.dataSource.push({
339
+ id: parseFloat(key),
340
+ name: value
341
+ });
342
+ } else {
343
+ column.dataSource.push({
344
+ id: key,
345
+ name: value
346
+ });
347
+ }
336
348
  } else {
337
- column.dataSource.push({
338
- id: item,
339
- name: item
340
- });
349
+ if (column.dataType == 'Integer' || column.dataType == 'BigInteger') {
350
+ column.dataSource.push({
351
+ id: parseInt(item),
352
+ name: item
353
+ });
354
+ } else if (column.dataType == 'Decimal' || column.dataType == 'Float' || column.dataType == 'Double') {
355
+ column.dataSource.push({
356
+ id: parseFloat(item),
357
+ name: item
358
+ });
359
+ } else {
360
+ column.dataSource.push({
361
+ id: item,
362
+ name: item
363
+ });
364
+ }
341
365
  }
342
366
  }
343
367
  });
@@ -560,15 +560,39 @@
560
560
  let key = item.split(':')[0];
561
561
  let value = item.split(':')[1];
562
562
 
563
- column.dataSource.push({
564
- id: key,
565
- name: value
566
- });
563
+ if (column.dataType == 'Integer' || column.dataType == 'BigInteger') {
564
+ column.dataSource.push({
565
+ id: parseInt(key),
566
+ name: value
567
+ });
568
+ } else if (column.dataType == 'Decimal' || column.dataType == 'Float' || column.dataType == 'Double') {
569
+ column.dataSource.push({
570
+ id: parseFloat(key),
571
+ name: value
572
+ });
573
+ } else {
574
+ column.dataSource.push({
575
+ id: key,
576
+ name: value
577
+ });
578
+ }
567
579
  } else {
568
- column.dataSource.push({
569
- id: item,
570
- name: item
571
- });
580
+ if (column.dataType == 'Integer' || column.dataType == 'BigInteger') {
581
+ column.dataSource.push({
582
+ id: parseInt(item),
583
+ name: item
584
+ });
585
+ } else if (column.dataType == 'Decimal' || column.dataType == 'Float' || column.dataType == 'Double') {
586
+ column.dataSource.push({
587
+ id: parseFloat(item),
588
+ name: item
589
+ });
590
+ } else {
591
+ column.dataSource.push({
592
+ id: item,
593
+ name: item
594
+ });
595
+ }
572
596
  }
573
597
  }
574
598
  });
@@ -955,15 +955,39 @@
955
955
  let key = item.split(':')[0];
956
956
  let value = item.split(':')[1];
957
957
 
958
- column.dataSource.push({
959
- id: key,
960
- name: value
961
- });
958
+ if (column.dataType == 'Integer' || column.dataType == 'BigInteger') {
959
+ column.dataSource.push({
960
+ id: parseInt(key),
961
+ name: value
962
+ });
963
+ } else if (column.dataType == 'Decimal' || column.dataType == 'Float' || column.dataType == 'Double') {
964
+ column.dataSource.push({
965
+ id: parseFloat(key),
966
+ name: value
967
+ });
968
+ } else {
969
+ column.dataSource.push({
970
+ id: key,
971
+ name: value
972
+ });
973
+ }
962
974
  } else {
963
- column.dataSource.push({
964
- id: item,
965
- name: item
966
- });
975
+ if (column.dataType == 'Integer' || column.dataType == 'BigInteger') {
976
+ column.dataSource.push({
977
+ id: parseInt(item),
978
+ name: item
979
+ });
980
+ } else if (column.dataType == 'Decimal' || column.dataType == 'Float' || column.dataType == 'Double') {
981
+ column.dataSource.push({
982
+ id: parseFloat(item),
983
+ name: item
984
+ });
985
+ } else {
986
+ column.dataSource.push({
987
+ id: item,
988
+ name: item
989
+ });
990
+ }
967
991
  }
968
992
  }
969
993
  });