Elements-SY

Merge branch 'et86' into fix-issues

...@@ -223,7 +223,7 @@ export function getTime(type) { ...@@ -223,7 +223,7 @@ export function getTime(type) {
223 * @return {*} 223 * @return {*}
224 */ 224 */
225 export function debounce(func, wait, immediate) { 225 export function debounce(func, wait, immediate) {
226 - let timeout, args, context, timestamp, result; 226 + let timeout, args, context, timestamp, result, data;
227 227
228 const later = function () { 228 const later = function () {
229 // 据上一次触发时间间隔 229 // 据上一次触发时间间隔
...@@ -236,7 +236,7 @@ export function debounce(func, wait, immediate) { ...@@ -236,7 +236,7 @@ export function debounce(func, wait, immediate) {
236 timeout = null; 236 timeout = null;
237 // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 237 // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
238 if (!immediate) { 238 if (!immediate) {
239 - result = func.apply(context, args); 239 + result = func.apply(context, data);
240 if (!timeout) context = args = null; 240 if (!timeout) context = args = null;
241 } 241 }
242 } 242 }
...@@ -245,6 +245,7 @@ export function debounce(func, wait, immediate) { ...@@ -245,6 +245,7 @@ export function debounce(func, wait, immediate) {
245 return function (...args) { 245 return function (...args) {
246 context = this; 246 context = this;
247 timestamp = +new Date(); 247 timestamp = +new Date();
248 + data = args;
248 const callNow = immediate && !timeout; 249 const callNow = immediate && !timeout;
249 // 如果延时不存在,重新设定延时 250 // 如果延时不存在,重新设定延时
250 if (!timeout) timeout = setTimeout(later, wait); 251 if (!timeout) timeout = setTimeout(later, wait);
......
...@@ -240,7 +240,7 @@ export const inputBlurValidate = { ...@@ -240,7 +240,7 @@ export const inputBlurValidate = {
240 let markCoin = false; 240 let markCoin = false;
241 if (value.length) { 241 if (value.length) {
242 this[customVal] = Number(value); 242 this[customVal] = Number(value);
243 - // 其中一个有值的情况下 243 + // 其中一个有值的情况下人民币
244 if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") { 244 if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") {
245 if (this.minCNYCustomVal && this.maxCNYCustomVal) { 245 if (this.minCNYCustomVal && this.maxCNYCustomVal) {
246 this.validateForm = false; 246 this.validateForm = false;
...@@ -251,7 +251,7 @@ export const inputBlurValidate = { ...@@ -251,7 +251,7 @@ export const inputBlurValidate = {
251 this.$refs[coin[customVal]].innerHTML = ""; 251 this.$refs[coin[customVal]].innerHTML = "";
252 } 252 }
253 } 253 }
254 - // 都有值的情况下 254 + // 都有值的情况下美元
255 else { 255 else {
256 if (this.minSUDCustomVal && this.maxSUDCustomVal) { 256 if (this.minSUDCustomVal && this.maxSUDCustomVal) {
257 this.validateForm = false; 257 this.validateForm = false;
...@@ -278,20 +278,6 @@ export const inputBlurValidate = { ...@@ -278,20 +278,6 @@ export const inputBlurValidate = {
278 // this.validateForm = true; 278 // this.validateForm = true;
279 // this.$refs[coin[customVal]].innerHTML = ""; 279 // this.$refs[coin[customVal]].innerHTML = "";
280 // } 280 // }
281 - } else {
282 - if (value.length) {
283 - // 判断申报价值不得大于上限
284 - // if (Number(value) > currency[customVal]) {
285 - // this.validateForm = false;
286 - // this.$refs[coin[customVal]].innerHTML = "";
287 - // this.$refs[
288 - // coin[customVal]
289 - // ].innerHTML = `最大申报值不得大于${currency[customVal]}`;
290 - // } else {
291 - // this.validateForm = true;
292 - // this.$refs[coin[customVal]].innerHTML = "";
293 - // }
294 - }
295 } 281 }
296 } else { 282 } else {
297 this.validateForm = false; 283 this.validateForm = false;
......