新增删除列表前的确认弹窗

This commit is contained in:
lyswhut
2021-09-30 14:45:14 +08:00
parent ce7bca5b36
commit b1918e8b15
7 changed files with 21 additions and 3 deletions
+5 -1
View File
@@ -41,7 +41,11 @@ const dialog = {
}
})
}
dialog.confirm = options => dialog({ ...options, showCancel: true })
dialog.confirm = options => dialog(
typeof options == 'string'
? { message: options, showCancel: true }
: { ...options, showCancel: true },
)
Vue.prototype.$dialog = dialog
},