From 716d80715cbf7fbbb465fbbd452b420a8c87e6e1 Mon Sep 17 00:00:00 2001 From: mingsoft Date: Thu, 30 Dec 2021 14:14:09 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=B5=84=E6=BA=90=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/plugins/ms/1.0.0/ms.vue.expand.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/webapp/static/plugins/ms/1.0.0/ms.vue.expand.js diff --git a/src/main/webapp/static/plugins/ms/1.0.0/ms.vue.expand.js b/src/main/webapp/static/plugins/ms/1.0.0/ms.vue.expand.js new file mode 100644 index 00000000..a2cccf83 --- /dev/null +++ b/src/main/webapp/static/plugins/ms/1.0.0/ms.vue.expand.js @@ -0,0 +1,21 @@ +/** + * vue 扩展属性方法 + * 表格中的数字需要格式化金钱类型或百分数 + */ +(function() { + Vue.prototype.$table = {} + Vue.prototype.$table.moneyFormatter = function (row, column, cellValue, index) { + if (cellValue != undefined) { + return accounting.formatMoney(cellValue, '¥') + } else { + return '' + } + } + Vue.prototype.$table.percentageFormatter = function (row, column, cellValue, index) { + if (cellValue != undefined) { + return cellValue+"%"; + } else { + return '-' + } + } +}())