readOnly
来源:6-11 本章实战

慕前端0335148
2018-04-24
老师:
如果stock-form 的html中 绑定的 [readOnly]= 'fasle', 这个布尔值转入到, start的 componet 中会将readOnly变为false是么? 如果是false,下面这个循环应该执行啊
clickStar(index: number) {
if (!this.readonly) {
this.rating = index + 1;
this.stars = [];
for (let i = 1; i <= 5; i++) {
this.stars.push(i > this.rating);
}
}
}
虽然我的代码和你一样,最终效果一样,但是这里有点转不过来,希望帮忙解答下,谢谢
写回答
1回答
-
慕前端0335148
提问者
2018-04-24
额, 不好意思,问题解决了, stock- form 是表单, stock-manage 是管理界面,我这里弄反了!
00
相似问题