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

网站建设维护一年费用无锡市网站建设

网站建设维护一年费用,无锡市网站建设,安徽两学一做专题网站,绍兴做网站服务鸿蒙(HarmonyOS)项目方舟框架(ArkUI)之AlphabetIndexer组件 一、操作环境 操作系统: Windows 10 专业版、IDE:DevEco Studio 3.1、SDK:HarmonyOS 3.1 二、AlphabetIndexer组件 可以与容器组件联动用于按逻辑结构快速定位容器显…

鸿蒙(HarmonyOS)项目方舟框架(ArkUI)之AlphabetIndexer组件

一、操作环境

操作系统:  Windows 10 专业版、IDE:DevEco Studio 3.1、SDK:HarmonyOS 3.1+

二、AlphabetIndexer组件

可以与容器组件联动用于按逻辑结构快速定位容器显示区域的组件。

子组件

接口

AlphabetIndexer(value: {arrayValue: Array<string>, selected: number})

参数

参数名

参数类型

必填

参数描述

arrayValue

Array<string>

字母索引字符串数组,不可设置为空。

selected

number

初始选中项索引值,若超出索引值范围,则取默认值0。

属性

除支持通用属性外,还支持以下属性:

名称

参数类型

描述

color

ResourceColor

设置文字颜色。

默认值:0x99000000。

selectedColor

ResourceColor

设置选中项文字颜色。

默认值:0xFF254FF7。

popupColor

ResourceColor

设置提示弹窗文字颜色。

默认值:0xFF254FF7。

selectedBackgroundColor

ResourceColor

设置选中项背景颜色。

默认值:0x1F0A59F7。

popupBackground

ResourceColor

设置提示弹窗背景色。

默认值:0xFFFFFFFF。

usingPopup

boolean

设置是否使用提示弹窗。

默认值:false。

selectedFont

Font

设置选中项文字样式。

默认值:

{

size:'12.0fp',

style:FontStyle.Normal,

weight:FontWeight.Normal,

family:'HarmonyOS Sans'

}

popupFont

Font

设置提示弹窗字体样式。

默认值:

{

size:'24.0vp',

style:FontStyle.Normal,

weight:FontWeight.Normal,

family:'HarmonyOS Sans'

}

font

Font

设置字母索引条默认字体样式。

默认值:

{

size:'12.0fp',

style:FontStyle.Normal,

weight:FontWeight.Normal,

family:'HarmonyOS Sans'

}

itemSize

string | number

设置字母索引条字母区域大小,字母区域为正方形,即正方形边长。不支持设置为百分比。

默认值:24.0

单位:vp

alignStyle

IndexerAlign

设置字母索引条弹框的对齐样式,支持弹窗显示在索引条右侧和左侧。

默认值:IndexerAlign.Right。

selected

number

设置选中项索引值。

默认值:0。

popupPosition

Position

设置弹出窗口相对于索引器条上边框中点的位置。

默认值:{x:60.0, y:48.0}。

IndexerAlign枚举说明

名称

描述

Left

弹框显示在索引条右侧。

Right

弹框显示在索引条左侧。

事件

支持通用事件外,还支持以下事件:

名称

功能描述

onSelected(callback: (index: number) => void)(deprecated)

索引条选中回调,返回值为当前选中索引。 从API Version 8开始废弃,建议使用onSelect代替。

onSelect(callback: (index: number) => void)8+

索引条选中回调,返回值为当前选中索引。

onRequestPopupData(callback: (index: number) => Array<string>)8+

选中字母索引后,请求索引提示弹窗显示内容回调。

返回值:索引对应的字符串数组,此字符串数组在弹窗中竖排显示,字符串列表最多显示5个,超出部分可以滑动显示。

onPopupSelect(callback: (index: number) => void)8+

字母索引提示弹窗字符串列表选中回调。

示例

代码
// xxx.ets
@Entry
@Component
struct AlphabetIndexerSample {private arrayA: string[] = ['安']private arrayB: string[] = ['卜', '白', '包', '毕', '丙']private arrayC: string[] = ['曹', '成', '陈', '催']private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']private value: string[] = ['#', 'A', 'B', 'C', 'D', 'E', 'F', 'G','H', 'I', 'J', 'K', 'L', 'M', 'N','O', 'P', 'Q', 'R', 'S', 'T', 'U','V', 'W', 'X', 'Y', 'Z']build() {Stack({ alignContent: Alignment.Start }) {Row() {List({ space: 20, initialIndex: 0 }) {ForEach(this.arrayA, (item) => {ListItem() {Text(item).width('80%').height('5%').fontSize(30).textAlign(TextAlign.Center)}.editable(true)}, item => item)ForEach(this.arrayB, (item) => {ListItem() {Text(item).width('80%').height('5%').fontSize(30).textAlign(TextAlign.Center)}.editable(true)}, item => item)ForEach(this.arrayC, (item) => {ListItem() {Text(item).width('80%').height('5%').fontSize(30).textAlign(TextAlign.Center)}.editable(true)}, item => item)ForEach(this.arrayL, (item) => {ListItem() {Text(item).width('80%').height('5%').fontSize(30).textAlign(TextAlign.Center)}.editable(true)}, item => item)}.width('50%').height('100%')AlphabetIndexer({ arrayValue: this.value, selected: 0 }).selectedColor(0xFFFFFF) // 选中项文本颜色.popupColor(0xFFFAF0) // 弹出框文本颜色.selectedBackgroundColor(0xCCCCCC) // 选中项背景颜色.popupBackground(0xD2B48C) // 弹出框背景颜色.usingPopup(true) // 是否显示弹出框.selectedFont({ size: 16, weight: FontWeight.Bolder }) // 选中项字体样式.popupFont({ size: 30, weight: FontWeight.Bolder }) // 弹出框内容的字体样式.itemSize(28) // 每一项的尺寸大小.alignStyle(IndexerAlign.Left) // 弹出框在索引条右侧弹出.onSelect((index: number) => {console.info(this.value[index] + ' Selected!')}).onRequestPopupData((index: number) => {if (this.value[index] == 'A') {return this.arrayA // 当选中A时,弹出框里面的提示文本列表显示A对应的列表arrayA,选中B、C、L时也同样} else if (this.value[index] == 'B') {return this.arrayB} else if (this.value[index] == 'C') {return this.arrayC} else if (this.value[index] == 'L') {return this.arrayL} else {return [] // 选中其余子母项时,提示文本列表为空}}).onPopupSelect((index: number) => {console.info('onPopupSelected:' + index)})}.width('100%').height('100%')}}
}

你有时间常去我家看看我在这里谢谢你啦...

我家地址:亚丁号

最后送大家一首诗:

山高路远坑深,
大军纵横驰奔,

谁敢横刀立马?
惟有点赞加关注大军。


文章转载自:

http://Sz86Yeg9.tmpLs.cn
http://KALv7qCQ.tmpLs.cn
http://bVoOh4Ek.tmpLs.cn
http://wEvUHRDl.tmpLs.cn
http://f1CDEveP.tmpLs.cn
http://VpXHgiYJ.tmpLs.cn
http://U6Pyo6LB.tmpLs.cn
http://I6r38pD7.tmpLs.cn
http://jzfOCvAY.tmpLs.cn
http://l6rWTIyp.tmpLs.cn
http://kd7zrNcW.tmpLs.cn
http://XoZW8ika.tmpLs.cn
http://pmZq4pXY.tmpLs.cn
http://euYhtU7B.tmpLs.cn
http://HE6fnHqs.tmpLs.cn
http://SdPp0olU.tmpLs.cn
http://Xt2oQCNX.tmpLs.cn
http://yBjYbR1d.tmpLs.cn
http://fFQYrDgP.tmpLs.cn
http://fejz5HVF.tmpLs.cn
http://yeNWCfkv.tmpLs.cn
http://tetzsCzX.tmpLs.cn
http://yzV3ofS9.tmpLs.cn
http://Uk5sONCw.tmpLs.cn
http://Qzu0WL6N.tmpLs.cn
http://wU7R6UDk.tmpLs.cn
http://5rVKAhzI.tmpLs.cn
http://boEpVlq5.tmpLs.cn
http://tV8A2O8O.tmpLs.cn
http://ewXOWUPU.tmpLs.cn
http://www.dtcms.com/wzjs/715940.html

相关文章:

  • 网站帮助中心设计建设机械网站平台
  • 为什么上不了建设银行个人网站商丘网站推广的方法
  • 上海网站建设公司推荐排名网站制作报价明细
  • 如何做网站定位成都市微信网站建设
  • 如何做deal网站推广外贸机械加工网
  • 网站建设合同怎么交印花税给别人做网站收钱违法吗
  • 贵阳官方网站京网站建设
  • 免费的英文电子外贸网站建设军事网址大全 网站
  • 外贸网站建设内容包括公司网站程序
  • 网站制作流程白云商城网站建设
  • 金融投资公司网站模板彩票网站开发需求文档
  • 定制企业网站开发公司crm系统公司有哪些
  • 书城网站建设项目定义网站建设服务器什么意思
  • 广州外贸建站网站建设思维导图
  • wordpress 公司建站西安网站制作排名
  • 怎么建设影视网站2023新闻头条最新消息今天
  • 阳江做网站的公司南通技嘉做网站
  • 受欢迎的丹阳网站建设dw制作网页版面教程视频
  • 东圃手机网站建设网站做的一样算侵权吗
  • 中英文网站案例公司装修属于什么费用
  • 网页设计与网站开发的区别百度指数做网站
  • 网站建设价位高有低wordpress 分类文章插件
  • 网站设计站制作图片软件下载
  • 婚纱设计网站模板商城wordpress文章加音频
  • 建网站需要买服务器吗网站建设与电子商务的教案
  • 海南企业建站网络维护技术
  • 购物网站有哪些功能公司网站怎么写
  • 微信表情包制作网站响应式网页设计原理
  • 熟人做网站怎么收钱网站建立的步骤是( )。
  • 贵阳建网站WordPress输出当前网址