123b3eb3cSopenharmony_ci/* 223b3eb3cSopenharmony_ci * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 323b3eb3cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 423b3eb3cSopenharmony_ci * you may not use this file except in compliance with the License. 523b3eb3cSopenharmony_ci * You may obtain a copy of the License at 623b3eb3cSopenharmony_ci * 723b3eb3cSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 823b3eb3cSopenharmony_ci * 923b3eb3cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1023b3eb3cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1123b3eb3cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1223b3eb3cSopenharmony_ci * See the License for the specific language governing permissions and 1323b3eb3cSopenharmony_ci * limitations under the License. 1423b3eb3cSopenharmony_ci */ 1523b3eb3cSopenharmony_ci 1623b3eb3cSopenharmony_ciif (!("finalizeConstruction" in ViewPU.prototype)) { 1723b3eb3cSopenharmony_ci Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); 1823b3eb3cSopenharmony_ci} 1923b3eb3cSopenharmony_ciconst LengthMetrics = requireNapi('arkui.node').LengthMetrics; 2023b3eb3cSopenharmony_ciconst TEXT_MARGIN_TOP_4 = 4; 2123b3eb3cSopenharmony_ciconst TEXT_MARGIN_BOTTOM_8 = 8; 2223b3eb3cSopenharmony_ciconst TEXT_MARGIN_BOTTOM_24 = 24; 2323b3eb3cSopenharmony_ciconst TEXT_MARGIN_LEFT_48 = 48; 2423b3eb3cSopenharmony_ciconst TEXT_MARGIN_RIGHT_48 = 48; 2523b3eb3cSopenharmony_ciexport class SplitLayout extends ViewPU { 2623b3eb3cSopenharmony_ci constructor(n4, o4, p4, q4 = -1, r4 = undefined, s4) { 2723b3eb3cSopenharmony_ci super(n4, p4, q4, s4); 2823b3eb3cSopenharmony_ci if (typeof r4 === "function") { 2923b3eb3cSopenharmony_ci this.paramsGenerator_ = r4; 3023b3eb3cSopenharmony_ci } 3123b3eb3cSopenharmony_ci this.container = undefined; 3223b3eb3cSopenharmony_ci this.__sizeValue = new ObservedPropertySimplePU('', this, "sizeValue"); 3323b3eb3cSopenharmony_ci this.__areaWidth = new ObservedPropertySimplePU(0, this, "areaWidth"); 3423b3eb3cSopenharmony_ci this.__imageBackgroundColor = new ObservedPropertySimplePU("#19000000", this, "imageBackgroundColor"); 3523b3eb3cSopenharmony_ci this.__mainImage = new ObservedPropertyObjectPU(undefined, this, "mainImage"); 3623b3eb3cSopenharmony_ci this.__primaryText = new SynchedPropertySimpleOneWayPU(o4.primaryText, this, "primaryText"); 3723b3eb3cSopenharmony_ci this.secondaryText = ""; 3823b3eb3cSopenharmony_ci this.tertiaryText = ""; 3923b3eb3cSopenharmony_ci this.setInitiallyProvidedValue(o4); 4023b3eb3cSopenharmony_ci this.finalizeConstruction(); 4123b3eb3cSopenharmony_ci } 4223b3eb3cSopenharmony_ci setInitiallyProvidedValue(m4) { 4323b3eb3cSopenharmony_ci if (m4.container !== undefined) { 4423b3eb3cSopenharmony_ci this.container = m4.container; 4523b3eb3cSopenharmony_ci } 4623b3eb3cSopenharmony_ci if (m4.sizeValue !== undefined) { 4723b3eb3cSopenharmony_ci this.sizeValue = m4.sizeValue; 4823b3eb3cSopenharmony_ci } 4923b3eb3cSopenharmony_ci if (m4.areaWidth !== undefined) { 5023b3eb3cSopenharmony_ci this.areaWidth = m4.areaWidth; 5123b3eb3cSopenharmony_ci } 5223b3eb3cSopenharmony_ci if (m4.imageBackgroundColor !== undefined) { 5323b3eb3cSopenharmony_ci this.imageBackgroundColor = m4.imageBackgroundColor; 5423b3eb3cSopenharmony_ci } 5523b3eb3cSopenharmony_ci if (m4.mainImage !== undefined) { 5623b3eb3cSopenharmony_ci this.mainImage = m4.mainImage; 5723b3eb3cSopenharmony_ci } 5823b3eb3cSopenharmony_ci if (m4.primaryText === undefined) { 5923b3eb3cSopenharmony_ci this.__primaryText.set(""); 6023b3eb3cSopenharmony_ci } 6123b3eb3cSopenharmony_ci if (m4.secondaryText !== undefined) { 6223b3eb3cSopenharmony_ci this.secondaryText = m4.secondaryText; 6323b3eb3cSopenharmony_ci } 6423b3eb3cSopenharmony_ci if (m4.tertiaryText !== undefined) { 6523b3eb3cSopenharmony_ci this.tertiaryText = m4.tertiaryText; 6623b3eb3cSopenharmony_ci } 6723b3eb3cSopenharmony_ci } 6823b3eb3cSopenharmony_ci updateStateVars(l4) { 6923b3eb3cSopenharmony_ci this.__primaryText.reset(l4.primaryText); 7023b3eb3cSopenharmony_ci } 7123b3eb3cSopenharmony_ci purgeVariableDependenciesOnElmtId(k4) { 7223b3eb3cSopenharmony_ci this.__sizeValue.purgeDependencyOnElmtId(k4); 7323b3eb3cSopenharmony_ci this.__areaWidth.purgeDependencyOnElmtId(k4); 7423b3eb3cSopenharmony_ci this.__imageBackgroundColor.purgeDependencyOnElmtId(k4); 7523b3eb3cSopenharmony_ci this.__mainImage.purgeDependencyOnElmtId(k4); 7623b3eb3cSopenharmony_ci this.__primaryText.purgeDependencyOnElmtId(k4); 7723b3eb3cSopenharmony_ci } 7823b3eb3cSopenharmony_ci aboutToBeDeleted() { 7923b3eb3cSopenharmony_ci this.__sizeValue.aboutToBeDeleted(); 8023b3eb3cSopenharmony_ci this.__areaWidth.aboutToBeDeleted(); 8123b3eb3cSopenharmony_ci this.__imageBackgroundColor.aboutToBeDeleted(); 8223b3eb3cSopenharmony_ci this.__mainImage.aboutToBeDeleted(); 8323b3eb3cSopenharmony_ci this.__primaryText.aboutToBeDeleted(); 8423b3eb3cSopenharmony_ci SubscriberManager.Get().delete(this.id__()); 8523b3eb3cSopenharmony_ci this.aboutToBeDeletedInternal(); 8623b3eb3cSopenharmony_ci } 8723b3eb3cSopenharmony_ci get sizeValue() { 8823b3eb3cSopenharmony_ci return this.__sizeValue.get(); 8923b3eb3cSopenharmony_ci } 9023b3eb3cSopenharmony_ci set sizeValue(j4) { 9123b3eb3cSopenharmony_ci this.__sizeValue.set(j4); 9223b3eb3cSopenharmony_ci } 9323b3eb3cSopenharmony_ci get areaWidth() { 9423b3eb3cSopenharmony_ci return this.__areaWidth.get(); 9523b3eb3cSopenharmony_ci } 9623b3eb3cSopenharmony_ci set areaWidth(i4) { 9723b3eb3cSopenharmony_ci this.__areaWidth.set(i4); 9823b3eb3cSopenharmony_ci } 9923b3eb3cSopenharmony_ci get imageBackgroundColor() { 10023b3eb3cSopenharmony_ci return this.__imageBackgroundColor.get(); 10123b3eb3cSopenharmony_ci } 10223b3eb3cSopenharmony_ci set imageBackgroundColor(h4) { 10323b3eb3cSopenharmony_ci this.__imageBackgroundColor.set(h4); 10423b3eb3cSopenharmony_ci } 10523b3eb3cSopenharmony_ci get mainImage() { 10623b3eb3cSopenharmony_ci return this.__mainImage.get(); 10723b3eb3cSopenharmony_ci } 10823b3eb3cSopenharmony_ci set mainImage(g4) { 10923b3eb3cSopenharmony_ci this.__mainImage.set(g4); 11023b3eb3cSopenharmony_ci } 11123b3eb3cSopenharmony_ci get primaryText() { 11223b3eb3cSopenharmony_ci return this.__primaryText.get(); 11323b3eb3cSopenharmony_ci } 11423b3eb3cSopenharmony_ci set primaryText(f4) { 11523b3eb3cSopenharmony_ci this.__primaryText.set(f4); 11623b3eb3cSopenharmony_ci } 11723b3eb3cSopenharmony_ci initialRender() { 11823b3eb3cSopenharmony_ci this.observeComponentCreation2((a4, b4) => { 11923b3eb3cSopenharmony_ci Column.create(); 12023b3eb3cSopenharmony_ci Column.onAreaChange((d4, e4) => { 12123b3eb3cSopenharmony_ci console.info(`Ace: on area change, oldValue is ${JSON.stringify(d4)} value is ${JSON.stringify(e4)}`); 12223b3eb3cSopenharmony_ci this.sizeValue = JSON.stringify(e4); 12323b3eb3cSopenharmony_ci this.areaWidth = parseInt(e4.width.toString(), 0); 12423b3eb3cSopenharmony_ci console.info(`pingAce: on area change, oldValue is` + this.areaWidth); 12523b3eb3cSopenharmony_ci console.info(`pingAce: on area change, oldValue is` + parseInt(e4.height.toString(), 0)); 12623b3eb3cSopenharmony_ci }); 12723b3eb3cSopenharmony_ci }, Column); 12823b3eb3cSopenharmony_ci this.observeComponentCreation2((c, d) => { 12923b3eb3cSopenharmony_ci If.create(); 13023b3eb3cSopenharmony_ci if (this.areaWidth < 600) { 13123b3eb3cSopenharmony_ci this.ifElseBranchUpdateFunction(0, () => { 13223b3eb3cSopenharmony_ci this.observeComponentCreation2((y3, z3) => { 13323b3eb3cSopenharmony_ci GridRow.create({ 13423b3eb3cSopenharmony_ci columns: 4, 13523b3eb3cSopenharmony_ci breakpoints: { 13623b3eb3cSopenharmony_ci reference: BreakpointsReference.WindowSize 13723b3eb3cSopenharmony_ci }, 13823b3eb3cSopenharmony_ci direction: GridRowDirection.Row 13923b3eb3cSopenharmony_ci }); 14023b3eb3cSopenharmony_ci }, GridRow); 14123b3eb3cSopenharmony_ci this.observeComponentCreation2((w3, x3) => { 14223b3eb3cSopenharmony_ci GridCol.create({ span: { xs: 4, sm: 4, md: 4, lg: 4 } }); 14323b3eb3cSopenharmony_ci }, GridCol); 14423b3eb3cSopenharmony_ci this.observeComponentCreation2((u3, v3) => { 14523b3eb3cSopenharmony_ci Column.create(); 14623b3eb3cSopenharmony_ci }, Column); 14723b3eb3cSopenharmony_ci this.observeComponentCreation2((s3, t3) => { 14823b3eb3cSopenharmony_ci Stack.create({ alignContent: Alignment.Bottom }); 14923b3eb3cSopenharmony_ci Stack.height('34%'); 15023b3eb3cSopenharmony_ci Stack.width('100%'); 15123b3eb3cSopenharmony_ci }, Stack); 15223b3eb3cSopenharmony_ci this.observeComponentCreation2((q3, r3) => { 15323b3eb3cSopenharmony_ci Image.create(this.mainImage); 15423b3eb3cSopenharmony_ci Image.height('100%'); 15523b3eb3cSopenharmony_ci Image.width('100%'); 15623b3eb3cSopenharmony_ci }, Image); 15723b3eb3cSopenharmony_ci this.observeComponentCreation2((o3, p3) => { 15823b3eb3cSopenharmony_ci Scroll.create(); 15923b3eb3cSopenharmony_ci Scroll.scrollBar(BarState.On); 16023b3eb3cSopenharmony_ci Scroll.nestedScroll({ 16123b3eb3cSopenharmony_ci scrollForward: NestedScrollMode.SELF_FIRST, 16223b3eb3cSopenharmony_ci scrollBackward: NestedScrollMode.SELF_FIRST, 16323b3eb3cSopenharmony_ci }); 16423b3eb3cSopenharmony_ci }, Scroll); 16523b3eb3cSopenharmony_ci this.observeComponentCreation2((m3, n3) => { 16623b3eb3cSopenharmony_ci Column.create(); 16723b3eb3cSopenharmony_ci Column.alignItems(HorizontalAlign.Center); 16823b3eb3cSopenharmony_ci Column.margin({ 16923b3eb3cSopenharmony_ci left: { "id": -1, "type": 10002, params: ['sys.float.ohos_id_max_padding_start'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }, 17023b3eb3cSopenharmony_ci right: { "id": -1, "type": 10002, params: ['sys.float.ohos_id_max_padding_end'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }, 17123b3eb3cSopenharmony_ci }); 17223b3eb3cSopenharmony_ci }, Column); 17323b3eb3cSopenharmony_ci this.observeComponentCreation2((k3, l3) => { 17423b3eb3cSopenharmony_ci Text.create(this.primaryText); 17523b3eb3cSopenharmony_ci Text.fontWeight(FontWeight.Medium); 17623b3eb3cSopenharmony_ci Text.textAlign(TextAlign.Center); 17723b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Title_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 17823b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_primary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 17923b3eb3cSopenharmony_ci }, Text); 18023b3eb3cSopenharmony_ci Text.pop(); 18123b3eb3cSopenharmony_ci this.observeComponentCreation2((i3, j3) => { 18223b3eb3cSopenharmony_ci Text.create(this.secondaryText); 18323b3eb3cSopenharmony_ci Text.textAlign(TextAlign.Center); 18423b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Body_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 18523b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_primary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 18623b3eb3cSopenharmony_ci Text.margin({ top: TEXT_MARGIN_TOP_4, bottom: TEXT_MARGIN_BOTTOM_8 }); 18723b3eb3cSopenharmony_ci }, Text); 18823b3eb3cSopenharmony_ci Text.pop(); 18923b3eb3cSopenharmony_ci this.observeComponentCreation2((g3, h3) => { 19023b3eb3cSopenharmony_ci Text.create(this.tertiaryText); 19123b3eb3cSopenharmony_ci Text.textAlign(TextAlign.Center); 19223b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Caption_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 19323b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_secondary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 19423b3eb3cSopenharmony_ci Text.margin({ bottom: TEXT_MARGIN_BOTTOM_24 }); 19523b3eb3cSopenharmony_ci }, Text); 19623b3eb3cSopenharmony_ci Text.pop(); 19723b3eb3cSopenharmony_ci Column.pop(); 19823b3eb3cSopenharmony_ci Scroll.pop(); 19923b3eb3cSopenharmony_ci Stack.pop(); 20023b3eb3cSopenharmony_ci this.observeComponentCreation2((e3, f3) => { 20123b3eb3cSopenharmony_ci Column.create(); 20223b3eb3cSopenharmony_ci Column.height('66%'); 20323b3eb3cSopenharmony_ci Column.width('100%'); 20423b3eb3cSopenharmony_ci }, Column); 20523b3eb3cSopenharmony_ci this.container.bind(this)(); 20623b3eb3cSopenharmony_ci Column.pop(); 20723b3eb3cSopenharmony_ci Column.pop(); 20823b3eb3cSopenharmony_ci GridCol.pop(); 20923b3eb3cSopenharmony_ci GridRow.pop(); 21023b3eb3cSopenharmony_ci }); 21123b3eb3cSopenharmony_ci } 21223b3eb3cSopenharmony_ci else if (600 < this.areaWidth && this.areaWidth < 840) { 21323b3eb3cSopenharmony_ci this.ifElseBranchUpdateFunction(1, () => { 21423b3eb3cSopenharmony_ci this.observeComponentCreation2((q2, r2) => { 21523b3eb3cSopenharmony_ci GridRow.create({ 21623b3eb3cSopenharmony_ci columns: 8, 21723b3eb3cSopenharmony_ci breakpoints: { 21823b3eb3cSopenharmony_ci reference: BreakpointsReference.WindowSize 21923b3eb3cSopenharmony_ci }, 22023b3eb3cSopenharmony_ci direction: GridRowDirection.Row 22123b3eb3cSopenharmony_ci }); 22223b3eb3cSopenharmony_ci }, GridRow); 22323b3eb3cSopenharmony_ci this.observeComponentCreation2((o2, p2) => { 22423b3eb3cSopenharmony_ci GridCol.create({ span: { xs: 8, sm: 8, md: 8, lg: 8 } }); 22523b3eb3cSopenharmony_ci }, GridCol); 22623b3eb3cSopenharmony_ci this.observeComponentCreation2((m2, n2) => { 22723b3eb3cSopenharmony_ci Column.create(); 22823b3eb3cSopenharmony_ci }, Column); 22923b3eb3cSopenharmony_ci this.observeComponentCreation2((k2, l2) => { 23023b3eb3cSopenharmony_ci Row.create(); 23123b3eb3cSopenharmony_ci Row.backgroundColor(this.imageBackgroundColor); 23223b3eb3cSopenharmony_ci Row.height('34%'); 23323b3eb3cSopenharmony_ci Row.width('100%'); 23423b3eb3cSopenharmony_ci }, Row); 23523b3eb3cSopenharmony_ci this.observeComponentCreation2((i2, j2) => { 23623b3eb3cSopenharmony_ci Image.create(this.mainImage); 23723b3eb3cSopenharmony_ci Image.margin({ start: LengthMetrics.vp(96), end: LengthMetrics.vp(36) }); 23823b3eb3cSopenharmony_ci Image.height('60%'); 23923b3eb3cSopenharmony_ci Image.width('20%'); 24023b3eb3cSopenharmony_ci }, Image); 24123b3eb3cSopenharmony_ci this.observeComponentCreation2((g2, h2) => { 24223b3eb3cSopenharmony_ci Scroll.create(); 24323b3eb3cSopenharmony_ci Scroll.scrollBar(BarState.On); 24423b3eb3cSopenharmony_ci Scroll.nestedScroll({ 24523b3eb3cSopenharmony_ci scrollForward: NestedScrollMode.SELF_FIRST, 24623b3eb3cSopenharmony_ci scrollBackward: NestedScrollMode.SELF_FIRST, 24723b3eb3cSopenharmony_ci }); 24823b3eb3cSopenharmony_ci }, Scroll); 24923b3eb3cSopenharmony_ci this.observeComponentCreation2((e2, f2) => { 25023b3eb3cSopenharmony_ci Column.create(); 25123b3eb3cSopenharmony_ci Column.width('42%'); 25223b3eb3cSopenharmony_ci Column.alignItems(HorizontalAlign.Start); 25323b3eb3cSopenharmony_ci Column.margin({ end: LengthMetrics.vp(96) }); 25423b3eb3cSopenharmony_ci }, Column); 25523b3eb3cSopenharmony_ci this.observeComponentCreation2((c2, d2) => { 25623b3eb3cSopenharmony_ci Text.create(this.primaryText); 25723b3eb3cSopenharmony_ci Text.fontWeight(FontWeight.Medium); 25823b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Title_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 25923b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_primary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 26023b3eb3cSopenharmony_ci }, Text); 26123b3eb3cSopenharmony_ci Text.pop(); 26223b3eb3cSopenharmony_ci this.observeComponentCreation2((a2, b2) => { 26323b3eb3cSopenharmony_ci Text.create(this.secondaryText); 26423b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Body_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 26523b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_primary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 26623b3eb3cSopenharmony_ci Text.margin({ top: TEXT_MARGIN_TOP_4, bottom: TEXT_MARGIN_BOTTOM_8 }); 26723b3eb3cSopenharmony_ci }, Text); 26823b3eb3cSopenharmony_ci Text.pop(); 26923b3eb3cSopenharmony_ci this.observeComponentCreation2((y1, z1) => { 27023b3eb3cSopenharmony_ci Text.create(this.tertiaryText); 27123b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Caption_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 27223b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_secondary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 27323b3eb3cSopenharmony_ci Text.margin({ bottom: TEXT_MARGIN_BOTTOM_24 }); 27423b3eb3cSopenharmony_ci }, Text); 27523b3eb3cSopenharmony_ci Text.pop(); 27623b3eb3cSopenharmony_ci Column.pop(); 27723b3eb3cSopenharmony_ci Scroll.pop(); 27823b3eb3cSopenharmony_ci Row.pop(); 27923b3eb3cSopenharmony_ci this.observeComponentCreation2((w1, x1) => { 28023b3eb3cSopenharmony_ci Column.create(); 28123b3eb3cSopenharmony_ci Column.width('100%'); 28223b3eb3cSopenharmony_ci Column.height('66%'); 28323b3eb3cSopenharmony_ci }, Column); 28423b3eb3cSopenharmony_ci this.container.bind(this)(); 28523b3eb3cSopenharmony_ci Column.pop(); 28623b3eb3cSopenharmony_ci Column.pop(); 28723b3eb3cSopenharmony_ci GridCol.pop(); 28823b3eb3cSopenharmony_ci GridRow.pop(); 28923b3eb3cSopenharmony_ci }); 29023b3eb3cSopenharmony_ci } 29123b3eb3cSopenharmony_ci else if (this.areaWidth > 840) { 29223b3eb3cSopenharmony_ci this.ifElseBranchUpdateFunction(2, () => { 29323b3eb3cSopenharmony_ci this.observeComponentCreation2((i1, j1) => { 29423b3eb3cSopenharmony_ci GridRow.create({ 29523b3eb3cSopenharmony_ci columns: 12, 29623b3eb3cSopenharmony_ci breakpoints: { 29723b3eb3cSopenharmony_ci reference: BreakpointsReference.WindowSize 29823b3eb3cSopenharmony_ci }, 29923b3eb3cSopenharmony_ci direction: GridRowDirection.Row 30023b3eb3cSopenharmony_ci }); 30123b3eb3cSopenharmony_ci GridRow.width('100%'); 30223b3eb3cSopenharmony_ci }, GridRow); 30323b3eb3cSopenharmony_ci this.observeComponentCreation2((g1, h1) => { 30423b3eb3cSopenharmony_ci GridCol.create({ span: { xs: 4, sm: 4, md: 4, lg: 4 } }); 30523b3eb3cSopenharmony_ci GridCol.height('100%'); 30623b3eb3cSopenharmony_ci }, GridCol); 30723b3eb3cSopenharmony_ci this.observeComponentCreation2((e1, f1) => { 30823b3eb3cSopenharmony_ci Flex.create({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center, direction: FlexDirection.Column }); 30923b3eb3cSopenharmony_ci Flex.width('100%'); 31023b3eb3cSopenharmony_ci Flex.height('100%'); 31123b3eb3cSopenharmony_ci Flex.backgroundColor(this.imageBackgroundColor); 31223b3eb3cSopenharmony_ci }, Flex); 31323b3eb3cSopenharmony_ci this.observeComponentCreation2((c1, d1) => { 31423b3eb3cSopenharmony_ci Image.create(this.mainImage); 31523b3eb3cSopenharmony_ci Image.height('17%'); 31623b3eb3cSopenharmony_ci Image.width('34%'); 31723b3eb3cSopenharmony_ci Image.margin({ bottom: 36 }); 31823b3eb3cSopenharmony_ci }, Image); 31923b3eb3cSopenharmony_ci this.observeComponentCreation2((a1, b1) => { 32023b3eb3cSopenharmony_ci Scroll.create(); 32123b3eb3cSopenharmony_ci Scroll.scrollBar(BarState.On); 32223b3eb3cSopenharmony_ci Scroll.nestedScroll({ 32323b3eb3cSopenharmony_ci scrollForward: NestedScrollMode.SELF_FIRST, 32423b3eb3cSopenharmony_ci scrollBackward: NestedScrollMode.SELF_FIRST, 32523b3eb3cSopenharmony_ci }); 32623b3eb3cSopenharmony_ci }, Scroll); 32723b3eb3cSopenharmony_ci this.observeComponentCreation2((y, z) => { 32823b3eb3cSopenharmony_ci Column.create(); 32923b3eb3cSopenharmony_ci Column.alignItems(HorizontalAlign.Center); 33023b3eb3cSopenharmony_ci Column.margin({ 33123b3eb3cSopenharmony_ci left: { "id": -1, "type": 10002, params: ['sys.float.ohos_id_max_padding_start'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }, 33223b3eb3cSopenharmony_ci right: { "id": -1, "type": 10002, params: ['sys.float.ohos_id_max_padding_end'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }, 33323b3eb3cSopenharmony_ci }); 33423b3eb3cSopenharmony_ci }, Column); 33523b3eb3cSopenharmony_ci this.observeComponentCreation2((w, x) => { 33623b3eb3cSopenharmony_ci Text.create(this.primaryText); 33723b3eb3cSopenharmony_ci Text.textAlign(TextAlign.Center); 33823b3eb3cSopenharmony_ci Text.fontWeight(FontWeight.Medium); 33923b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Title_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 34023b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_primary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 34123b3eb3cSopenharmony_ci Text.margin({ left: TEXT_MARGIN_LEFT_48, right: TEXT_MARGIN_RIGHT_48 }); 34223b3eb3cSopenharmony_ci }, Text); 34323b3eb3cSopenharmony_ci Text.pop(); 34423b3eb3cSopenharmony_ci this.observeComponentCreation2((u, v) => { 34523b3eb3cSopenharmony_ci Text.create(this.secondaryText); 34623b3eb3cSopenharmony_ci Text.textAlign(TextAlign.Center); 34723b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Body_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 34823b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_primary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 34923b3eb3cSopenharmony_ci Text.margin({ top: TEXT_MARGIN_TOP_4, bottom: TEXT_MARGIN_BOTTOM_8, 35023b3eb3cSopenharmony_ci left: TEXT_MARGIN_LEFT_48, right: TEXT_MARGIN_RIGHT_48 }); 35123b3eb3cSopenharmony_ci }, Text); 35223b3eb3cSopenharmony_ci Text.pop(); 35323b3eb3cSopenharmony_ci this.observeComponentCreation2((s, t) => { 35423b3eb3cSopenharmony_ci Text.create(this.tertiaryText); 35523b3eb3cSopenharmony_ci Text.textAlign(TextAlign.Center); 35623b3eb3cSopenharmony_ci Text.fontSize({ "id": -1, "type": 10002, params: ['sys.float.Caption_M'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 35723b3eb3cSopenharmony_ci Text.fontColor({ "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_text_secondary'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 35823b3eb3cSopenharmony_ci Text.margin({ left: TEXT_MARGIN_LEFT_48, right: TEXT_MARGIN_RIGHT_48, bottom: TEXT_MARGIN_BOTTOM_24 }); 35923b3eb3cSopenharmony_ci }, Text); 36023b3eb3cSopenharmony_ci Text.pop(); 36123b3eb3cSopenharmony_ci Column.pop(); 36223b3eb3cSopenharmony_ci Scroll.pop(); 36323b3eb3cSopenharmony_ci Flex.pop(); 36423b3eb3cSopenharmony_ci GridCol.pop(); 36523b3eb3cSopenharmony_ci this.observeComponentCreation2((q, r) => { 36623b3eb3cSopenharmony_ci GridCol.create({ span: { xs: 8, sm: 8, md: 8, lg: 8 } }); 36723b3eb3cSopenharmony_ci }, GridCol); 36823b3eb3cSopenharmony_ci this.container.bind(this)(); 36923b3eb3cSopenharmony_ci GridCol.pop(); 37023b3eb3cSopenharmony_ci GridRow.pop(); 37123b3eb3cSopenharmony_ci }); 37223b3eb3cSopenharmony_ci } 37323b3eb3cSopenharmony_ci else { 37423b3eb3cSopenharmony_ci this.ifElseBranchUpdateFunction(3, () => { 37523b3eb3cSopenharmony_ci }); 37623b3eb3cSopenharmony_ci } 37723b3eb3cSopenharmony_ci }, If); 37823b3eb3cSopenharmony_ci If.pop(); 37923b3eb3cSopenharmony_ci Column.pop(); 38023b3eb3cSopenharmony_ci } 38123b3eb3cSopenharmony_ci rerender() { 38223b3eb3cSopenharmony_ci this.updateDirtyElements(); 38323b3eb3cSopenharmony_ci } 38423b3eb3cSopenharmony_ci} 38523b3eb3cSopenharmony_ci 38623b3eb3cSopenharmony_ciexport default { SplitLayout };