Commit 98b43fc2 by liimin

lint

1 parent bc0adc2a
......@@ -356,14 +356,14 @@ export default {
// }
// })
},
// 防抖
debounce (fn, delay = 50) {
let timer = null
return (...args) => {
clearTimeout(timer)
timer = setTimeout(() => {
fn.apply(this. args)
fn.apply(this.args)
}, delay)
}
},
......
......@@ -103,8 +103,8 @@
>
<template slot-scope="scope">
<template v-if="item.prop === 'status'">
<el-tag
style="width:80px; font-size: 14px;"
<el-tag
style="width:80px; font-size: 14px;"
:type="tag.type[scope.row.status]"
>{{tag.label[scope.row.status]}}</el-tag>
</template>
......@@ -251,7 +251,7 @@ export default {
return (...args) => {
clearTimeout(timer)
timer = setTimeout(() => {
fn.apply(this. args)
fn.apply(this.args)
}, delay)
}
},
......
......@@ -188,7 +188,7 @@ export default {
return (...args) => {
clearTimeout(timer)
timer = setTimeout(() => {
fn.apply(this. args)
fn.apply(this.args)
}, delay)
}
},
......
......@@ -257,7 +257,7 @@ export default {
return (...args) => {
clearTimeout(timer)
timer = setTimeout(() => {
fn.apply(this. args)
fn.apply(this.args)
}, delay)
}
},
......
......@@ -296,7 +296,7 @@ export default {
return (...args) => {
clearTimeout(timer)
timer = setTimeout(() => {
fn.apply(this. args)
fn.apply(this.args)
}, delay)
}
},
......
......@@ -145,7 +145,7 @@ import { BaseData } from '@/common/constants'
// import { mapActions } from 'vuex'
import { getListApi, methods, editApi, removeApi } from '@api/trafficManagement'
import notice from '@/common/notice'
import { clearTimeout, setTimeout } from 'timers';
import { clearTimeout, setTimeout } from 'timers'
// import { debounce } from 'lodash';
export default {
name: 'fimsTrafficManagement',
......@@ -233,7 +233,7 @@ export default {
return (...args) => {
clearTimeout(timer)
timer = setTimeout(() => {
fn.apply(this. args)
fn.apply(this.args)
}, delay)
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!