上一页 1 2 3 4 5 6 ··· 61 下一页
摘要: @Entry@Componentstruct GrandParent { @Provide count: number = 1; build() { Column() { Column({ space: 10 }) { //祖先组件标题 Text('祖先组件').textStyle() //祖先组件 阅读全文
posted @ 2025-03-16 13:27 13522679763-任国强 阅读(7) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct Parent { @State count: number = 1; inc = () => { this.count++ } dec = () => { this.count-- } build() { Column() { Column({ spac 阅读全文
posted @ 2025-03-16 13:23 13522679763-任国强 阅读(6) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct Parent { @State count: number = 1; build() { Column() { Column({ space: 10 }) { //父组件标题 Text('父组件').textStyle() //父组件计数器 Row({ 阅读全文
posted @ 2025-03-16 13:22 13522679763-任国强 阅读(9) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct ScrollerPage { data: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] scroller:Scroller = new Scroller() build() 阅读全文
posted @ 2025-03-16 00:10 13522679763-任国强 阅读(12) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct CalculatorPage { build() { Column() { Grid(){ GridItem(){ Text('0').screenTextStyle() }.columnStart(1).columnEnd(6) GridItem(){ 阅读全文
posted @ 2025-03-15 23:54 13522679763-任国强 阅读(23) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct StartAndEndPage { build() { Column() { Grid() { GridItem() { Text('1') .itemTextStyle() }.rowStart(0).rowEnd(1).columnStart(0). 阅读全文
posted @ 2025-03-15 23:41 13522679763-任国强 阅读(9) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct BuilderParamPage { build() { Column({ space: 50 }) { //创建卡片组件(传参) Card({ content: imageBuilder }) //创建卡片组件("子组件") Card() { Colu 阅读全文
posted @ 2025-03-15 17:15 13522679763-任国强 阅读(6) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct DifferencePage { build() { Column({ space: 10 }) { Text('待办事项') .fontSize(30) .fontWeight(FontWeight.Bold) .width('100%') TodoI 阅读全文
posted @ 2025-03-15 17:08 13522679763-任国强 阅读(6) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct BuilderPage { // 组建内的 @Builder compButtonBuilder(icon:Resource,text:string,callback:()=>void){ Button() { Row({ space: 10 }) { 阅读全文
posted @ 2025-03-15 17:02 13522679763-任国强 阅读(9) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct DatePickerDialogPage { @State date: Date = new Date("2010-1-1"); build() { Column({ space: 50 }) { Text(`${this.date.getFullYea 阅读全文
posted @ 2025-03-15 16:25 13522679763-任国强 阅读(9) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 61 下一页