1/* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import returnInfo from '../component/autoManager/returnInfo' 17import termsListComponent from '../component/autoManager/termsListComponent' 18import utils from '../../common/utils' 19 20@Entry 21@Component 22struct TermsShowPage { 23 @StorageLink('manageTermsName') manageTermsName: string = AppStorage.Get('manageTermsName'); 24 @StorageLink('manageTermsContent') manageTermsContent: string[] = AppStorage.Get('manageTermsContent'); 25 26 build() { 27 Column() { 28 GridContainer({ 29 columns: utils.isLargeDevice(), 30 sizeType: SizeType.Auto, 31 gutter: '12vp', 32 margin: '12vp' 33 }) { 34 Column() { 35 returnInfo({ headName: $r('app.string.terms') }) 36 } 37 .width('100%') 38 .useSizeType({ 39 xs: { span: 8, offset: 0 }, sm: { span: 8, offset: 0 }, 40 md: { span: 8, offset: 0 }, lg: { span: 12, offset: 0 } 41 }) 42 } 43 44 GridContainer({ 45 columns: utils.isLargeDevice(), 46 sizeType: SizeType.Auto, 47 gutter: '12vp', 48 margin: '12vp' 49 }) { 50 Column() { 51 termsListComponent({ 52 enterpriseCustomTerms: $manageTermsName, 53 contentOfEnterpriseTerms: $manageTermsContent, 54 }) 55 } 56 .useSizeType({ 57 xs: { span: 8, offset: 0 }, sm: { span: 8, offset: 0 }, 58 md: { span: 8, offset: 0 }, lg: { span: 8, offset: 2 } 59 }) 60 .width('100%') 61 .height('100%') 62 } 63 .layoutWeight(1) 64 } 65 .backgroundColor(0xF1F3F5) 66 .width('100%') 67 .height('100%') 68 } 69}