w-table-vue 1.0.13 → 1.0.14
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/README.md +1 -1
- package/dist/w-table-vue.umd.js +3 -3
- package/dist/w-table-vue.umd.js.map +1 -1
- package/docs/examples/app.html +1 -1
- package/docs/examples/app.umd.js +2 -2
- package/docs/examples/app.umd.js.map +1 -1
- package/docs/examples/w-table-edit_default.html +26 -1
- package/docs/examples/w-table-edit_editable.html +26 -1
- package/docs/examples/w-table-edit_editable_checkId.html +26 -1
- package/docs/examples/w-table-edit_editable_checkId_opt.modifyDataWhenSave_save(call cmp. method).html +26 -1
- package/docs/examples/w-table-edit_editable_checkId_successMsgFromAddRow_errorMsgFromAddRow.html +26 -1
- package/docs/examples/w-table-edit_editable_inforPaddingStyle_menuBackgroundColor.html +26 -1
- package/docs/examples/w-table-edit_editable_language_checkId_tooltipAddRow.html +26 -1
- package/docs/examples/w-table-edit_editable_language_textLabelDataName_textPlaceholderDataName.html +26 -1
- package/docs/examples/w-table-edit_editable_no enableInfor.html +26 -1
- package/docs/examples/w-table-edit_editable_no enableMenu.html +26 -1
- package/docs/examples/w-table-edit_editable_opt.beforeAddRow.html +26 -1
- package/docs/examples/w-table-edit_editable_opt.kpCellFormat_no useCellFormatWhenDownload.html +543 -0
- package/docs/examples/w-table-edit_editable_opt.kpConvertKeysWhenUploadData.html +26 -1
- package/docs/examples/w-table-edit_editable_opt.optForUploadData.html +26 -1
- package/docs/examples/w-table-edit_editable_slot btns-right.html +26 -1
- package/docs/examples/w-table-edit_fixIds (fix id).html +26 -1
- package/docs/examples/w-table-edit_hideIds (hide mappingId).html +26 -1
- package/docs/examples/w-table-edit_name_description.html +26 -1
- package/docs/examples/w-table-edit_no enableInfor.html +26 -1
- package/docs/examples/w-table-edit_no enableMenu.html +26 -1
- package/docs/examples/w-table-edit_opt.kpCellFormat.html +539 -0
- package/docs/examples/w-table-edit_opt.kpHead.html +26 -1
- package/docs/examples/w-table-edit_removeIdsWhenDownload (remove id, mappingId, order, isActive).html +26 -1
- package/docs/examples/w-table-edit_slot btns-left.html +26 -1
- package/docs/examples/w-table-edit_slot btns-right.html +26 -1
- package/docs/examples/w-table-edit_slot cell-render.html +26 -1
- package/docs/examples/w-table-edit_slot cell-tooltip.html +26 -1
- package/docs/examples/w-table-edit_slot head-render.html +26 -1
- package/docs/examples/w-table-edit_slot head-tooltip.html +26 -1
- package/docs/examples/w-table-edit_slot infor (name_description).html +26 -1
- package/docs/examples/w-table-edit_sortColIds (sort by order).html +26 -1
- package/docs/index.html +1 -1
- package/docs/module-WTableEdit.html +27 -3
- package/package.json +2 -2
- package/src/AppZoneWTableEdit.vue +61 -0
- package/src/components/WTableEdit.vue +12 -5
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -480,6 +480,31 @@
|
|
|
480
480
|
}
|
|
481
481
|
return rows;
|
|
482
482
|
}
|
|
483
|
+
},
|
|
484
|
+
opt8: {
|
|
485
|
+
keys: keys1,
|
|
486
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
487
|
+
rows: rows1,
|
|
488
|
+
kpCellFormat: {
|
|
489
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
490
|
+
make: function(value, key, row, params) {
|
|
491
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
492
|
+
if (value === null || value === undefined || value === "") {
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
495
|
+
return String(value).toUpperCase();
|
|
496
|
+
},
|
|
497
|
+
price: function(value, key, row, params) {
|
|
498
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
499
|
+
if (value === null || value === undefined || value === "") {
|
|
500
|
+
return null;
|
|
501
|
+
}
|
|
502
|
+
return Number(value).toLocaleString("en-US", {
|
|
503
|
+
minimumFractionDigits: 2,
|
|
504
|
+
maximumFractionDigits: 2
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
}
|
|
483
508
|
}
|
|
484
509
|
},
|
|
485
510
|
actions: []
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -483,6 +483,31 @@
|
|
|
483
483
|
}
|
|
484
484
|
return rows;
|
|
485
485
|
}
|
|
486
|
+
},
|
|
487
|
+
opt8: {
|
|
488
|
+
keys: keys1,
|
|
489
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
490
|
+
rows: rows1,
|
|
491
|
+
kpCellFormat: {
|
|
492
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
493
|
+
make: function(value, key, row, params) {
|
|
494
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
495
|
+
if (value === null || value === undefined || value === "") {
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
498
|
+
return String(value).toUpperCase();
|
|
499
|
+
},
|
|
500
|
+
price: function(value, key, row, params) {
|
|
501
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
502
|
+
if (value === null || value === undefined || value === "") {
|
|
503
|
+
return null;
|
|
504
|
+
}
|
|
505
|
+
return Number(value).toLocaleString("en-US", {
|
|
506
|
+
minimumFractionDigits: 2,
|
|
507
|
+
maximumFractionDigits: 2
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
}
|
|
486
511
|
}
|
|
487
512
|
},
|
|
488
513
|
actions: []
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -484,6 +484,31 @@
|
|
|
484
484
|
}
|
|
485
485
|
return rows;
|
|
486
486
|
}
|
|
487
|
+
},
|
|
488
|
+
opt8: {
|
|
489
|
+
keys: keys1,
|
|
490
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
491
|
+
rows: rows1,
|
|
492
|
+
kpCellFormat: {
|
|
493
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
494
|
+
make: function(value, key, row, params) {
|
|
495
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
496
|
+
if (value === null || value === undefined || value === "") {
|
|
497
|
+
return null;
|
|
498
|
+
}
|
|
499
|
+
return String(value).toUpperCase();
|
|
500
|
+
},
|
|
501
|
+
price: function(value, key, row, params) {
|
|
502
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
503
|
+
if (value === null || value === undefined || value === "") {
|
|
504
|
+
return null;
|
|
505
|
+
}
|
|
506
|
+
return Number(value).toLocaleString("en-US", {
|
|
507
|
+
minimumFractionDigits: 2,
|
|
508
|
+
maximumFractionDigits: 2
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
|
487
512
|
}
|
|
488
513
|
},
|
|
489
514
|
actions: []
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -499,6 +499,31 @@
|
|
|
499
499
|
}
|
|
500
500
|
return rows;
|
|
501
501
|
}
|
|
502
|
+
},
|
|
503
|
+
opt8: {
|
|
504
|
+
keys: keys1,
|
|
505
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
506
|
+
rows: rows1,
|
|
507
|
+
kpCellFormat: {
|
|
508
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
509
|
+
make: function(value, key, row, params) {
|
|
510
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
511
|
+
if (value === null || value === undefined || value === "") {
|
|
512
|
+
return null;
|
|
513
|
+
}
|
|
514
|
+
return String(value).toUpperCase();
|
|
515
|
+
},
|
|
516
|
+
price: function(value, key, row, params) {
|
|
517
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
518
|
+
if (value === null || value === undefined || value === "") {
|
|
519
|
+
return null;
|
|
520
|
+
}
|
|
521
|
+
return Number(value).toLocaleString("en-US", {
|
|
522
|
+
minimumFractionDigits: 2,
|
|
523
|
+
maximumFractionDigits: 2
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
}
|
|
502
527
|
}
|
|
503
528
|
},
|
|
504
529
|
actions: []
|
package/docs/examples/w-table-edit_editable_checkId_successMsgFromAddRow_errorMsgFromAddRow.html
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -494,6 +494,31 @@
|
|
|
494
494
|
}
|
|
495
495
|
return rows;
|
|
496
496
|
}
|
|
497
|
+
},
|
|
498
|
+
opt8: {
|
|
499
|
+
keys: keys1,
|
|
500
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
501
|
+
rows: rows1,
|
|
502
|
+
kpCellFormat: {
|
|
503
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
504
|
+
make: function(value, key, row, params) {
|
|
505
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
506
|
+
if (value === null || value === undefined || value === "") {
|
|
507
|
+
return null;
|
|
508
|
+
}
|
|
509
|
+
return String(value).toUpperCase();
|
|
510
|
+
},
|
|
511
|
+
price: function(value, key, row, params) {
|
|
512
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
513
|
+
if (value === null || value === undefined || value === "") {
|
|
514
|
+
return null;
|
|
515
|
+
}
|
|
516
|
+
return Number(value).toLocaleString("en-US", {
|
|
517
|
+
minimumFractionDigits: 2,
|
|
518
|
+
maximumFractionDigits: 2
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
}
|
|
497
522
|
}
|
|
498
523
|
},
|
|
499
524
|
actions: []
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -489,6 +489,31 @@
|
|
|
489
489
|
}
|
|
490
490
|
return rows;
|
|
491
491
|
}
|
|
492
|
+
},
|
|
493
|
+
opt8: {
|
|
494
|
+
keys: keys1,
|
|
495
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
496
|
+
rows: rows1,
|
|
497
|
+
kpCellFormat: {
|
|
498
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
499
|
+
make: function(value, key, row, params) {
|
|
500
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
501
|
+
if (value === null || value === undefined || value === "") {
|
|
502
|
+
return null;
|
|
503
|
+
}
|
|
504
|
+
return String(value).toUpperCase();
|
|
505
|
+
},
|
|
506
|
+
price: function(value, key, row, params) {
|
|
507
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
508
|
+
if (value === null || value === undefined || value === "") {
|
|
509
|
+
return null;
|
|
510
|
+
}
|
|
511
|
+
return Number(value).toLocaleString("en-US", {
|
|
512
|
+
minimumFractionDigits: 2,
|
|
513
|
+
maximumFractionDigits: 2
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
}
|
|
492
517
|
}
|
|
493
518
|
},
|
|
494
519
|
actions: []
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -495,6 +495,31 @@
|
|
|
495
495
|
}
|
|
496
496
|
return rows;
|
|
497
497
|
}
|
|
498
|
+
},
|
|
499
|
+
opt8: {
|
|
500
|
+
keys: keys1,
|
|
501
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
502
|
+
rows: rows1,
|
|
503
|
+
kpCellFormat: {
|
|
504
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
505
|
+
make: function(value, key, row, params) {
|
|
506
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
507
|
+
if (value === null || value === undefined || value === "") {
|
|
508
|
+
return null;
|
|
509
|
+
}
|
|
510
|
+
return String(value).toUpperCase();
|
|
511
|
+
},
|
|
512
|
+
price: function(value, key, row, params) {
|
|
513
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
514
|
+
if (value === null || value === undefined || value === "") {
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
return Number(value).toLocaleString("en-US", {
|
|
518
|
+
minimumFractionDigits: 2,
|
|
519
|
+
maximumFractionDigits: 2
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
}
|
|
498
523
|
}
|
|
499
524
|
},
|
|
500
525
|
actions: []
|
package/docs/examples/w-table-edit_editable_language_textLabelDataName_textPlaceholderDataName.html
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -490,6 +490,31 @@
|
|
|
490
490
|
}
|
|
491
491
|
return rows;
|
|
492
492
|
}
|
|
493
|
+
},
|
|
494
|
+
opt8: {
|
|
495
|
+
keys: keys1,
|
|
496
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
497
|
+
rows: rows1,
|
|
498
|
+
kpCellFormat: {
|
|
499
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
500
|
+
make: function(value, key, row, params) {
|
|
501
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
502
|
+
if (value === null || value === undefined || value === "") {
|
|
503
|
+
return null;
|
|
504
|
+
}
|
|
505
|
+
return String(value).toUpperCase();
|
|
506
|
+
},
|
|
507
|
+
price: function(value, key, row, params) {
|
|
508
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
509
|
+
if (value === null || value === undefined || value === "") {
|
|
510
|
+
return null;
|
|
511
|
+
}
|
|
512
|
+
return Number(value).toLocaleString("en-US", {
|
|
513
|
+
minimumFractionDigits: 2,
|
|
514
|
+
maximumFractionDigits: 2
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
493
518
|
}
|
|
494
519
|
},
|
|
495
520
|
actions: []
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -484,6 +484,31 @@
|
|
|
484
484
|
}
|
|
485
485
|
return rows;
|
|
486
486
|
}
|
|
487
|
+
},
|
|
488
|
+
opt8: {
|
|
489
|
+
keys: keys1,
|
|
490
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
491
|
+
rows: rows1,
|
|
492
|
+
kpCellFormat: {
|
|
493
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
494
|
+
make: function(value, key, row, params) {
|
|
495
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
496
|
+
if (value === null || value === undefined || value === "") {
|
|
497
|
+
return null;
|
|
498
|
+
}
|
|
499
|
+
return String(value).toUpperCase();
|
|
500
|
+
},
|
|
501
|
+
price: function(value, key, row, params) {
|
|
502
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
503
|
+
if (value === null || value === undefined || value === "") {
|
|
504
|
+
return null;
|
|
505
|
+
}
|
|
506
|
+
return Number(value).toLocaleString("en-US", {
|
|
507
|
+
minimumFractionDigits: 2,
|
|
508
|
+
maximumFractionDigits: 2
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
|
487
512
|
}
|
|
488
513
|
},
|
|
489
514
|
actions: []
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -484,6 +484,31 @@
|
|
|
484
484
|
}
|
|
485
485
|
return rows;
|
|
486
486
|
}
|
|
487
|
+
},
|
|
488
|
+
opt8: {
|
|
489
|
+
keys: keys1,
|
|
490
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
491
|
+
rows: rows1,
|
|
492
|
+
kpCellFormat: {
|
|
493
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
494
|
+
make: function(value, key, row, params) {
|
|
495
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
496
|
+
if (value === null || value === undefined || value === "") {
|
|
497
|
+
return null;
|
|
498
|
+
}
|
|
499
|
+
return String(value).toUpperCase();
|
|
500
|
+
},
|
|
501
|
+
price: function(value, key, row, params) {
|
|
502
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
503
|
+
if (value === null || value === undefined || value === "") {
|
|
504
|
+
return null;
|
|
505
|
+
}
|
|
506
|
+
return Number(value).toLocaleString("en-US", {
|
|
507
|
+
minimumFractionDigits: 2,
|
|
508
|
+
maximumFractionDigits: 2
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
|
487
512
|
}
|
|
488
513
|
},
|
|
489
514
|
actions: []
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
45
|
<!-- w-table-vue -->
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-table-vue@1.0.14/dist/w-table-vue.umd.js"></script>
|
|
47
47
|
|
|
48
48
|
<style>
|
|
49
49
|
.item {
|
|
@@ -483,6 +483,31 @@
|
|
|
483
483
|
}
|
|
484
484
|
return rows;
|
|
485
485
|
}
|
|
486
|
+
},
|
|
487
|
+
opt8: {
|
|
488
|
+
keys: keys1,
|
|
489
|
+
kpHeadFilterType: kpHeadFilterType1,
|
|
490
|
+
rows: rows1,
|
|
491
|
+
kpCellFormat: {
|
|
492
|
+
//格式化僅影響顯示與下載, 排序、過濾、編輯與save回傳之rows仍為原值
|
|
493
|
+
make: function(value, key, row, params) {
|
|
494
|
+
//空值(null、undefined、空字串)會原樣傳入, 編輯模式新增列之各欄為空字串, 回傳null代表不格式化維持原值
|
|
495
|
+
if (value === null || value === undefined || value === "") {
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
498
|
+
return String(value).toUpperCase();
|
|
499
|
+
},
|
|
500
|
+
price: function(value, key, row, params) {
|
|
501
|
+
//空值不可直接Number(), 否則''與null會變成0.00
|
|
502
|
+
if (value === null || value === undefined || value === "") {
|
|
503
|
+
return null;
|
|
504
|
+
}
|
|
505
|
+
return Number(value).toLocaleString("en-US", {
|
|
506
|
+
minimumFractionDigits: 2,
|
|
507
|
+
maximumFractionDigits: 2
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
}
|
|
486
511
|
}
|
|
487
512
|
},
|
|
488
513
|
actions: []
|