代码:
view:
单位{{_unitName}}
js:
// 选择单位
selectUnit(e) {
this._unitName = e.name;
this._unitId = e.id;
console.log(e.name);
console.log(this._unitName);
}
排错过程:更换了其它变量名就可以了
原因:程序不识别以下划线开头的变量名(???!)
代码:
view:
单位{{_unitName}}
js:
// 选择单位
selectUnit(e) {
this._unitName = e.name;
this._unitId = e.id;
console.log(e.name);
console.log(this._unitName);
}
排错过程:更换了其它变量名就可以了
原因:程序不识别以下划线开头的变量名(???!)
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。