From 44da1550e95d26443ae8be4621e54796941001d3 Mon Sep 17 00:00:00 2001 From: lihong Date: Sun, 26 Sep 2021 20:27:10 +0800 Subject: [PATCH] lihong67@huawei.com add Copyright header Signed-off-by: lihong Change-Id: Ib5fffbc6d096dfe01ea37097ea21d97bffd5fece --- ace-loader/.npmignore | 21 +++++++++-- ace-loader/plugin/codegen/index.js | 15 ++++++++ ace-loader/sample/DataAbility/data.js | 15 ++++++++ ace-loader/sample/ServiceAbility/service.js | 15 ++++++++ ace-loader/sample/lite/app.js | 31 ++++++++++++---- ace-loader/sample/lite/pages/detail/detail.js | 15 ++++++++ ace-loader/sample/lite/pages/index/index.js | 25 ++++++++++--- ace-loader/sample/rich/app.js | 31 ++++++++++++---- ace-loader/sample/rich/pages/detail/detail.js | 37 +++++++++++++------ ace-loader/sample/rich/pages/index/index.js | 37 +++++++++++++------ .../src/lite/lite-return-exports-plugin.js | 1 + .../testError/common/component/comp/comp.js | 15 ++++++++ .../testcase/pages/importLess/importLess.less | 21 +++++++++-- .../test/card/testcase/pages/withJS/withJS.js | 15 ++++++++ ace-loader/test/lite/expected/attribute.js | 15 ++++++++ ace-loader/test/lite/expected/bubble.js | 15 ++++++++ ace-loader/test/lite/expected/class.js | 15 ++++++++ ace-loader/test/lite/expected/event.js | 15 ++++++++ ace-loader/test/lite/expected/expression.js | 15 ++++++++ .../test/lite/expected/exteriorStyle.js | 15 ++++++++ ace-loader/test/lite/expected/forDirective.js | 15 ++++++++ ace-loader/test/lite/expected/ifDirective.js | 15 ++++++++ ace-loader/test/lite/expected/importJS.js | 21 +++++++++-- ace-loader/test/lite/expected/inlineStyle.js | 15 ++++++++ ace-loader/test/lite/expected/music.js | 15 ++++++++ ace-loader/test/lite/expected/sick.js | 15 ++++++++ ace-loader/test/lite/testcase/app.js | 31 ++++++++++++---- .../lite/testcase/pages/importJS/importJS.js | 30 +++++++++++---- .../test/lite/testcase/pages/music/music.js | 15 ++++++++ .../test/lite/testcase/pages/sick/sick.js | 35 +++++++++++++----- ace-loader/test/rich/expected/class.js | 15 ++++++++ ace-loader/test/rich/expected/commonAttr.js | 15 ++++++++ ace-loader/test/rich/expected/event.js | 15 ++++++++ ace-loader/test/rich/expected/expression.js | 15 ++++++++ .../test/rich/expected/exteriorStyle.js | 15 ++++++++ ace-loader/test/rich/expected/forDirective.js | 15 ++++++++ ace-loader/test/rich/expected/ifDirective.js | 15 ++++++++ ace-loader/test/rich/expected/importCSS.js | 15 ++++++++ ace-loader/test/rich/expected/importJS.js | 15 ++++++++ ace-loader/test/rich/expected/inlineStyle.js | 15 ++++++++ ace-loader/test/rich/expected/mediaQuery.js | 15 ++++++++ ace-loader/test/rich/expected/privateAttr.js | 15 ++++++++ ace-loader/test/rich/expected/uncommonAttr.js | 15 ++++++++ ace-loader/test/rich/testcase/app.js | 31 ++++++++++++---- .../rich/testcase/pages/importJS/importJS.js | 30 +++++++++++---- 45 files changed, 755 insertions(+), 92 deletions(-) diff --git a/ace-loader/.npmignore b/ace-loader/.npmignore index 246c4aa..5084bb5 100644 --- a/ace-loader/.npmignore +++ b/ace-loader/.npmignore @@ -1,3 +1,18 @@ -node_modules -src -test +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +node_modules +src +test diff --git a/ace-loader/plugin/codegen/index.js b/ace-loader/plugin/codegen/index.js index 3e25489..6b54e90 100644 --- a/ace-loader/plugin/codegen/index.js +++ b/ace-loader/plugin/codegen/index.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ diff --git a/ace-loader/sample/DataAbility/data.js b/ace-loader/sample/DataAbility/data.js index 439e396..13b64e6 100644 --- a/ace-loader/sample/DataAbility/data.js +++ b/ace-loader/sample/DataAbility/data.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { onInitialize(abilityInfo) { console.info('DataAbility onInitialize'); diff --git a/ace-loader/sample/ServiceAbility/service.js b/ace-loader/sample/ServiceAbility/service.js index 60cb1c3..44aaf64 100644 --- a/ace-loader/sample/ServiceAbility/service.js +++ b/ace-loader/sample/ServiceAbility/service.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { onStart(want) { console.info('ServiceAbility onStart'); diff --git a/ace-loader/sample/lite/app.js b/ace-loader/sample/lite/app.js index bb1f752..fd1740e 100644 --- a/ace-loader/sample/lite/app.js +++ b/ace-loader/sample/lite/app.js @@ -1,8 +1,23 @@ -export default { - onCreate() { - console.info("AceApplication onCreate"); - }, - onDestroy() { - console.info("AceApplication onDestroy"); - } -}; +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + onCreate() { + console.info("AceApplication onCreate"); + }, + onDestroy() { + console.info("AceApplication onDestroy"); + } +}; diff --git a/ace-loader/sample/lite/pages/detail/detail.js b/ace-loader/sample/lite/pages/detail/detail.js index d352de5..6430218 100644 --- a/ace-loader/sample/lite/pages/detail/detail.js +++ b/ace-loader/sample/lite/pages/detail/detail.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + var router = require('@system.router') export default { data: {}, diff --git a/ace-loader/sample/lite/pages/index/index.js b/ace-loader/sample/lite/pages/index/index.js index e59972a..a411178 100644 --- a/ace-loader/sample/lite/pages/index/index.js +++ b/ace-loader/sample/lite/pages/index/index.js @@ -1,5 +1,20 @@ -export default { - data: { - title: 'World' - } -} +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + data: { + title: 'World' + } +} diff --git a/ace-loader/sample/rich/app.js b/ace-loader/sample/rich/app.js index d624d9c..8d0cc4c 100644 --- a/ace-loader/sample/rich/app.js +++ b/ace-loader/sample/rich/app.js @@ -1,8 +1,23 @@ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -} +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +} diff --git a/ace-loader/sample/rich/pages/detail/detail.js b/ace-loader/sample/rich/pages/detail/detail.js index 42d99d6..e9da07b 100644 --- a/ace-loader/sample/rich/pages/detail/detail.js +++ b/ace-loader/sample/rich/pages/detail/detail.js @@ -1,11 +1,26 @@ -import router from '@system.router' - -export default { - data: { - }, - launch: function() { - router.push ({ - uri:'pages/index/index', - }) - } -} +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router' + +export default { + data: { + }, + launch: function() { + router.push ({ + uri:'pages/index/index', + }) + } +} diff --git a/ace-loader/sample/rich/pages/index/index.js b/ace-loader/sample/rich/pages/index/index.js index d236f6f..a81eb47 100644 --- a/ace-loader/sample/rich/pages/index/index.js +++ b/ace-loader/sample/rich/pages/index/index.js @@ -1,11 +1,26 @@ -import router from '@system.router'; - -export default { - data: { - }, - launch: function() { - router.push ({ - uri:'pages/detail/detail', - }) - } -} +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router'; + +export default { + data: { + }, + launch: function() { + router.push ({ + uri:'pages/detail/detail', + }) + } +} diff --git a/ace-loader/src/lite/lite-return-exports-plugin.js b/ace-loader/src/lite/lite-return-exports-plugin.js index 33910ce..2782f9d 100644 --- a/ace-loader/src/lite/lite-return-exports-plugin.js +++ b/ace-loader/src/lite/lite-return-exports-plugin.js @@ -1,3 +1,4 @@ +/* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const pluginName = 'LiteReturnExportsPlugin'; /** diff --git a/ace-loader/test/card/testError/common/component/comp/comp.js b/ace-loader/test/card/testError/common/component/comp/comp.js index 204bd7b..7e57f15 100644 --- a/ace-loader/test/card/testError/common/component/comp/comp.js +++ b/ace-loader/test/card/testError/common/component/comp/comp.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { props:{ title: { diff --git a/ace-loader/test/card/testcase/pages/importLess/importLess.less b/ace-loader/test/card/testcase/pages/importLess/importLess.less index 16d8348..3205a13 100644 --- a/ace-loader/test/card/testcase/pages/importLess/importLess.less +++ b/ace-loader/test/card/testcase/pages/importLess/importLess.less @@ -1,4 +1,19 @@ -@colorBackground: #000000; -.container { - background-color: @colorBackground; +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@colorBackground: #000000; +.container { + background-color: @colorBackground; } \ No newline at end of file diff --git a/ace-loader/test/card/testcase/pages/withJS/withJS.js b/ace-loader/test/card/testcase/pages/withJS/withJS.js index 547816b..ac6424c 100644 --- a/ace-loader/test/card/testcase/pages/withJS/withJS.js +++ b/ace-loader/test/card/testcase/pages/withJS/withJS.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { data: { name: this.map['amy'], diff --git a/ace-loader/test/lite/expected/attribute.js b/ace-loader/test/lite/expected/attribute.js index 503f1c7..f33257d 100644 --- a/ace-loader/test/lite/expected/attribute.js +++ b/ace-loader/test/lite/expected/attribute.js @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + {"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('slider', {'attrs' : {'max' : 100}} ),_c('image'),_c('div', {'attrs' : {'key' : \"day\",'value' : \"hello\"}} ),_c('text', {'attrs' : {'value' : \"hello\"}} ),_c('text', {'attrs' : {'value' : function () {return _vm.num}}} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/bubble.js b/ace-loader/test/lite/expected/bubble.js index 9a7642f..afa0db6 100644 --- a/ace-loader/test/lite/expected/bubble.js +++ b/ace-loader/test/lite/expected/bubble.js @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + {"render": "function (vm) { var _vm = vm || this; return _c('div', {'staticClass' : [\"container\"]} , [_c('div', {'onBubbleEvents' : {'click' : _vm.test1}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test2}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test3}} ),_c('div', {'catchBubbleEvents' : {'click' : _vm.test4}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test5}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test6}} ),_c('div', {'onBubbleEvents' : {'click' : _vm.test7}} ),_c('div', {'catchBubbleEvents' : {'click' : _vm.test8}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test9}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test10}} ),_c('div', {'onCaptureEvents' : {'click' : _vm.test11}} ),_c('div', {'catchCaptureEvents' : {'click' : _vm.test12}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe1},'catchCaptureEvents' : {'longpress' : _vm.longpress1}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe2},'onCaptureEvents' : {'longpress' : _vm.longpress2}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe3},'onCaptureEvents' : {'longpress' : _vm.longpress3}} ),_c('div', {'catchBubbleEvents' : {'swipe' : _vm.swipe4},'onCaptureEvents' : {'longpress' : _vm.longpress4}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe5},'catchBubbleEvents' : {'longpress' : _vm.longpress5}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe6,'longpress' : _vm.longpress6}} ),_c('div', {'onBubbleEvents' : {'swipe' : _vm.swipe7,'longpress' : _vm.longpress7}} ),_c('div', {'catchBubbleEvents' : {'swipe' : _vm.swipe8},'onBubbleEvents' : {'longpress' : _vm.longpress8}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe9},'catchBubbleEvents' : {'longpress' : _vm.longpress9}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe10},'onBubbleEvents' : {'longpress' : _vm.longpress10}} ),_c('div', {'onCaptureEvents' : {'swipe' : _vm.swipe11},'onBubbleEvents' : {'longpress' : _vm.longpress11}} ),_c('div', {'catchCaptureEvents' : {'swipe' : _vm.swipe12},'onBubbleEvents' : {'longpress' : _vm.longpress12}} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/class.js b/ace-loader/test/lite/expected/class.js index 7651b0d..543513e 100644 --- a/ace-loader/test/lite/expected/class.js +++ b/ace-loader/test/lite/expected/class.js @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + {"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'staticClass' : [\"container\"]} ),_c('div', {'staticClass' : [\"container\",\"table\"]} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/event.js b/ace-loader/test/lite/expected/event.js index 1a678da..99ff8b1 100644 --- a/ace-loader/test/lite/expected/event.js +++ b/ace-loader/test/lite/expected/event.js @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + {"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'onBubbleEvents' : {'click' : _vm.test}} ),_c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(_vm.value,evt)}}} ),_c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(_vm.value,_vm.time,evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(')',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(')',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('kk',_vm.value,'dd',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput(_vm.value,_vm.time,'(',evt)}}} ),_c('input', {'onBubbleEvents' : {'click' : function (evt) {_vm.handleInput('(',_vm.value,_vm.time,evt)}}} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/expression.js b/ace-loader/test/lite/expected/expression.js index 070d203..1cad19d 100644 --- a/ace-loader/test/lite/expected/expression.js +++ b/ace-loader/test/lite/expected/expression.js @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + {"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('text', {'attrs' : {'value' : function () {return _vm.ti||_vm.subTitle}}} ),_c('text', {'attrs' : {'value' : function () {return _vm.ti&&_vm.subTitle}}} ),_c('div', {'attrs' : {'value' : function () {return _vm.isArrived==='arrived'&&_vm.isTravel===false}}} ),_c('div', {'attrs' : {'value' : function () {return _vm.isArrived==='arrived'||_vm.isTravel===false}}} ),_c('div', {'attrs' : {'value' : function () {return !_vm.flag}}} ),_c('div', {'attrs' : {'value' : function () {return !!_vm.flag}}} )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/exteriorStyle.js b/ace-loader/test/lite/expected/exteriorStyle.js index 46afd0f..c989123 100644 --- a/ace-loader/test/lite/expected/exteriorStyle.js +++ b/ace-loader/test/lite/expected/exteriorStyle.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "render": "function (vm) { var _vm = vm || this; return _c('div') }", "styleSheet": { diff --git a/ace-loader/test/lite/expected/forDirective.js b/ace-loader/test/lite/expected/forDirective.js index 656100b..c7f4c57 100644 --- a/ace-loader/test/lite/expected/forDirective.js +++ b/ace-loader/test/lite/expected/forDirective.js @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + {"render": "function (vm) { var _vm = vm || this; return _c('div', [_l((function () {return _vm.list}),function($item,$idx){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test($item,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )}),_c('div', [_l((function () {return _vm.list}),function(personItem,$idx){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test($idx,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('-') + (personItem.name) + decodeURI('--') + (personItem.age)}}} )] )}),_c('image', {'attrs' : {'src' : function () {return _vm.personItem}}} )] ),_c('div', [_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_c('text', {'attrs' : {'value' : function () {return (personIndex) + decodeURI('.') + (personItem.name)}}} )] )}),_c('swiper', {'attrs' : {'index' : function () {return _vm.personIndex},'loop' : function () {return _vm.personItem}}} )] ),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_l((function () {return _vm.menu}),function(item,index){return _c('div', [_c('text', {'attrs' : {'value' : function () {return (personItem.id) + decodeURI('--') + (item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_l((function () {return personItem}),function(item,index){return _c('div', [_c('text', {'attrs' : {'value' : function () {return (index) + decodeURI('--') + (item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(personItem,evt)}}} , [_c('div', {'attrs' : {'value' : function () {return (personIndex) + decodeURI('.') + (personItem.name)}},'onBubbleEvents' : {'click' : personItem.click}} )] )}),_l((function () {return value.list}),function(index,value){return _c('div', {'onBubbleEvents' : {'click' : function (evt) {_vm.test(value,evt)}}} , [_c('div', {'attrs' : {'value' : function () {return value.info}},'onBubbleEvents' : {'click' : value.click}} )] )})] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/ifDirective.js b/ace-loader/test/lite/expected/ifDirective.js index 4f82ca8..3966b83 100644 --- a/ace-loader/test/lite/expected/ifDirective.js +++ b/ace-loader/test/lite/expected/ifDirective.js @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + {"render": "function (vm) { var _vm = vm || this; return _c('div', [_i((function () {return _vm.conditionVar===1}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.if}}} )}),_c('div', {'staticClass' : [\"item-content\"]} , [_i((function () {return _vm.conditionVar===1}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.if}}} )}),_i((function () {return _vm.conditionVar===2&&!(_vm.conditionVar===1)}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.elif}}} )}),_i((function () {return !(_vm.conditionVar===2)&&!(_vm.conditionVar===1)}),function(){return _c('text', {'attrs' : {'value' : function () {return _vm.componentData.else}}} )})] ),_i((function () {return _vm.showTest}),function(){return _c('div', [_l((function () {return _vm.list}),function($item,$idx){return _c('div', [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function($item,$idx){return _c('div', [_i((function () {return _vm.showTest}),function(){return _c('div', [_c('text', {'attrs' : {'value' : function () {return ($idx) + decodeURI('.') + ($item.name)}}} )] )})] )}),_l((function () {return _vm.list}),function(personItem,personIndex){return _c('div', [_i((function () {return personIndex==1}),function(){return _c('div', [_c('text', {'attrs' : {'value' : function () {return personItem.name}}} )] )})] )})] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/importJS.js b/ace-loader/test/lite/expected/importJS.js index 7e94e67..ec80740 100644 --- a/ace-loader/test/lite/expected/importJS.js +++ b/ace-loader/test/lite/expected/importJS.js @@ -1,4 +1,19 @@ -{ - "goHome": "function goHome() {\n _system[\"default\"].replace({\n uri: \"pages/index/index\"\n });\n }", - "render": "function (vm) { var _vm = vm || this; return _c('div', [_c('image')] ) }" +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "goHome": "function goHome() {\n _system[\"default\"].replace({\n uri: \"pages/index/index\"\n });\n }", + "render": "function (vm) { var _vm = vm || this; return _c('div', [_c('image')] ) }" } \ No newline at end of file diff --git a/ace-loader/test/lite/expected/inlineStyle.js b/ace-loader/test/lite/expected/inlineStyle.js index 128e8f0..62d7b63 100644 --- a/ace-loader/test/lite/expected/inlineStyle.js +++ b/ace-loader/test/lite/expected/inlineStyle.js @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + {"render": "function (vm) { var _vm = vm || this; return _c('div', [_c('div', {'staticStyle' : {'width' : 10}, } ),_c('div', {'dynamicStyle' :{'height' : function () {return _vm.num}}} ),_c('text', {'staticStyle' : {'color' : 13047173}, } ),_c('div', {'staticStyle' : {'color' : 14745599}, } ),_c('div', {'staticStyle' : {'animationDelay' : \"900ms\"}, } ),_c('div', {'staticStyle' : {'animationDuration' : \"200ms\"}, } ),_c('div', {'staticStyle' : {'animationIterationCount' : \"infinite\"}, } ),_c('div', {'staticStyle' : {'animationIterationCount' : 1000}, } ),_c('div', {'staticStyle' : {'backgroundImage' : \"url(/common/img/xmad.jpg)\"}, } ),_c('div', {'staticStyle' : {'backgroundImage' : \"url(/common/img/map.jpg)\"}, } )] ) }"} \ No newline at end of file diff --git a/ace-loader/test/lite/expected/music.js b/ace-loader/test/lite/expected/music.js index d938d28..114d56c 100644 --- a/ace-loader/test/lite/expected/music.js +++ b/ace-loader/test/lite/expected/music.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "data": { "musics": [ diff --git a/ace-loader/test/lite/expected/sick.js b/ace-loader/test/lite/expected/sick.js index b831011..8afba09 100644 --- a/ace-loader/test/lite/expected/sick.js +++ b/ace-loader/test/lite/expected/sick.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "change": "function change() {\n _system[\"default\"].replace({\n uri: 'pages/music/music'\n });\n }", "data": { diff --git a/ace-loader/test/lite/testcase/app.js b/ace-loader/test/lite/testcase/app.js index bb1f752..fd1740e 100644 --- a/ace-loader/test/lite/testcase/app.js +++ b/ace-loader/test/lite/testcase/app.js @@ -1,8 +1,23 @@ -export default { - onCreate() { - console.info("AceApplication onCreate"); - }, - onDestroy() { - console.info("AceApplication onDestroy"); - } -}; +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + onCreate() { + console.info("AceApplication onCreate"); + }, + onDestroy() { + console.info("AceApplication onDestroy"); + } +}; diff --git a/ace-loader/test/lite/testcase/pages/importJS/importJS.js b/ace-loader/test/lite/testcase/pages/importJS/importJS.js index 7aae162..cdfab99 100644 --- a/ace-loader/test/lite/testcase/pages/importJS/importJS.js +++ b/ace-loader/test/lite/testcase/pages/importJS/importJS.js @@ -1,8 +1,24 @@ -/* Test import syntax */ -import router from "@system.router"; - -export default { - goHome() { - router.replace({ uri: "pages/index/index" }); - } +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Test import syntax */ + +import router from "@system.router"; + +export default { + goHome() { + router.replace({ uri: "pages/index/index" }); + } } \ No newline at end of file diff --git a/ace-loader/test/lite/testcase/pages/music/music.js b/ace-loader/test/lite/testcase/pages/music/music.js index 41778f4..22159d1 100644 --- a/ace-loader/test/lite/testcase/pages/music/music.js +++ b/ace-loader/test/lite/testcase/pages/music/music.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { data: { musics: [ diff --git a/ace-loader/test/lite/testcase/pages/sick/sick.js b/ace-loader/test/lite/testcase/pages/sick/sick.js index b8366ed..cff4ccb 100644 --- a/ace-loader/test/lite/testcase/pages/sick/sick.js +++ b/ace-loader/test/lite/testcase/pages/sick/sick.js @@ -1,10 +1,25 @@ -import router from '@system.router'; -export default { - data: { - marginLeft: '77px', - dizzinessColor: '#F5B041', - }, - change() { - router.replace({ uri: 'pages/music/music' }); - }, -}; +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router'; +export default { + data: { + marginLeft: '77px', + dizzinessColor: '#F5B041', + }, + change() { + router.replace({ uri: 'pages/music/music' }); + }, +}; diff --git a/ace-loader/test/rich/expected/class.js b/ace-loader/test/rich/expected/class.js index 98a4c0d..1b9603b 100644 --- a/ace-loader/test/rich/expected/class.js +++ b/ace-loader/test/rich/expected/class.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/class": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/commonAttr.js b/ace-loader/test/rich/expected/commonAttr.js index 9a59e78..ecb36df 100644 --- a/ace-loader/test/rich/expected/commonAttr.js +++ b/ace-loader/test/rich/expected/commonAttr.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/commonAttr": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/event.js b/ace-loader/test/rich/expected/event.js index a3c8317..db39746 100644 --- a/ace-loader/test/rich/expected/event.js +++ b/ace-loader/test/rich/expected/event.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/event": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/expression.js b/ace-loader/test/rich/expected/expression.js index 5c6f746..245e1e5 100644 --- a/ace-loader/test/rich/expected/expression.js +++ b/ace-loader/test/rich/expected/expression.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/expression": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/exteriorStyle.js b/ace-loader/test/rich/expected/exteriorStyle.js index 3c085d5..07f941e 100644 --- a/ace-loader/test/rich/expected/exteriorStyle.js +++ b/ace-loader/test/rich/expected/exteriorStyle.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/exteriorStyle": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/forDirective.js b/ace-loader/test/rich/expected/forDirective.js index 6ad1461..669c040 100644 --- a/ace-loader/test/rich/expected/forDirective.js +++ b/ace-loader/test/rich/expected/forDirective.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/forDirective": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/ifDirective.js b/ace-loader/test/rich/expected/ifDirective.js index 7938f03..035d414 100644 --- a/ace-loader/test/rich/expected/ifDirective.js +++ b/ace-loader/test/rich/expected/ifDirective.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/ifDirective": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/importCSS.js b/ace-loader/test/rich/expected/importCSS.js index 1af384c..66e850e 100644 --- a/ace-loader/test/rich/expected/importCSS.js +++ b/ace-loader/test/rich/expected/importCSS.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/importCSS": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/importJS.js b/ace-loader/test/rich/expected/importJS.js index 0a916f7..522edc5 100644 --- a/ace-loader/test/rich/expected/importJS.js +++ b/ace-loader/test/rich/expected/importJS.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/importJS": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/inlineStyle.js b/ace-loader/test/rich/expected/inlineStyle.js index 16bd91a..cb7264a 100644 --- a/ace-loader/test/rich/expected/inlineStyle.js +++ b/ace-loader/test/rich/expected/inlineStyle.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/inlineStyle": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/mediaQuery.js b/ace-loader/test/rich/expected/mediaQuery.js index c026b3a..dc241b7 100644 --- a/ace-loader/test/rich/expected/mediaQuery.js +++ b/ace-loader/test/rich/expected/mediaQuery.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/mediaQuery": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/privateAttr.js b/ace-loader/test/rich/expected/privateAttr.js index e423258..0ed854b 100644 --- a/ace-loader/test/rich/expected/privateAttr.js +++ b/ace-loader/test/rich/expected/privateAttr.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/privateAttr": { "_descriptor": {}, diff --git a/ace-loader/test/rich/expected/uncommonAttr.js b/ace-loader/test/rich/expected/uncommonAttr.js index a2201f2..1f55d90 100644 --- a/ace-loader/test/rich/expected/uncommonAttr.js +++ b/ace-loader/test/rich/expected/uncommonAttr.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "@app-component/uncommonAttr": { "_descriptor": {}, diff --git a/ace-loader/test/rich/testcase/app.js b/ace-loader/test/rich/testcase/app.js index bb1f752..fd1740e 100644 --- a/ace-loader/test/rich/testcase/app.js +++ b/ace-loader/test/rich/testcase/app.js @@ -1,8 +1,23 @@ -export default { - onCreate() { - console.info("AceApplication onCreate"); - }, - onDestroy() { - console.info("AceApplication onDestroy"); - } -}; +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + onCreate() { + console.info("AceApplication onCreate"); + }, + onDestroy() { + console.info("AceApplication onDestroy"); + } +}; diff --git a/ace-loader/test/rich/testcase/pages/importJS/importJS.js b/ace-loader/test/rich/testcase/pages/importJS/importJS.js index 8397662..99be363 100644 --- a/ace-loader/test/rich/testcase/pages/importJS/importJS.js +++ b/ace-loader/test/rich/testcase/pages/importJS/importJS.js @@ -1,8 +1,24 @@ -/* Test import syntax */ -import router from "@system.router"; - -export default { - back() { - router.back(); - } +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Test import syntax */ + +import router from "@system.router"; + +export default { + back() { + router.back(); + } } \ No newline at end of file -- Gitee