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@Component 16export struct SearchResultPage { 17 build() { 18 List() { 19 ListItem() { //Number of Searched Sessions 20 Text('找到2个会话').fontSize(10).fontColor(Color.Black).margin({ left: 24, top: 24 }) 21 22 } 23 24 ListItem() { //Searched session item 25 SearchItem() 26 } 27 28 ListItem() { //Searched session item 29 SearchItem() 30 } 31 32 ListItem() { //Number of Searched Information 33 Text('找到2条信息').fontSize(10).fontColor(Color.Black).margin({ left: 24, top: 24 }) 34 } 35 36 ListItem() { //Information item 37 SearchItem() 38 } 39 40 ListItem() { //Information item 41 SearchItem() 42 } 43 } 44 45 } 46} 47 48@Component 49struct SearchItem { 50 build() { 51 Column() { 52 Row() { 53 Image($rawfile('icon/user_avatar_full_fill.svg')) 54 .height(40) 55 .width(40) 56 Column() { 57 Row() { 58 Text('电话').fontSize(16).fontColor(Color.Black) 59 Blank() 60 Text('时间').fontSize(12).fontColor(Color.Gray) 61 }.width('100%') 62 63 Row() { 64 Text('内容').fontSize(14).fontColor(Color.Gray) 65 66 }.width('100%') 67 }.layoutWeight(1).margin({ left: 12 }) 68 }.height(64).width('100%').padding({ left: 24, right: 24 }) 69 } 70 } 71}