小编Cra*_*mps的帖子

EXT JS 5 - 覆盖ViewController定义?

我希望我的所有ViewControllers都有两个自定义方法.

我尝试通过创建一个扩展自ViewController,调用CustomViewController,然后让我的其他ViewControllers扩展我的CustomViewController类的类来完成此操作,但随后我在控制台中收到一条警告消息:

[W] Overriding existing mapping: 'controller.login' From 'MyApp.view.mybutton.MyButtonController' to 'MyApp.view.override.CustomViewController'. Is this intentional?
Run Code Online (Sandbox Code Playgroud)

我测试的组件甚至没有加载.

我意识到我可以直接从ext我的应用程序根文件夹中的文件夹内的ext-all-debug.js库中执行此操作,但是当我使用Sencha CMD构建应用程序时,它将使用我工作区中的原始库,而不是我在我的应用程序文件夹中的那个,所以我的更改只会在开发时工作,不会继续生产.

这样做的正确方法是什么?有标准吗?

javascript inheritance extjs class

3
推荐指数
1
解决办法
1249
查看次数

标签 统计

class ×1

extjs ×1

inheritance ×1

javascript ×1