diff --git a/compiler/src/component_map.ts b/compiler/src/component_map.ts index 9eb78161128f38504143003ac32236e591835359..9dea80f23c7a13fc35525934ba423b4438b7a359 100644 --- a/compiler/src/component_map.ts +++ b/compiler/src/component_map.ts @@ -203,7 +203,7 @@ export const COMPONENT_MAP: any = { Progress: { atomic: true, attrs: [ - 'value', 'color', 'cricularStyle' + 'value', 'color', 'cricularStyle', 'circularStyle' ] }, Rect: { @@ -287,6 +287,10 @@ export const COMPONENT_MAP: any = { atomic: true, attrs: ['checked', 'onChange'] }, + Web: { + atomic: true, + attrs: ['pagestart', 'pagefinish', 'error','message', 'reload'] + }, GeometryView: { atomic: true }, @@ -335,11 +339,11 @@ export const COMPONENT_MAP: any = { }, Menu: { children: ['Option'], - attrs: ['show', 'showPosition'], + attrs: ['show', 'showPosition', 'fontColor', 'fontSize', 'fontWeight', 'fontFamily'], }, Option: { parents: ['Menu'], - attrs: [], + attrs: ['fontColor', 'fontSize', 'fontWeight', 'fontFamily'], }, }; diff --git a/compiler/src/process_ui_syntax.ts b/compiler/src/process_ui_syntax.ts index b8335049ab4e51e36e784b06d4432385b9132b53..d2f0d106d716894081f8b7a24b8b0e3e222131a4 100644 --- a/compiler/src/process_ui_syntax.ts +++ b/compiler/src/process_ui_syntax.ts @@ -65,6 +65,7 @@ export function processUISyntax(program: ts.Program, ut = false): Function { pagesDir = path.resolve(path.dirname(node.fileName)); if (process.env.compiler === BUILD_ON) { if (!ut && (path.basename(node.fileName) === 'app.ets.ts' || !/\.ets\.ts$/.test(node.fileName))) { + node = ts.visitEachChild(node, processResourceNode, context); return node; } collectComponents(node); @@ -102,6 +103,12 @@ export function processUISyntax(program: ts.Program, ut = false): Function { } return ts.visitEachChild(node, processAllNodes, context); } + function processResourceNode(node: ts.Node): ts.Node { + if (isResource(node)) { + node = processResourceData(node as ts.CallExpression); + } + return ts.visitEachChild(node, processResourceNode, context); + } function validateSourceFileNode(node: ts.SourceFile): void { if (program) { node = ts.visitEachChild(node, validateAllNodes, context); diff --git a/compiler/tsconfig.json b/compiler/tsconfig.json index 15647023396ddac51cc47ac2909eb3787e6d3262..0cc98114fe984754647d6702a7fb0f529a0ccaac 100644 --- a/compiler/tsconfig.json +++ b/compiler/tsconfig.json @@ -4,6 +4,7 @@ "allowJs": true, "allowSyntheticDefaultImports": true, "esModuleInterop": true, + "importsNotUsedAsValues": "preserve", "noImplicitAny": false, "noUnusedLocals": false, "noUnusedParameters": false,