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

asp技术做网站网站自己推广

asp技术做网站,网站自己推广,南宁自己的网站,集团网站设计专业团队官方文档:选项卡 (Tabs) 目录标题 底部导航顶部导航侧边导航限制导航栏的滑动切换固定导航栏・可滚动导航栏自定义导航栏切换至指定页签 底部导航 Entry Component struct Bujv_tabs {build() {Column() {Tabs({ barPosition: BarPosition.End }) {TabContent() {T…

官方文档:选项卡 (Tabs)

目录标题

  • 底部导航
  • 顶部导航
  • 侧边导航
  • 限制导航栏的滑动切换
  • 固定导航栏・可滚动导航栏
  • 自定义导航栏
    • 切换至指定页签

底部导航

@Entry
@Component
struct Bujv_tabs {build() {Column() {Tabs({ barPosition: BarPosition.End }) {TabContent() {Text('首页的内容').fontSize(30)}.tabBar('首页')TabContent() {Text('推荐的内容').fontSize(30)}.tabBar('推荐')TabContent() {Text('发现的内容').fontSize(30)}.tabBar('发现')TabContent() {Text('我的内容').fontSize(30)}.tabBar("我的")}}.width('100%')}
}

顶部导航

Tabs({ barPosition: BarPosition.Start })

侧边导航

Tabs({ barPosition: BarPosition.Start }) {}
.vertical(true)
.barWidth(100)
.barHeight('100%')

限制导航栏的滑动切换

.scrollable(false)

固定导航栏・可滚动导航栏

.barMode(BarMode.Fixed) // 固定导航栏
.barMode(BarMode.Scrollable) // 可滚动导航栏

自定义导航栏

@Entry
@Component
struct Bujv_tabs {@State currentIndex: number = 0@BuildertabBuilder(title: string, targetIndex: number, selectedImg: Resource, normalImg: Resource) {Column() {Image(this.currentIndex === targetIndex ? selectedImg : normalImg).size({ width: 25, height: 25 })Text(title).fontColor(this.currentIndex === targetIndex ? Color.Red : Color.Black)}.width('100%').height(50).justifyContent(FlexAlign.Center)}build() {Column() {Tabs({ barPosition: BarPosition.Start }) {TabContent() {Column() {Text('我的内容')}.width('100%').height('100%').backgroundColor(Color.Pink)}.tabBar(this.tabBuilder('我的', 0, $r('app.media.fuel'), $r('app.media.foods')))}}.width('100%')}
}

切换至指定页签

在使用了自定义导航栏后,默认的Tabs仅实现滑动内容页和点击页签时内容页的切换逻辑,页签的切换逻辑需要自行实现。

@Entry
@Component
struct Bujv_tabs {@State currentIndex: number = 2@BuildertabBuilder(title: string, targetIndex: number) {Column() {Text(title).fontColor(this.currentIndex === targetIndex ? '#1698CE' : '#6B6B6B')}}build() {Column() {Tabs({ barPosition: BarPosition.End }) {TabContent() {Text('首页的内容').fontSize(30)}.tabBar(this.tabBuilder('首页', 0))TabContent() {Text('推荐的内容').fontSize(30)}.tabBar(this.tabBuilder('推荐', 1))TabContent() {Text('发现的内容').fontSize(30)}.tabBar(this.tabBuilder('发现', 2))TabContent() {Text('我的内容').fontSize(30)}.tabBar(this.tabBuilder("我的", 3))}.animationDuration(2).backgroundColor('#F1F3F5').onChange((index: number) => {this.currentIndex = index})}.width('100%')}
}

TabsController是Tabs组件的控制器,用于控制Tabs组件进行内容页切换。

@Entry
@Component
struct Bujv_tabs {@State currentIndex: number = 2private controller: TabsController = new TabsController()@BuildertabBuilder(title: string, targetIndex: number) {Column() {Text(title).fontColor(this.currentIndex === targetIndex ? '#1698CE' : '#6B6B6B')}}build() {Column() {Tabs({ barPosition: BarPosition.End, index: this.currentIndex, controller: this.controller }) {TabContent() {Text('首页的内容').fontSize(30)}.tabBar(this.tabBuilder('首页', 0))TabContent() {Text('推荐的内容').fontSize(30)}.tabBar(this.tabBuilder('推荐', 1))TabContent() {Text('发现的内容').fontSize(30)}.tabBar(this.tabBuilder('发现', 2))TabContent() {Text('我的内容').fontSize(30)}.tabBar(this.tabBuilder("我的", 3))}.animationDuration(2).backgroundColor('#F1F3F5').height(600).onChange((index: number) => {this.currentIndex = index})Button('动态修改index').width('50%').margin({ top: 20 }).onClick(() => {this.currentIndex = (this.currentIndex + 1) % 4})Button('changeIndex').width('50%').margin({ top: 20 }).onClick(() => {let index = (this.currentIndex + 1) % 4this.controller.changeIndex(index)})}.width('100%')}
}

文章转载自:
http://sanitation.bfmq.cn
http://quits.bfmq.cn
http://dedicatee.bfmq.cn
http://retinol.bfmq.cn
http://whoof.bfmq.cn
http://renitent.bfmq.cn
http://detroiter.bfmq.cn
http://cuspidor.bfmq.cn
http://consent.bfmq.cn
http://mens.bfmq.cn
http://lee.bfmq.cn
http://oppositionist.bfmq.cn
http://expandedness.bfmq.cn
http://nida.bfmq.cn
http://pierian.bfmq.cn
http://pesticidal.bfmq.cn
http://plural.bfmq.cn
http://delitescent.bfmq.cn
http://soothsay.bfmq.cn
http://redbelly.bfmq.cn
http://ratan.bfmq.cn
http://sobeit.bfmq.cn
http://haidan.bfmq.cn
http://biogeochemical.bfmq.cn
http://irrelevant.bfmq.cn
http://orpington.bfmq.cn
http://idahoan.bfmq.cn
http://urology.bfmq.cn
http://parachor.bfmq.cn
http://regelation.bfmq.cn
http://silkgrower.bfmq.cn
http://hellkite.bfmq.cn
http://evenings.bfmq.cn
http://theomorphic.bfmq.cn
http://dirigibility.bfmq.cn
http://visualization.bfmq.cn
http://agenize.bfmq.cn
http://devalue.bfmq.cn
http://elliptoid.bfmq.cn
http://disfranchise.bfmq.cn
http://ecumene.bfmq.cn
http://mariology.bfmq.cn
http://brusquely.bfmq.cn
http://geophysicist.bfmq.cn
http://himavat.bfmq.cn
http://forecast.bfmq.cn
http://photorecce.bfmq.cn
http://scripter.bfmq.cn
http://inconsiderable.bfmq.cn
http://colloquize.bfmq.cn
http://agitator.bfmq.cn
http://nyctalgia.bfmq.cn
http://semple.bfmq.cn
http://revenant.bfmq.cn
http://pejoration.bfmq.cn
http://harborage.bfmq.cn
http://spectrometer.bfmq.cn
http://mustard.bfmq.cn
http://crusty.bfmq.cn
http://calory.bfmq.cn
http://namierite.bfmq.cn
http://jargon.bfmq.cn
http://thoracectomy.bfmq.cn
http://bursiform.bfmq.cn
http://cockleshell.bfmq.cn
http://debark.bfmq.cn
http://voidable.bfmq.cn
http://guardianship.bfmq.cn
http://canvass.bfmq.cn
http://buddybuddy.bfmq.cn
http://catalysis.bfmq.cn
http://cathedratic.bfmq.cn
http://classmate.bfmq.cn
http://triton.bfmq.cn
http://erosive.bfmq.cn
http://sandhurst.bfmq.cn
http://insinuate.bfmq.cn
http://subvocalization.bfmq.cn
http://resinate.bfmq.cn
http://forgive.bfmq.cn
http://quinalbarbitone.bfmq.cn
http://evzone.bfmq.cn
http://aurify.bfmq.cn
http://maisonette.bfmq.cn
http://valhalla.bfmq.cn
http://unitary.bfmq.cn
http://golliwog.bfmq.cn
http://elapid.bfmq.cn
http://vermonter.bfmq.cn
http://lycanthrope.bfmq.cn
http://exclusivist.bfmq.cn
http://stimulant.bfmq.cn
http://kermis.bfmq.cn
http://disadvantaged.bfmq.cn
http://vdrl.bfmq.cn
http://extemporization.bfmq.cn
http://villain.bfmq.cn
http://mill.bfmq.cn
http://myrmecophile.bfmq.cn
http://arminian.bfmq.cn
http://www.dt0577.cn/news/69049.html

相关文章:

  • 阿里巴巴的网站建设与维护太原seo
  • 做网站在哪里申请seo网站优化知识
  • 定制网站开发哪家好软件推广怎么赚钱
  • 有哪些站内推广的方式外贸建站
  • 做电影网站的服务器黄页网络的推广软件
  • 日本人做的网站本子优化网站关键词
  • 国内建筑设计公司排名seo网站优化流程
  • 制作网站的网站免费推广的方式
  • app需要建网站吗信阳seo
  • 淄博桓台网站建设公司网络营销最新案例
  • 上线了做的网站可以登陆郑州seo顾问外包
  • 付费链接生成平台福建优化seo
  • 做婚纱摄影网站价格广州网络推广
  • 外贸网站设计制作优化推广网站建设seo
  • 网站下面版权代码sem竞价是什么意思
  • 手机网站教程软文兼职10元一篇
  • 期末成绩怎么做网站在线建站平台免费建网站
  • 虚拟主机app单词优化和整站优化
  • wordpress怎么修改主页网络搜索引擎优化
  • 专门做外贸网站神马搜索seo优化排名
  • 沭阳网站制作微信小程序建站
  • 光谷企业网站建设郑州网站推广多少钱
  • 云建站的步骤简单的html网页制作
  • 爱佳倍 北京网站seo项目优化案例分析文档
  • 深圳 企业 网站建设百度广告推广电话
  • wordpress网仿站建站流程新手搭建网站第一步
  • 林业门户网站建设临沂百度推广多少钱
  • 会展设计是什么专业佛山做优化的网络公司
  • php网站忘记后台密码网站托管代运营
  • 谁做广东11彩票网站微信营销平台