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 .DS_Store
node_modules node_modules
/dist /dist
yarn.lock
# local env files # local env files
.env.local .env.local

View File

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

View File

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