在main.js中引入并使用 明确$elconfirm使用的是element的$confirm方法
import Antd, { version } from 'ant-design-vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.prototype.$elconfirm = Vue.prototype.$confirm
Vue.use(Antd)
具体页面使用
handleDelete(row) {
const ids = row.id || this.ids;
const dataid = row.businessKey;
this.$elconfirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
return delDeployment(ids,dataid);
}).then(() => {
this.getList();
this.$message.success("删除成功");
})
},
踩坑学习日记