通过特质生成的属性值
现在,假设我在特质值中写入了 new,但在属性 :items 中,我想在该值后加上像 item.text. 这样的前缀。因此,我的最终属性 :items 变成了 item.text.new。这可能吗? 
artf
我觉得就够了 “''js getValueForTarget: function() { 返回 'item.text' + this.model.get('value'); } ```
artf
你应该可以通过[自定义特质](https://github.com/artf/grapesjs/wiki/Traits#define-new-trait-type)来实现,比如:通过覆盖[“getValueForTarget”方法](https://github.com/artf/grapesjs/blob/dev/src/trait_manager/view/TraitView.js#L46)
HarshOB
我尝试创建自定义特质并覆盖某个方法,但没看到任何属性生成。请你看看这段代码,如果有错误能纠正我吗?当我在 traits 中写入数据时,它应该在 datatextfield 生成属性为 ':text=item.text.data'。 ![截图来自2018-04-12 10-21-21](https://user-images.githubusercontent.com/28950214/38657005-a504f80e-3e3b-11e8-9346-a6185ffef5a5...