首页 > 解决方案 > 无法在应用程序中更改当前的 extjs 主题

问题描述

我有一个已经配置好的 ExtJS 5,它似乎有一个带有一个自定义主题的工作区。

这个自定义主题(x-theme)放在这里:

extjs/x-workspace/packages/x-theme

我正在尝试将主题从 ext-theme-neptune 更改为 ext-theme-gray,这里:

extjs/x-workspace/packages/x-theme/package.json

我改变了以下论点:

"extend": "ext-theme-neptune"

"extend": "ext-theme-gray"

更改后,看到 webgui 没有变化,我尝试重新构建,

sencha app refresh
sencha app build

在,

extjs/x-workspace/x

但有几个错误和一个大的 BUILD FAILED:

[INF] Processing Build Descriptor : default
[INF] Loading app json manifest...
[ERR] C2000: Rhino Parse Error (illegal character => Mac OS X           2??ATTR?xPuTTYThis resource fork intentionally left blank   ??) -- /home/user/x/static/extjs/x-workspace/x/app/model/production/._BenchModel.js:1:1
[ERR] C2000: Rhino Parse Error (Compilation produced 1 syntax errors. => null) -- /home/user/x/static/extjs/x-workspace/x/app/model/production/._BenchModel.js:1
[ERR]
[ERR] BUILD FAILED

Sencha Documention 的主题中,我找不到比我已经做过的更多的东西了。

任何有更多经验的人都可以向我强调如何更改 ExtJS 主题?

提前致谢!

注 1:我没有使用 ExtJS 的经验。

注意 2:首先设置 ExtJS 的人没有留下任何文档。

更新 1:

我能够绕过这些错误,但现在我得到以下信息:

[ERR] C2000: Rhino Parse Error (missing ; before statement =>
let record = me.up().record;) -- /home/user/x/static/extjs/x-workspace/x/app/view/ production/JobFormDetails.js:130:23 [ERR] C2000: Rhino Parse Error (missing ; before statement =>
let message = '';) -- /home/user/x/static/extjs/x-workspace/x/ app/view/production/JobFormDetails.js:131:24 [ERR] C2000:Rhino Parse 错误(编译产生 2 个语法错误。=> null)--/home/user/x/static/extjs/x-workspace/x /app/view/production/JobFormDetails.js:1 [ERR] [ERR] 构建失败

在那个 JobFormDetails 我有这部分缺少陈述,但无法弄清楚缺少什么';' :

listeners:{
    beforerender:function(me){
        'use strict';
        let record = me.up().record;
        let message = '';
        console.log(me);
        console.log('and this is record');
        console.log(me.up().record);
        console.log('this is record');
        console.log(record);
        if (record) {
            const recDate = new Date(record.date);
            const now = new Date();
            message = 'Job production is running';
            if (recDate > now) {
                message = 'Job scheduled to start on ' + record.date;
            }
            if (record.closed === true) {
                message = 'Job completed';
            }
            record.total_quantity_status = 'Total production: ' + record.quantity + ' parts';
        } else {
            record = {};
        }
        record.status = message;
        me.getForm().setValues(record);
    }
}

注3:我不是JS专家。

标签: extjsextjs5

解决方案


看起来你做的一切都是正确的。/home/user/x/static/extjs/x-workspace/x/app/model/production/._BenchModel.js但是您的应用程序的模型文件中有错误。


推荐阅读