首页
学习
活动
专区
圈层
工具
发布
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    209.HarmonyOS NEXT系列教程之 TabsConcaveCircle组件状态管理与生命周期

    状态装饰器使用@Componentexport struct TabsConcaveCircle { @Link @Watch("getAnimateSelectIndex") selectIndex...tabsFontColor: Color = Color.Black; @Prop tabsSelectFontColor: Color = Color.Black;}状态装饰器详解:@Link装饰器:用于实现双向数据绑定selectIndex...tabsBgColor: 背景颜色tabsSelectBgColor: 选中状态颜色tabsFontColor: 文字颜色@Watch装饰器:监听状态变化getAnimateSelectIndex: 当selectIndex...inspector.createComponentObserver(`${this.concaveCircleId}0`) this.getImageOffsetY() this.animateSelectIndex = this.selectIndex...{this.concaveCircleId}0`)创建组件观察器用于监听组件的变化初始化处理:this.getImageOffsetY()this.animateSelectIndex = this.selectIndex

    11800
    领券