提交 e8d2d895 编写于 作者: H hk_js

fix the two thread issue about window system

Signed-off-by: Nhk_js <hekun18@huawei.com>
上级 d50d9bd8
/*
* Copyright (C) 2022 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.
*/
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
/*
* Copyright (C) 2022 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.
*/
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/*
* Copyright (C) 2022 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: ""
},
onInit() {
this.title = this.$t('strings.world');
}
}
......@@ -2915,7 +2915,7 @@ describe('window_test', function () {
if (!!data) {
tempWnd = data
expect(!!tempWnd).assertTrue();
tempWnd.loadContent('pages/index', (err, data) => {
tempWnd.loadContent('pages/two', (err, data) => {
console.log(msgStr + 'tempWnd.loadContent err' + JSON.stringify(err));
console.log(msgStr + 'tempWnd.loadContent data' + JSON.stringify(data));
console.log(msgStr + 'tempWnd.loadContent !!data' + !!data);
......@@ -2985,11 +2985,11 @@ describe('window_test', function () {
console.log(msgStr + 'window.create ' + baseWndType + ' , wnd: ' + tempWnd);
expect(!!tempWnd).assertTrue();
console.log(msgStr + 'tempWnd.loadContent start');
let load = await tempWnd.loadContent('pages/index/index').catch((err) => {
let load = await tempWnd.loadContent('pages/two/two').catch((err) => {
unexpectedError(err, caseName, 'tempWnd.loadContent', done);
console.log(msgStr+'tempWnd.loadContent(pages/index/index) err='+JSON.stringify(err));
console.log(msgStr+'tempWnd.loadContent(pages/two/two) err='+JSON.stringify(err));
});
console.log(msgStr+'tempWnd.loadContent(pages/index/index) load='+JSON.stringify(load));
console.log(msgStr+'tempWnd.loadContent(pages/two/two) load='+JSON.stringify(load));
expect(!load).assertTrue();
done();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册