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

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
+2 -1
View File
@@ -55,10 +55,11 @@ export default {
.main {
flex: auto;
min-height: 50px;
min-height: 40px;
padding: 15px;
font-size: 14px;
max-width: 320px;
min-width: 220px;
line-height: 1.5;
}
+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
},