107ac75b1Sopenharmony_ci/* 207ac75b1Sopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 307ac75b1Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 407ac75b1Sopenharmony_ci * you may not use this file except in compliance with the License. 507ac75b1Sopenharmony_ci * You may obtain a copy of the License at 607ac75b1Sopenharmony_ci * 707ac75b1Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 807ac75b1Sopenharmony_ci * 907ac75b1Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1007ac75b1Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1107ac75b1Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1207ac75b1Sopenharmony_ci * See the License for the specific language governing permissions and 1307ac75b1Sopenharmony_ci * limitations under the License. 1407ac75b1Sopenharmony_ci */ 1507ac75b1Sopenharmony_ci 1607ac75b1Sopenharmony_ciclass MyLinkTestComponent extends View { 1707ac75b1Sopenharmony_ci constructor(inputParams) { 1807ac75b1Sopenharmony_ci super(); 1907ac75b1Sopenharmony_ci this.myVar = 0; 2007ac75b1Sopenharmony_ci Object.assign(this, inputParams); 2107ac75b1Sopenharmony_ci this.createLink("myLink1"); 2207ac75b1Sopenharmony_ci this.createLink("myLink2"); 2307ac75b1Sopenharmony_ci this.createLink("myLink3"); 2407ac75b1Sopenharmony_ci this.createLink("myLink4"); 2507ac75b1Sopenharmony_ci } 2607ac75b1Sopenharmony_ci render() { 2707ac75b1Sopenharmony_ci } 2807ac75b1Sopenharmony_ci} 2907ac75b1Sopenharmony_ciclass LinkTest extends View { 3007ac75b1Sopenharmony_ci constructor(inputParams) { 3107ac75b1Sopenharmony_ci super(); 3207ac75b1Sopenharmony_ci this.myState1 = { count: 0 }; 3307ac75b1Sopenharmony_ci this.myState2 = 0; 3407ac75b1Sopenharmony_ci this.myState3 = false; 3507ac75b1Sopenharmony_ci this.myState4 = 'Home'; 3607ac75b1Sopenharmony_ci Object.assign(this, inputParams); 3707ac75b1Sopenharmony_ci this.createState("myState1"); 3807ac75b1Sopenharmony_ci this.createState("myState2"); 3907ac75b1Sopenharmony_ci this.createState("myState3"); 4007ac75b1Sopenharmony_ci this.createState("myState4"); 4107ac75b1Sopenharmony_ci } 4207ac75b1Sopenharmony_ci render() { return new Row(new MyLinkTestComponent({ 4307ac75b1Sopenharmony_ci myLink1: createLinkReference(this, "myState1"), 4407ac75b1Sopenharmony_ci myLink2: createLinkReference(this, "myState2"), 4507ac75b1Sopenharmony_ci myLink3: createLinkReference(this, "myState3"), 4607ac75b1Sopenharmony_ci myLink4: createLinkReference(this, "myState4"), 4707ac75b1Sopenharmony_ci myVar: 100, 4807ac75b1Sopenharmony_ci myVar2: 100, 4907ac75b1Sopenharmony_ci })); } 5007ac75b1Sopenharmony_ci} 5107ac75b1Sopenharmony_ciloadDocument(new LinkTest()); 52