我想在视图类中为ember视图设置z-index,但是ember不断抛出错误:
DEPRECATION: Dynamic content in the `style` attribute is not escaped and may pose a security risk.
我班级的缩写版本是:
App.ModalComponent = Ember.Component.extend({
layoutName: 'components/modal',
classNames: ['modal', 'fade'],
attributeBindings: ['style'],
style: function() {
return 'z-index:131071';
}.property()
});
是否有更多经验丰富的余烬大师知道在Ember View上设置自定义风格的更合适方式?谢谢!
答案 0 :(得分:2)