中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當前位置: 首頁 > news >正文

成都網(wǎng)站開發(fā)培訓機構(gòu)搜狗收錄提交入口

成都網(wǎng)站開發(fā)培訓機構(gòu),搜狗收錄提交入口,app制作軟件教程,酒店網(wǎng)站建設流程鴻蒙(HarmonyOS)項目方舟框架(ArkUI)控件的部分公共屬性和事件 一、操作環(huán)境 操作系統(tǒng): Windows 10 專業(yè)版 IDE:DevEco Studio 3.1 SDK:HarmonyOS 3.1 二、公共屬性 常用的公共屬性有: 寬(with)、高(height)、…

鴻蒙(HarmonyOS)項目方舟框架(ArkUI)控件的部分公共屬性和事件

一、操作環(huán)境

操作系統(tǒng):? Windows 10 專業(yè)版

IDE:DevEco Studio 3.1

SDK:HarmonyOS 3.1

二、公共屬性

常用的公共屬性有:

寬(with)、高(height)、尺寸(size)、背景色(backgroudColor)、

Text().size({width: 220, height: 125}) // 設置寬高.width(120)                      // 設置寬度,覆蓋前邊的值.height(25)                      // 設置高度,覆蓋前邊的值.backgroundColor("#ccbbaa")      // 設置背景色

設置組件的寬高,缺省時使用組件自身內(nèi)容的寬高,比如充滿父布局可以使用?string?值:"100%",當組件同時設置?size?和?width?/?height?時,以最后設置的值為準。

外邊距(padding)、內(nèi)邊距(margin)、

Stack() {Text().width('100%')               // 設置寬度充滿父布局.height('100%')              // 設置高度充滿父布局.backgroundColor(Color.Pink) // 設置背景色
}
.padding(10)                     // 設置四個邊距值
.backgroundColor("#aabbcc")      // 設置背景色
.size({width: 80, height: 80})   // 設置寬高尺寸Stack() {Text().width('100%')               // 寬度充滿父布局.height('100%')              // 高度充滿父布局.backgroundColor(Color.Pink) // 設置背景色
}
.padding({left: 5, top: 20, right: 5, bottom: 20})// 設置不同的邊距值
.backgroundColor("#aabbcc")                       // 設置背景色
.size({width: 80, height: 80})                    // 設置寬高尺寸

權重(layoutWeight)、對齊方式(align)、布局方向(direction對應的枚舉
Ltr,Rtl,Auto)、相對定位(offset)、絕對定位(position)、

顯示隱藏(visibility對應的枚舉Visible,Hidden,None)

Row() {Text().height(30).width(120).backgroundColor("#aabbcc").layoutWeight(1)Text().height(30).backgroundColor("#aaccbb").visibility(Visibility.Visible) // 設置默認值Visible.layoutWeight(1)Text().height(30).backgroundColor(Color.Pink).layoutWeight(1)
}Row() {Text().height(30).width(120).backgroundColor("#aabbcc").layoutWeight(1)Text().height(30).backgroundColor("#aaccbb").visibility(Visibility.Hidden) // 設置Hidden,不在界面顯示但是還占著位置.layoutWeight(1)Text().height(30).backgroundColor(Color.Pink).layoutWeight(1)
}Row() {Text().height(30).backgroundColor("#aabbcc").layoutWeight(1)Text().height(30).visibility(Visibility.None) // 設置None,不在界面上顯示.backgroundColor("#aaccbb").layoutWeight(1)Text().height(30).backgroundColor(Color.Pink).layoutWeight(1)
}

三、公共事件

常用的公共事件:

點擊事件(onClick)

Text('Click 亞丁號').width(120).height(40).backgroundColor(Color.Pink)      // 設置背景顏色.onClick(() => {                  // 設置點擊事件回調(diào)console.log("text clicked 亞丁號") // 日志輸出})

獲得焦點事件、失去焦點事件

@Entry @Component struct ComponentTest {@State textOne: string = ''@State textTwo: string = ''@State textThree: string = ''@State oneButtonColor: string = '#FF0000'@State twoButtonColor: string = '#87CEFA'@State threeButtonColor: string = '#90EE90'build() {Column({ space: 10 }) {Button(this.textOne).backgroundColor(this.oneButtonColor).width(260).height(70).fontColor(Color.Black).focusable(true).onFocus(() => {this.textOne = 'First Button onFocus'this.oneButtonColor = '#AFEEEE'}).onBlur(() => {this.textOne = 'First Button onBlur'this.oneButtonColor = '#FFC0CB'})Button(this.textTwo).backgroundColor(this.twoButtonColor).width(260).height(70).fontColor(Color.Black).focusable(true)Button(this.textThree).backgroundColor(this.threeButtonColor).width(260).height(70).fontColor(Color.Black).focusable(true).onFocus(() => {this.textThree = 'Third Button onFocus'this.threeButtonColor = '#AFEEEE'}).onBlur(() => {this.textThree = 'Third Button onBlur'this.threeButtonColor = '#FFC0CB'})}.width('100%').height('100%').padding(10)}
}

目前支持焦點事件的組件:Button、?TextImage、?List、?Grid

好了就寫到這吧!

你有時間常去我家看看我在這里謝謝你啦...

我家地址:亞丁號

最后送大家一首詩:

山高路遠坑深,
大軍縱橫馳奔,

誰敢橫刀立馬?
惟有點贊加關注大軍。

http://m.risenshineclean.com/news/59571.html

相關文章:

  • 做文獻ppt模板下載網(wǎng)站有哪些鏈接買賣價格
  • 網(wǎng)站地圖怎么做html公司員工培訓內(nèi)容有哪些
  • 怎么免費建立一個網(wǎng)站蕁麻疹怎么治療能除根
  • 體育彩票網(wǎng)站開發(fā)方案威海seo優(yōu)化公司
  • 訪問美國網(wǎng)站 dns設置百度指數(shù)教程
  • 注冊網(wǎng)站域名多少錢一年搜索引擎優(yōu)化特點
  • 做數(shù)據(jù)同步的兩個網(wǎng)站怎么建立一個自己的網(wǎng)站
  • 聊天網(wǎng)站制作教程電腦優(yōu)化工具
  • 軟件開發(fā)者怎么賺錢優(yōu)化推廣網(wǎng)站怎么做
  • 手機app網(wǎng)站建設seo推廣價格
  • 易銷云建站公司成都網(wǎng)站seo推廣
  • 購物網(wǎng)站開發(fā)的意義和目的滄州seo包年優(yōu)化軟件排名
  • 張家界市網(wǎng)站建設設計國外網(wǎng)頁模板
  • 長沙php網(wǎng)站建設深圳網(wǎng)絡營銷推廣
  • 新鄉(xiāng)網(wǎng)站建設服務哪家好上海網(wǎng)絡推廣外包公司
  • wordpress 顯示字體大小seo排名分析
  • 自己做網(wǎng)站在線看pdf網(wǎng)站開發(fā)北京公司
  • wordpress 網(wǎng)站加密印度疫情為何突然消失
  • 中華藝術宮室內(nèi)設計百度seo最成功的優(yōu)化
  • 武漢裝修網(wǎng)站建設搜索優(yōu)化整站優(yōu)化
  • 做互聯(lián)網(wǎng)網(wǎng)站需要什么資質(zhì)嗎陜西seo排名
  • 專門做衣服的網(wǎng)站互聯(lián)網(wǎng)培訓
  • app外包網(wǎng)站seo推廣的方法
  • 網(wǎng)頁詳情頁設計百度seo推廣首選帝搜軟件
  • 網(wǎng)站編輯及seo招聘點擊器 百度網(wǎng)盤
  • 網(wǎng)站寬度多少合適天津seo優(yōu)化公司
  • 免費做產(chǎn)品宣傳的網(wǎng)站電商培訓機構(gòu)有哪些哪家比較好
  • 為什么網(wǎng)站要用外鏈seo排名賺app
  • 莆田房產(chǎn)網(wǎng)網(wǎng)站如何做關鍵詞優(yōu)化
  • 受歡迎的邢臺做網(wǎng)站sem推廣和seo的區(qū)別