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 router from '@system.router'; 17import { StartTestTitleComponent } from '../common/ui/StartTestTitleComponent'; 18 19/** 20 * 设置页面 21 */ 22@Entry 23@Component 24struct SettingsPage { 25 build() { 26 Column() { 27 //开始测试title 28 StartTestTitleComponent({ title: "设置" }) 29 30 Row({ space: '15vp' }) { 31 Image($r('app.media.icon_language')).width('25vp').height('25vp').margin({ left: '2%' }) 32 33 Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { 34 Text('语言切换').fontSize('15fp').fontColor($r("app.color.color_333")) 35 36 Image($r('app.media.icon_enter')).width('15vp').height('15vp').margin({ left: '15vp' }) 37 }.height('47vp').width('82%') 38 }.height('47vp').width('95%').backgroundColor($r("app.color.color_fff")).margin({ top: '10vp' }) 39 40 Divider().layoutWeight(1).visibility(Visibility.Hidden) 41 42 Text('退出登录') 43 .fontSize('15fp') 44 .fontColor($r('app.color.color_fff')) 45 .margin({ bottom: '45vp' }) 46 .border({ radius: '20vp' }) 47 .backgroundColor($r("app.color.colorPrimary")) 48 .width('80%') 49 .height('45vp') 50 .textAlign(TextAlign.Center) 51 .onClick(res => { 52 router.replace({ uri: 'pages/LoginPage' }) 53 router.clear() 54 }) 55 } 56 } 57}