【发布时间】:2020-04-28 11:35:31
【问题描述】:
我有一个已经配置好的 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 for themes 我找不到比我已经做过的更多的东西了。
任何有更多经验的人可以告诉我如何更改 ExtJS 主题?
提前致谢!
注意 1:我没有使用 ExtJS 的经验。
注意 2:首先设置 ExtJS 的人没有留下任何文档。
更新 1:
我能够绕过这些错误,但现在我得到以下信息:
[ERR] C2000: Rhino Parse Error (missing ; before statement =>
让记录 = 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 =>
让消息 = '';) -- /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 专家。
【问题讨论】: