fix: topAction bug

pull/2/head
xingyu 2023-01-19 13:44:04 +08:00
parent fbb154f93d
commit d207b95b29
1 changed files with 4 additions and 3 deletions

View File

@ -255,16 +255,17 @@ const getToolBarConfig = (options: XTableProps) => {
if (toolbarConfig) return if (toolbarConfig) return
if (toolBar) { if (toolBar) {
if (!isBoolean(toolBar)) { if (!isBoolean(toolBar)) {
console.info(2)
options.toolbarConfig = toolBar options.toolbarConfig = toolBar
return return
} }
} else if (!topActionSlots) { } else if (topActionSlots != false) {
options.toolbarConfig = { options.toolbarConfig = {
enabled: true slots: { buttons: 'toolbar_buttons' }
} }
} else { } else {
options.toolbarConfig = { options.toolbarConfig = {
slots: { buttons: 'toolbar_buttons' } enabled: true
} }
} }
} }