Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-09-15 17:34:53 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c3d706ffc748ec09cc71466f405f3911c202d23e
c3d706ff
2 parents
a32fd54d
b67eb766
Merge branch 'et86' into fix-issues
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
18 deletions
src/utils/index.js
src/utils/mixins.js
src/utils/index.js
View file @
c3d706f
...
...
@@ -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
);
...
...
src/utils/mixins.js
View file @
c3d706f
...
...
@@ -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
;
...
...
Please
register
or
login
to post a comment