Elements-SY

Merge branch 'et86' into fix-issues

......@@ -223,7 +223,7 @@ export function getTime(type) {
* @return {*}
*/
export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result;
let timeout, args, context, timestamp, result, data;
const later = function () {
// 据上一次触发时间间隔
......@@ -236,7 +236,7 @@ export function debounce(func, wait, immediate) {
timeout = null;
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if (!immediate) {
result = func.apply(context, args);
result = func.apply(context, data);
if (!timeout) context = args = null;
}
}
......@@ -245,6 +245,7 @@ export function debounce(func, wait, immediate) {
return function (...args) {
context = this;
timestamp = +new Date();
data = args;
const callNow = immediate && !timeout;
// 如果延时不存在,重新设定延时
if (!timeout) timeout = setTimeout(later, wait);
......
......@@ -240,7 +240,7 @@ export const inputBlurValidate = {
let markCoin = false;
if (value.length) {
this[customVal] = Number(value);
// 其中一个有值的情况下
// 其中一个有值的情况下人民币
if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") {
if (this.minCNYCustomVal && this.maxCNYCustomVal) {
this.validateForm = false;
......@@ -251,7 +251,7 @@ export const inputBlurValidate = {
this.$refs[coin[customVal]].innerHTML = "";
}
}
// 都有值的情况下
// 都有值的情况下美元
else {
if (this.minSUDCustomVal && this.maxSUDCustomVal) {
this.validateForm = false;
......@@ -278,20 +278,6 @@ export const inputBlurValidate = {
// this.validateForm = true;
// this.$refs[coin[customVal]].innerHTML = "";
// }
} else {
if (value.length) {
// 判断申报价值不得大于上限
// if (Number(value) > currency[customVal]) {
// this.validateForm = false;
// this.$refs[coin[customVal]].innerHTML = "";
// this.$refs[
// coin[customVal]
// ].innerHTML = `最大申报值不得大于${currency[customVal]}`;
// } else {
// this.validateForm = true;
// this.$refs[coin[customVal]].innerHTML = "";
// }
}
}
} else {
this.validateForm = false;
......