extjs - 无法在应用程序中更改当前的 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专家。
解决方案
看起来你做的一切都是正确的。/home/user/x/static/extjs/x-workspace/x/app/model/production/._BenchModel.js
但是您的应用程序的模型文件中有错误。
推荐阅读
- google-cloud-platform - Google Cloud Dataflow 写入 BigQuery(错误 401:需要登录)
- python - 直接从命令行在 IDLE 窗口中运行文件
- android - Android Gradle 同步错误:读取超时
- php - 命名空间 + 框架 + 作曲家
- c++ - 错误:数组下标的类型“int [int]”无效
- jquery - 展开/折叠嵌套中继器
- python - 在 Python 中对变量进行 bin 处理的有效方法
- django - 在模板中使用带有 django 选择字段的 if 条件
- python - 重构使用熊猫数据框的python函数
- html - Bootstrap 表格不可移除边框