فهرست منبع

资源文件更新

mingsoft 3 سال پیش
والد
کامیت
716d80715c
1فایلهای تغییر یافته به همراه21 افزوده شده و 0 حذف شده
  1. 21 0
      src/main/webapp/static/plugins/ms/1.0.0/ms.vue.expand.js

+ 21 - 0
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 '-'
+        }
+    }
+}())