【发布时间】:2018-11-27 04:47:10
【问题描述】:
我目前尝试从组件中获取计算属性。
export default Component.extend({
isValid: computed('currentQuantity', 'maxQuantity', function() { ... }),
});
尝试用
接收它(控制器:isValid=null;){{quantity-list isValid=(mut isValid)}}
导致覆盖属性并删除计算。
如何获取 isValid 属性?
【问题讨论】:
-
您的代码有问题。为什么你要改变 isValid 计算属性?不将属性传递给组件的操作中可能会发生变异。
标签: ember.js components computed-properties ember-components