【发布时间】:2021-10-31 00:54:43
【问题描述】:
我是 vue 和 ionic 的新手,我无法弄清楚为什么会收到此 TS2339 错误。
任何帮助将不胜感激
data() {
return {
owner: "default",
showNewCustomerFields: false,
newCustomerName: "",
};
},
method: {
newCustomer(owner) {
//console.log(owner);
if (owner === "new") {
this.showNewCustomerFields = true;
// console.log(showNewCustomerFields);
} else {
// console.log(showNewCustomerFields);
this.showNewCustomerFields = false;
}
},
},
【问题讨论】:
-
尝试在 ts playground 中提供最小的可重现示例
标签: typescript vue.js ionic-framework vuejs3