From 4b6af0ab16eaa5d296b37b1f82bceacc0a1e5330 Mon Sep 17 00:00:00 2001 From: Bojiang Date: Thu, 7 Aug 2025 17:04:37 +0800 Subject: [PATCH] jiangbo91@huawei.com Signed-off-by: Bojiang Change-Id: I59bb90a1a39e1f7b7aabd9e75bcd49385edfddf2 --- compiler/build_declarations_file.js | 8 ++++---- compiler/components/grid.json | 2 +- compiler/components/list.json | 2 +- compiler/components/water_flow.json | 4 ++-- compiler/main.js | 6 +++--- compiler/test/test.js | 4 ++-- compiler/tsconfig.esm.json | 2 +- compiler/tsconfig.json | 2 +- ...66\346\214\207\345\257\274\350\247\204\350\214\203.md" | 6 +----- 9 files changed, 16 insertions(+), 20 deletions(-) diff --git a/compiler/build_declarations_file.js b/compiler/build_declarations_file.js index 4301cf682..32e8933ba 100644 --- a/compiler/build_declarations_file.js +++ b/compiler/build_declarations_file.js @@ -24,14 +24,14 @@ const addTSAttributeSet = ['AlphabetIndexer', 'Animator', 'Badge', 'Blank', 'But 'Canvas', 'Checkbox', 'CheckboxGroup', 'Circle', 'Column', 'ColumnSplit', 'Counter', 'DataPanel', 'DatePicker', 'Divider', 'Ellipse', 'Flex', 'FormComponent', 'Gauge', 'Grid', 'GridItem', 'GridContainer', 'Image', 'ImageAnimator', 'IndicatorComponent', 'LazyVGridLayout', 'Line', - 'List', 'ListItem', 'ListItemGroup', 'LoadingProgress', 'Marquee', 'Navigation', - 'Navigator', 'Panel', 'Path', 'PatternLock', 'Piece', 'PluginComponent', 'Polygon', 'Polyline', 'Progress', + 'List', 'ListItem', 'ListItemGroup', 'LoadingProgress', 'Marquee', 'Navigation', 'Navigator', + 'Panel', 'Path', 'PatternLock', 'Piece', 'PluginComponent', 'Polygon', 'Polyline', 'Progress', 'QRCode', 'Radio', 'Rating', 'Rect', 'Refresh', 'Row', 'RowSplit', 'Scroll', 'ScrollBar', 'Search', 'Select', 'Shape', 'Sheet', 'Slider', 'Span', 'Stack', 'Stepper', 'StepperItem', 'Swiper', 'TabContent', 'Tabs', 'Text', 'TextArea', 'TextClock', 'TextInput', 'TextPicker', 'TextTimer', 'Toggle', 'Video', 'Web', 'XComponent', 'RichText', 'RemoteWindow', 'WaterFlow', 'FlowItem', 'ImageSpan', - 'RootScene', 'Screen', 'WindowScene', 'EffectComponent', 'RichEditor', 'ArcSwiper' , 'ArcScrollBar', - 'ArcList', 'ArcListItem', 'ArcAlphabetIndexer']; + 'RootScene', 'Screen', 'WindowScene', 'EffectComponent', 'RichEditor', 'ArcAlphabetIndexer', 'ArcList', + 'ArcListItem', 'ArcSwiper', 'ArcScrollBar']; generateTargetFile(process.argv[2], process.argv[3]); function generateTargetFile(filePath, output) { diff --git a/compiler/components/grid.json b/compiler/components/grid.json index 19559328e..da1850559 100644 --- a/compiler/components/grid.json +++ b/compiler/components/grid.json @@ -9,6 +9,6 @@ "onScrollBarUpdate", "enableScrollInteraction", "fadingEdge", "onScrollStart", "onScroll", "onScrollStop", "onWillScroll", "onDidScroll", "cachedCount", "nestedScroll", "friction", "alignItems", "onReachStart", "onReachEnd", "onScrollFrameBegin", "flingSpeedLimit", - "clipContent", "backToTop", "focusWrapMode", "syncLoad", "onWillStopDragging" + "clipContent", "backToTop", "focusWrapMode", "onWillStopDragging", "syncLoad" ] } diff --git a/compiler/components/list.json b/compiler/components/list.json index aff74ca6d..c2c3a8279 100644 --- a/compiler/components/list.json +++ b/compiler/components/list.json @@ -9,6 +9,6 @@ "alignListItem", "nestedScroll", "friction", "contentStartOffset", "contentEndOffset", "childrenMainSize", "maintainVisibleContentPosition", "onScrollFrameBegin", "onScrollStart", "onScrollVisibleContentChange", "flingSpeedLimit", "clipContent", "onWillScroll", "onDidScroll", "scrollBarColor", "scrollBarWidth", "backToTop", - "stackFromEnd", "focusWrapMode", "syncLoad", "onWillStopDragging" + "stackFromEnd", "focusWrapMode", "onWillStopDragging", "syncLoad" ] } diff --git a/compiler/components/water_flow.json b/compiler/components/water_flow.json index 300375772..2d64dea5d 100644 --- a/compiler/components/water_flow.json +++ b/compiler/components/water_flow.json @@ -32,7 +32,7 @@ "onDidScroll", "clipContent", "backToTop", - "syncLoad", - "onWillStopDragging" + "onWillStopDragging", + "syncLoad" ] } diff --git a/compiler/main.js b/compiler/main.js index 20bfe3e92..e62353a7a 100644 --- a/compiler/main.js +++ b/compiler/main.js @@ -995,6 +995,9 @@ function isPartialUpdate(metadata, moduleType) { if (item.name === 'Api11ArkTSCheckMode' && item.value === 'DoArkTSCheckInCompatibleModeInApi11') { partialUpdateConfig.standardArkTSLinter = false; } + if (item.name === 'ArkoalaPlugin' && item.value === 'true') { + projectConfig.useArkoala = true; + } if (item.name === 'ArkTSVersion') { partialUpdateConfig.arkTSVersion = item.value; } @@ -1007,9 +1010,6 @@ function isPartialUpdate(metadata, moduleType) { if (item.name === 'SkipArkTSStaticBlocksCheck' && item.value === 'true') { partialUpdateConfig.skipArkTSStaticBlocksCheck = true; } - if (item.name === 'ArkoalaPlugin' && item.value === 'true') { - projectConfig.useArkoala = true; - } if (item.name === 'UseTsHar' && item.value === 'true' && moduleType === 'har') { projectConfig.useTsHar = true; } diff --git a/compiler/test/test.js b/compiler/test/test.js index 46911fdc9..901b03e9e 100644 --- a/compiler/test/test.js +++ b/compiler/test/test.js @@ -73,14 +73,14 @@ function processIntermediateTS(content, filePath, afterProcess) { 'etsAnnotationsEnable': true }); } - const etsFilePath = filePath.replace('.ts', '.ets') + const etsFilePath = filePath.replace('.ts', '.ets'); fs.writeFileSync(etsFilePath, afterProcess.content); processModule(etsCheckerCompilerOptions, etsFilePath); sourceFile = ModuleSourceFile.getSourceFiles().find((element) => element.moduleId.includes(etsFilePath)); result = generateIntermediateContent(sourceFile); fs.unlinkSync(etsFilePath); projectConfig.processTs = false; - return result + return result; } function expectActual(name, filePath, checkError = false) { diff --git a/compiler/tsconfig.esm.json b/compiler/tsconfig.esm.json index fb496acd6..9b0e05d83 100755 --- a/compiler/tsconfig.esm.json +++ b/compiler/tsconfig.esm.json @@ -278,9 +278,9 @@ "RichEditor", "Component3D", "ContainerSpan", + "ArcAlphabetIndexer", "ArcSwiper", "ArcScrollBar", - "ArcAlphabetIndexer", ], "extend": { "decorator": ["Extend", "AnimatableExtend"], diff --git a/compiler/tsconfig.json b/compiler/tsconfig.json index 98511d623..7b5d6ed6e 100644 --- a/compiler/tsconfig.json +++ b/compiler/tsconfig.json @@ -287,9 +287,9 @@ "RichEditor", "Component3D", "ContainerSpan", + "ArcAlphabetIndexer", "ArcSwiper", "ArcScrollBar", - "ArcAlphabetIndexer", ], "extend": { "decorator": ["Extend", "AnimatableExtend"], diff --git "a/compiler/\345\246\202\344\275\225\346\226\260\345\242\236\346\210\226\344\277\256\346\224\271\347\273\204\344\273\266\346\214\207\345\257\274\350\247\204\350\214\203.md" "b/compiler/\345\246\202\344\275\225\346\226\260\345\242\236\346\210\226\344\277\256\346\224\271\347\273\204\344\273\266\346\214\207\345\257\274\350\247\204\350\214\203.md" index ace813061..57865b510 100644 --- "a/compiler/\345\246\202\344\275\225\346\226\260\345\242\236\346\210\226\344\277\256\346\224\271\347\273\204\344\273\266\346\214\207\345\257\274\350\247\204\350\214\203.md" +++ "b/compiler/\345\246\202\344\275\225\346\226\260\345\242\236\346\210\226\344\277\256\346\224\271\347\273\204\344\273\266\346\214\207\345\257\274\350\247\204\350\214\203.md" @@ -8,11 +8,7 @@ #### **说明:** -``` -通用属性是指在 -``` - -**`common.d.ts`** 文件中 **`CommonMethod`** 类定义的属性,这些属性可以修饰**自定义组件**或**系统组件**。 +通用属性是指在 **`common.d.ts`** 文件中 **`CommonMethod`** 类定义的属性,这些属性可以修饰**自定义组件**或**系统组件**。 ##### **变更与同步要求** -- Gitee