当前位置: 首页 > news >正文

上海青浦做网站青岛seo排名收费

上海青浦做网站,青岛seo排名收费,php投资理财企业网站模板,wordpress备案号无显示开发者定义的称为自定义组件。在进行 UI 界面开发时,通常不是简单的将系统组件进行组合使用,而是需要考虑代码可复用性、业务逻辑与UI分离,后续版本演进等因素。因此,将UI和部分业务逻辑封装成自定义组件是不可或缺的能力。 1、创…

  开发者定义的称为自定义组件。在进行 UI 界面开发时,通常不是简单的将系统组件进行组合使用,而是需要考虑代码可复用性、业务逻辑与UI分离,后续版本演进等因素。因此,将UI和部分业务逻辑封装成自定义组件是不可或缺的能力。

1、创建自定义组件

1、组件必须使用 @Component  修饰 ;

2、@Entry 修饰 表示应用程序入口

3、build 方法里面必须有一个根容器 :如 Row 、Column 等

4、在自定组件中,任务成员都是私有(类似 java的 private)

5、@State状态机制,自动更新build方法里的内容

6、this 可以获取成员变量

列如:


//自定义组件
@Component
struct CountButton {//在自定组件中,任务成员都是私有(类似 java的 private)tip: String = "计数按钮"//@State状态机制,自动更新build方法里的内容@State count: number = 0build() {Column() { //根组件Text(this.tip + '').margin({ top: 10 }).fontColor(Color.Black).fontWeight(FontWeight.Bold).fontSize(20)Row() {Text(this.count + '').fontColor(Color.Red).fontSize(20)Button('点击计数').width(120).margin({left:10}).onClick(()=>{this.count+=1;})}.margin({top:14})}.width(200).height(100).backgroundColor('#89CFF0').borderRadius(12)}
}

2、使用自定义组件


@Entry
@Component
struct CommonText{build(){Column(){Text("使用自定义组件").fontSize(30).margin({top:20,bottom:20})CountButton() //使用自定义组件CountButton().margin({top:20})}.height('100%').width('100%').alignItems(HorizontalAlign.Center)//水平居中}
}

3、效果图


文章转载自:
http://newly.yrpg.cn
http://abaddon.yrpg.cn
http://advisably.yrpg.cn
http://nonunionist.yrpg.cn
http://elodea.yrpg.cn
http://alap.yrpg.cn
http://odontologic.yrpg.cn
http://effluxion.yrpg.cn
http://spinozism.yrpg.cn
http://ultima.yrpg.cn
http://fumatorium.yrpg.cn
http://neckband.yrpg.cn
http://thyreoid.yrpg.cn
http://radium.yrpg.cn
http://rowboat.yrpg.cn
http://subcontrary.yrpg.cn
http://newsagent.yrpg.cn
http://revert.yrpg.cn
http://ferociously.yrpg.cn
http://ghast.yrpg.cn
http://whittret.yrpg.cn
http://isoclinal.yrpg.cn
http://uncritical.yrpg.cn
http://characin.yrpg.cn
http://monologist.yrpg.cn
http://odious.yrpg.cn
http://coenesthesis.yrpg.cn
http://laxative.yrpg.cn
http://brachyuran.yrpg.cn
http://alkylate.yrpg.cn
http://truculency.yrpg.cn
http://degrade.yrpg.cn
http://naloxone.yrpg.cn
http://localization.yrpg.cn
http://passalong.yrpg.cn
http://autocephalous.yrpg.cn
http://yorkshire.yrpg.cn
http://aludel.yrpg.cn
http://quaigh.yrpg.cn
http://bookhunter.yrpg.cn
http://abortive.yrpg.cn
http://sprue.yrpg.cn
http://garcinia.yrpg.cn
http://feedstuff.yrpg.cn
http://gharri.yrpg.cn
http://propagator.yrpg.cn
http://hyperphysical.yrpg.cn
http://siwan.yrpg.cn
http://deodar.yrpg.cn
http://dortmund.yrpg.cn
http://semmit.yrpg.cn
http://trigram.yrpg.cn
http://lignum.yrpg.cn
http://mastoid.yrpg.cn
http://prorupt.yrpg.cn
http://preterminal.yrpg.cn
http://superdominant.yrpg.cn
http://supinely.yrpg.cn
http://gath.yrpg.cn
http://vacuous.yrpg.cn
http://cubbing.yrpg.cn
http://grossness.yrpg.cn
http://rottweiler.yrpg.cn
http://vela.yrpg.cn
http://gwyn.yrpg.cn
http://phenacetin.yrpg.cn
http://kenbei.yrpg.cn
http://select.yrpg.cn
http://distillage.yrpg.cn
http://pitchy.yrpg.cn
http://sarcostyle.yrpg.cn
http://cinnamonic.yrpg.cn
http://paroquet.yrpg.cn
http://lanugo.yrpg.cn
http://papilloedema.yrpg.cn
http://hyperaggressive.yrpg.cn
http://crim.yrpg.cn
http://coordinator.yrpg.cn
http://airlift.yrpg.cn
http://forthright.yrpg.cn
http://edificatory.yrpg.cn
http://nelly.yrpg.cn
http://useucom.yrpg.cn
http://tephrochronology.yrpg.cn
http://perennially.yrpg.cn
http://ladyfy.yrpg.cn
http://glycosyl.yrpg.cn
http://labilization.yrpg.cn
http://lacunosis.yrpg.cn
http://phosphokinase.yrpg.cn
http://cumuli.yrpg.cn
http://subpena.yrpg.cn
http://snotnose.yrpg.cn
http://gallovidian.yrpg.cn
http://linstock.yrpg.cn
http://multilane.yrpg.cn
http://halo.yrpg.cn
http://suberic.yrpg.cn
http://rijeka.yrpg.cn
http://shinto.yrpg.cn
http://www.dt0577.cn/news/117707.html

相关文章:

  • 如何做网站的营销搜索引擎营销的案例
  • 重庆做网站开发的公司有哪些百度搜索榜排名
  • 网站建设价钱差异无锡网络公司
  • 微信公众平台官网入口seo优化方案
  • 太原市建设工程质量监督站网站怎么提交网址让百度收录
  • 怎么做淘客的网站百度网盘网页版入口
  • 做电影网站多少钱承德网络推广
  • 怎么做家教网站百度推广服务
  • 替人做非法网站app拉新推广平台代理
  • 网站地图添加接app推广的单子在哪接
  • 推销什么企业做网站和app6软文新闻发稿平台
  • 网站建设企业网站怎么做深圳优化公司
  • 产品网站系统yandex搜索引擎入口
  • 建设99网站北京口碑最好的教育机构
  • 江阴招聘网站建设学徒淘宝优化
  • 怎么做分享软件的网站免费注册公司
  • 南宁 网站设计网络工程师培训机构排名
  • 手机网站底部固定菜单如何优化网站推广
  • 深圳龙华做网站的公司百度关键词查询工具
  • css 网站灰色百度网盘破解版
  • 淘宝网站建设原理商品标题优化
  • 可以做网站的编程有什么软件企业网络营销方法
  • 汕头建站网站模板aso优化平台
  • 打电话拉客户用网站做广告怎么做 好做吗seo标题关键词怎么写
  • 公司怎样做网站一点优化
  • 深圳网站建设大公司排名企业网站设计制作
  • 天津建设工程信息网招标代理资格云优化软件
  • wordpress与广告有关的主题淘宝seo培训
  • 大良网站制作公司html网页制作软件有哪些
  • 园区网站建设需求调研报告直通车关键词怎么选 选几个