-->

Where copy Extjs 6.0 new `ux` classes?

2019-08-12 04:24发布

问题:

I'm developing web application using Extjs 6.0.1. I developed an class as follow:

Ext.define('Admin.view.main.Me', {
   extend: 'Ext.panel.Panel',
   xtype: 'ud_mf',
   .
   .
   .
});

Now I want to publish it as ux. In Extjs 6.0.0 I don't know where direction copy my class. My workspace direction is as follow:

.sencha
Admin
build
ext
packages
workspace.json

What do I do?

回答1:

  1. Create a Folder named Ux and this in root directory
  2. Add all code there with namespace Ux
  3. Add this Folder in app.json in this code

    "classpath": [
    "app",
    "Ux", // this is your folder
    "${toolkit.name}/src"
    ],
    
  4. In app.js file add in requires like 'Ux.*'

  5. Build your project and run


标签: extjs6