Browse Source

配置文件修改

hy 6 years ago
parent
commit
7440ec51fb
6 changed files with 33 additions and 60 deletions
  1. 23 52
      app.json
  2. 3 5
      app/view/main/Main.js
  3. 4 0
      ext/packages/modern-locale/overrides/en_US/Component.js
  4. 3 3
      index.html
  5. 0 0
      triton_zh.json
  6. 0 0
      triton_zh.jsonp

+ 23 - 52
app.json

@@ -22,7 +22,10 @@
         "exporter",
         "font-uas"
     ],
-    "locale":"zh_CN",
+    "locales": [
+        "zh_CN",
+        "en_US"
+    ],
 
     /**
      * The relative path to the application's markup file (html, jsp, asp, etc.).
@@ -221,54 +224,17 @@
 
     "builds": {
         //6.6默认主题 扁平风格
-        "triton_zh": {
-            "theme": "theme-triton",
-            "locale":"zh_CN"
-        },
-        "triton_en": {
-            "theme": "theme-triton",
-            "locale":"en-US"
-        },
-        //经典主题
-        "classic_zh": {
-            "theme": "theme-classic",
-            "locale":"zh_CN"
-        },
-        "classic_en": {
-            "theme": "theme-classic",
-            "locale":"en-US"
-        }, 
-        "gray_zh" : {
-            "theme" : "theme-gray",
-            "locale":"zh_CN"
-        },
-        "gray_en" : {
-            "theme" : "theme-gray",
-            "locale":"en-US"
+        "triton": {
+            "theme": "theme-triton"
         },
-        "aria_zh": {
-            "theme": "theme-aria",
-            "locale":"zh_CN"
+        "aria": {
+            "theme": "theme-aria"
+        },             
+        "neptune" : {
+            "theme": "theme-neptune"
         },  
-        "aria_en": {
-            "theme": "theme-aria",
-            "locale":"en-US"
-        },            
-        "neptune_zh" : {
-            "theme": "theme-neptune",
-            "locale":"zh_CN"
-        },
-        "neptune_en" : {
-            "theme": "theme-neptune",
-            "locale":"en-US"
-        },   
-        "crisp_zh" :{
-            "theme": "theme-crisp",
-            "locale":"zh_CN"
-        },
-        "crisp_en" :{
-            "theme": "theme-crisp",
-            "locale":"en-US"
+        "crisp" :{
+            "theme": "theme-crisp"
         }
     },
     
@@ -447,14 +413,19 @@
 
     "output": {
         "base": "${workspace.build.dir}/${build.environment}/${app.name}",
+        "manifest": "${build.id}.json", // 增加该配置
+        "framework": "${build.id}/framework.js", // 增加该配置(如果开启了split.mode会有framework.js)
         "appCache": {
             "enable": false
         },
-        "resources": {
-            "path": "${build.id}/resources",
-            "shared": "resources"
-        },
-        "manifest":"${build.id}.json"
+        "js": {
+            "path": "${build.id}/app.js", // 增加该配置
+            "filter": "all" //all/minimum
+        }
+        // "resources": {
+        //     "path": "${build.id}/resources",
+        //     "shared": "resources"
+        // },
     },
 
     /**

+ 3 - 5
app/view/main/Main.js

@@ -35,9 +35,7 @@ Ext.define('uas.view.main.Main', {
                     {"display":"时尚蓝", "value": 'triton'},
                     {"display":"时尚灰", "value": 'crisp'},
                     {"display":"商务蓝", "value": 'neptune'},
-                    {"display":"深邃黑", "value": 'aria'},
-                    {"display":"经典灰", "value": 'gray'},
-                    {"display":"经典蓝", "value": 'classic'}
+                    {"display":"深邃黑", "value": 'aria'}
                 ]
             }),
             cls:'x-desktop-combo',
@@ -63,8 +61,8 @@ Ext.define('uas.view.main.Main', {
             store: Ext.create('Ext.data.Store', {
                 fields: ['display', 'value'],
                 data : [
-                    {"display":"简体中文", "value": 'zh'},
-                    {"display":"英语", "value": 'en'}
+                    {"display":"简体中文", "value": 'zh_CN'},
+                    {"display":"英语", "value": 'en_US'}
                 ]
             }),
             cls:'x-desktop-combo2',

+ 4 - 0
ext/packages/modern-locale/overrides/en_US/Component.js

@@ -0,0 +1,4 @@
+// This is needed until we can refactor all of the locales into individual files
+Ext.define("Ext.locale.en_US.Component", {
+    override: "Ext.Component"
+});

+ 3 - 3
index.html

@@ -50,11 +50,11 @@
             console.log('加载系统主题方案:' + theme); 
             var locale = getCookie('locale'); 
             if(!locale){
-                setCookie('locale',"zh",0);
-                locale = 'zh';
+                setCookie('locale',"zh_CN",0);
+                locale = 'zh_CN';
             }
             console.log('加载语言包:' + locale); 
-            Ext.manifest = theme + '_' + locale + '.json'; }; 
+            Ext.manifest = theme + '-' + locale + '.json'; }; 
     </script>
 
     <script id="microloader" data-app="87100719-3701-4a39-9b0f-ed5f99833426" type="text/javascript" src="bootstrap.js"></script>

File diff suppressed because it is too large
+ 0 - 0
triton_zh.json


File diff suppressed because it is too large
+ 0 - 0
triton_zh.jsonp


Some files were not shown because too many files changed in this diff