#鸿蒙通关秘籍#DevEco Studio是否支持我自定义服务卡片的布局?

HarmonyOS
2024-11-27 13:30:09
779浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
系统小专家

允许你自定义服务卡片的,你可以后面再去了解一下服务卡片的开发规范,根据业务要求进行卡片的设计与实现。


import { DateCommon } from '../model/DateCommon';
import { TimeCard } from '../view/TimeCard';

@Entry
@Component
struct Card_ShadowFloatCard {
  /*
  * The title.
  */
  readonly `TITLE`: string = 'Hello World';
  /*
  * The action type.
  */
  readonly `ACTION_TYPE`: string = 'router';
  /*
  * The ability name.
  */
  readonly `ABILITY_NAME`: string = 'EntryAbility';
  /*
  * The message.
  */
  readonly `MESSAGE`: string = 'add detail';
  /*
  * The width percentage setting.
  */
  readonly `FULL_WIDTH_PERCENT`: string = '100%';
  /*
  * The height percentage setting.
  */
  readonly `FULL_HEIGHT_PERCENT`: string = '100%';
  @State `isOk`: boolean = false;
  @State `buttonOption`: boolean = true;
  @State `isToggle`: boolean = false
  @State `isTimerDialog`: boolean = false
  @State `countMode`: boolean = true
  private `selectedDate`: Date = new Date()
  @State `timeArr`: string[] = [`'${this.selectedDate.getHours()}'`, `'${this.selectedDate.getMinutes()}'`,
  `${this.selectedDate.getDate()}`] //['22', '37', '01']
  `textTimerController`: TextTimerController = new TextTimerController()

  build() {
    Row() {
      Column() {
        Row() {
        }
      }
    }
  }
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
已于2024-11-27 15:48:16修改
分享
微博
QQ
微信
回复
2024-11-27 14:40:08
相关问题