From d8e78fa8610d65f6bfa23e0dd7070672f41ba3e4 Mon Sep 17 00:00:00 2001
From: zhangyanpeng <bob.zhang@highdatas.com>
Date: 星期六, 03 八月 2024 22:15:16 +0800
Subject: [PATCH] 调整

---
 js/foundation.js |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/js/foundation.js b/js/foundation.js
index 46bee04..05506e0 100644
--- a/js/foundation.js
+++ b/js/foundation.js
@@ -855,6 +855,9 @@
 		itemMap.formatter_percent = formatter_percent;
 		itemMap.formatter_split = formatter_split;
 		itemMap.formatter_password = formatter_password;
+		itemMap.formatter_replace = formatter_replace;
+		itemMap.formatter_replace = formatter_replace;
+		itemMap.formatter_replace_val = formatter_replace_val;
 		
 		
 		itemMap.prefixorunit = formatter_prefixorunit;
@@ -1886,6 +1889,25 @@
 	}
 	return cellValue;
 };
+// //鎷兼帴鐨勫瓧娈垫牸寮� format = "#{name}-{name}%"
+function formatter_replace(row, column, cellValue, index, format) {
+	// 鏈畬鎴�
+	// if (cellValue) {
+	// 	return toPercent(cellValue, digit);
+	// }
+	return cellValue;
+};
+// 鏇挎崲
+function formatter_replace(row, column, cellValue, index, replacefield) {
+	return row[replacefield];
+};
+// 鏈夊�兼浛鎹� cellValue 鏈夊�兼墠鏇挎崲
+function formatter_replace_val(row, column, cellValue, index, replacefield) {
+	if (cellValue) {
+		return row[replacefield]
+	}
+	return cellValue;
+};
 
 ////////////////闈為�氱敤鐨勬牸寮忓寲////////////////
 function formatter_earlyWarning(row, column, cellValue, index) {

--
Gitblit v1.8.0