【问题标题】:Sencha Architect not creating getter for config variableSencha Architect 没有为配置变量创建 getter
【发布时间】:2021-12-08 22:23:57
【问题描述】:

我正在使用 Sencha Architect 4.3 (Beta),sdk 7.4。现代。
我在 Architect 中有一个名为 TimesheetEntry 的 Ext.form.Panel。

这是一个由 Sencha Architect 生成的 TimesheetEntry 的小提琴,并经过轻微修改以在小提琴中运行 TimesheetEntry

您可以看到添加 config.fee_earner_user_id 不会产生 getter。我能做的最好的就是使用 win.getConfig('fee_earner_user_id');

我的问题是:如何在 Architect 中指定 fee_earner_user_id 是一个配置属性,应该为它生成一个 getter?

【问题讨论】:

  • 据我所知,将为config: {} 中的配置元素创建自动getter,你有fee_earner_user_id 配置吗?
  • 我已经修改了我的问题并提供了一个小提琴来更清楚地展示这个问题。
  • 我不使用 Architect,但是如果你在 TimesheetEntry 的定义中添加以下内容,getter 将起作用:config: {fee_earner_user_id: null},
  • 是的 - 这是我的问题 - 使用架构师时我该怎么做?
  • 不幸的是,我无法帮助您,将config 部分添加到您的小提琴作品中,但我不知道如何让 Architect 做到这一点。

标签: extjs sencha-architect


【解决方案1】:

在 SA 中,在您通常会搜索配置选项的框中输入 fee_earner_user_id。该框的右侧将是一个按钮,您可以单击以将其添加为配置选项。
添加后还可以更改其类型,即字符串、对象等。

【讨论】:

    【解决方案2】:

    据我所知 this.getView().getConfig('fee_earner_user_id') 是使用 Architect 的唯一方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-11
      • 1970-01-01
      • 1970-01-01
      • 2014-12-07
      • 1970-01-01
      • 2014-06-15
      相关资源
      最近更新 更多