refactor: 代码优化

This commit is contained in:
pipipi-pikachu 2021-06-25 21:20:42 +08:00
parent fc20d9c003
commit 86d23ae26f
3 changed files with 4 additions and 8 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
.DS_Store
node_modules
/dist
yarn.lock
# local env files
.env.local

View File

@ -169,8 +169,8 @@ export default defineComponent({
}
onUnmounted(closeAutoPlay)
const massageThrottle = throttle(function(info) {
message.success(info)
const throttleMassage = throttle(function(msg) {
message.success(msg)
}, 3000, { leading: true, trailing: false })
// /
@ -186,7 +186,7 @@ export default defineComponent({
animationIndex.value = lastIndex
}
else {
massageThrottle('已经是第一页了')
throttleMassage('已经是第一页了')
}
}
const execNext = () => {
@ -198,7 +198,7 @@ export default defineComponent({
animationIndex.value = 0
}
else {
massageThrottle('已经是最后一页了')
throttleMassage('已经是最后一页了')
closeAutoPlay()
}
}

View File

@ -169,10 +169,7 @@ table {
.cell-text {
min-height: 32px;
padding: 5px;
border: 0;
outline: 0;
line-height: 1.5;
user-select: none;
}
}
</style>