Ver Fonte

修改失焦与加减同时触发bug

xiaohaizhao há 1 ano atrás
pai
commit
f5394ebcee
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      packageA/market/detail.js

+ 3 - 0
packageA/market/detail.js

@@ -200,6 +200,9 @@ Page({
 			const data = this.data[name];
 			content[name2] = (e.detail.value - 0).toFixed(data.decimalplaces);
 		}
+		let item = this.data[name];
+		if (content[name2] > item.max) content[name2] = item.max;
+		if (content[name2] < item.min) content[name2] = item.min;
 		this.setData({
 			content
 		})