<input
style="width: 50px;"
:value="record.click"
@focus="() => toFocus(record)"
@blur="toDo(record,$event)"
/>
toFocus鼠标点击
toDo(record,e)鼠标移开
const that = this;
let data = {
id: record.id,
click: e.target.value
};
this.$confirm({
title: "change",
content: "",
cancelText: "cancle",
okText: "ok",
okType: "danger",
onOk() {
console.log("OK");
that.$put("/", data).then(res => {
if (res.data.code == 0) {
that.$message.success("success");
} else {
this.$message.success(res.data.message);
}
});
},
onCancel() {
console.log("Cancel");
});