日照项目的居民端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
612 B

// 输入同步事件
export function inputSync(event) {
const {
detail: {
value
},
currentTarget: {
dataset: {
name,
fm
}
}
} = event;
if (name) {
const fmKey = fm ? fm : "fmData";
let data = {};
data[fmKey] = this.data[fmKey];
data[fmKey][name] = value;
if (typeof this.$beforeUpdateData === "function") {
if (this.$beforeUpdateData(fmKey, name, value)) {
this.setData(data);
} else {
return;
}
} else {
this.setData(data);
}
if (typeof this.$afterUpdateData === "function") {
this.$afterUpdateData();
}
}
}