摘要: @Entry@Componentstruct CalculatorPage { build() { Column() { Grid(){ GridItem(){ Text('0').screenTextStyle() }.columnStart(1).columnEnd(6) GridItem(){ 阅读全文
posted @ 2025-03-15 23:54 13522679763-任国强 阅读(11) 评论(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-任国强 阅读(4) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct BuilderParamPage { build() { Column({ space: 50 }) { //创建卡片组件(传参) Card({ content: imageBuilder }) //创建卡片组件("子组件") Card() { Colu 阅读全文
posted @ 2025-03-15 17:15 13522679763-任国强 阅读(3) 评论(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-任国强 阅读(3) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct BuilderPage { // 组建内的 @Builder compButtonBuilder(icon:Resource,text:string,callback:()=>void){ Button() { Row({ space: 10 }) { 阅读全文
posted @ 2025-03-15 17:02 13522679763-任国强 阅读(5) 评论(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-任国强 阅读(6) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct TextPickerDialogPage { fruits: string[] = ['苹果', '橘子', '香蕉', '鸭梨', '西瓜'] @State selectedIndex: number = 0 build() { Column({ sp 阅读全文
posted @ 2025-03-15 16:24 13522679763-任国强 阅读(3) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct TimePickerDialogPage { @State time: Date = new Date('2020-01-01T00:00:00') build() { Column({ space: 50 }) { Text(`${this.time. 阅读全文
posted @ 2025-03-15 16:22 13522679763-任国强 阅读(5) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct AlertDialogPage { build() { Column() { Button('删除') .backgroundColor(Color.Red) .onClick(() => { AlertDialog.show( { title: '删除 阅读全文
posted @ 2025-03-15 16:19 13522679763-任国强 阅读(13) 评论(0) 推荐(0)
摘要: @Entry@Componentstruct CustomDialogPage { @State answer: string = '?' // controller: CustomDialogController = new CustomDialogController({ // builder: 阅读全文
posted @ 2025-03-15 13:24 13522679763-任国强 阅读(4) 评论(0) 推荐(0)