安虹睿
1 year ago
4 changed files with 75 additions and 5 deletions
@ -0,0 +1,42 @@ |
|||
// 页面基础按钮样式
|
|||
import i18n from "@/lang" |
|||
import { MessageBox } from 'element-ui'; |
|||
|
|||
// 编辑按钮
|
|||
const tableEditBtn= { |
|||
type: "text", |
|||
icon: "el-icon-edit", |
|||
label: i18n.t('btns.edit'), |
|||
name: "edit", |
|||
size: "small", |
|||
color: "#ff9000", |
|||
} |
|||
|
|||
// 删除按钮
|
|||
const tableDeleteBtn= { |
|||
type: "text", |
|||
icon: "el-icon-delete", |
|||
label: i18n.t('btns.delete'), |
|||
name: "delete", |
|||
size: "small", |
|||
color: "red", |
|||
} |
|||
|
|||
const deleteHandle = (callback) => { |
|||
MessageBox.confirm('您确定删除吗, 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
// 确定操作
|
|||
if(callback)callback() |
|||
}).catch(() => { |
|||
//取消操作
|
|||
}); |
|||
} |
|||
|
|||
export default { |
|||
tableEditBtn, |
|||
tableDeleteBtn, |
|||
deleteHandle |
|||
} |
Loading…
Reference in new issue