vux的confirm
&& iview的modal
this.$vux.confirm.show({
title: '提示',
content: '確認結束該條問題?',
// cancelText: '返回修改',
// confirmText: '確認修改',
onShow() {},
onHide() {},
onCancel() {},
onConfirm() {
this.$api.issueInterface.endQuestion({
questionId: item.questionId,
}).then(res => {
res = res.data;
if (res.success) {
this.$Message.success(res.retMsg);
this._getTableList();
} else {
this.$Message.error(res.retMsg);
}
}).catch((err) => console.error(err))
}
})
複製程式碼
this.$Modal.confirm({
title: '提示',
content: `確認結束該條問題?`,
// cancelText: '返回修改',
// okText: '確認修改',
onOk: () => {
this.$api.issueInterface.endQuestion({
questionId: item.questionId,
}).then(res => {
res = res.data;
if (res.success) {
this.$Message.success(res.retMsg);
this._getTableList();
} else {
this.$Message.error(res.retMsg);
}
}).catch((err) => console.error(err))
}
});
複製程式碼