forked from opentiny/tiny-engine
fix(pagePlugin): 删除文件夹添加节流,避免多次出现无法删除弹窗 (#74)
* fix(pagePlugin): 删除文件夹添加防抖,避免多次出现无法删除弹窗 * fix(pagePlugin): use throttle by review comment
This commit is contained in:
parent
9be6f31129
commit
9911abe6de
|
@ -32,6 +32,7 @@ import { Button, Collapse, CollapseItem } from '@opentiny/vue'
|
|||
import { PluginSetting, SvgButton, ButtonGroup } from '@opentiny/tiny-engine-common'
|
||||
import { usePage, useModal, useApp, useNotify } from '@opentiny/tiny-engine-controller'
|
||||
import { isEqual } from '@opentiny/vue-renderless/common/object'
|
||||
import throttle from '@opentiny/vue-renderless/common/deps/throttle'
|
||||
import PageGeneral from './PageGeneral.vue'
|
||||
import http from './http.js'
|
||||
|
||||
|
@ -158,8 +159,10 @@ export default {
|
|||
type: 'error',
|
||||
message: '此文件夹不是空文件夹,不能删除!'
|
||||
})
|
||||
return false
|
||||
} else {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
confirm({
|
||||
title: '提示',
|
||||
message: '您是否要删除文件夹?',
|
||||
|
@ -186,12 +189,9 @@ export default {
|
|||
})
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
return {
|
||||
saveFolderSetting,
|
||||
deleteFolder,
|
||||
deleteFolder: throttle(5000, true, deleteFolder),
|
||||
folderGeneralRef,
|
||||
closeFolderSettingPanel,
|
||||
isShow,
|
||||
|
|
Loading…
Reference in New Issue