背景:
前几篇学习了元服务,后面几期就让我们开发简单的元服务吧,里面丰富的内容大家自己加,本期案例 仅供参考
先上本期效果图 ,里面图片自行替换
效果图1完整代码案例如下:
import { authentication } from '@kit.AccountKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
@Entry
@Component
struct Index {
@State message: string = 'Hello World';
build() {
Column() {
Image($r('app.media.diandongche')).width('60%')
.height(200)
Row() {
Column({ space: 5 }) {
Row() {
Image($r('app.media.dianchi')).width(50).height(50)
Text('50%').fontColor(Color.White).fontSize(20).fontWeight(FontWeight.Bold)
}