#鸿蒙通关秘籍#鸿蒙开发的IDE提供了哪些工具来帮助我生成ArkTSDoc文档?

HarmonyOS
2024-11-27 14:15:09
950浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
DataDevil

ArkTSDoc文档生成工具,你可以用 `Generate > ArkTSDoc` 功能,生成详细的API文档,会生成结构化的问题。

import { ITabContentItem, tabDatas } from '../model/tabsModel';
import { ContentPages } from '../viewmodel/ContentPages';

@Entry
@Component
struct Index {
    public @State message: string = 'Hello World';
    public @State currentIndex: number = 0;
    public @State currentTabData: ITabContentItem | undefined = undefined

    build() {
        RelativeContainer() {
            Tabs({ barPosition: BarPosition.End, index: this.currentIndex }) {
                ForEach(tabDatas, (tabData: ITabContentItem, index: number) => {
                    ContentPages({ tabContent: tabData, index: index, currentIndex: this.currentIndex })
                })
            }.onChange(index => {
                animateTo({
                    duration: 400
                }, () => {
                    this.currentIndex = index;
                })
            })
            // .animationDuration(100)
            .animationMode(AnimationMode.CONTENT_FIRST)
        }
        .height('100%')
        .width('100%')
        .backgroundColor((this.currentIndex == 0) ? $r('app.color.main_color') :
        $r('app.color.complementary_colors'))
        .padding({ bottom: 4 })
    }
}
  • 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.
已于2024-11-27 15:58:46修改
分享
微博
QQ
微信
回复
2024-11-27 15:35:12


相关问题