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

天元建设集团坑人山西seo和网络推广

天元建设集团坑人,山西seo和网络推广,咸宁做网站的公司那家便宜,全网引擎搜索滑动条组件,通常用于快速调节设置值,如音量调节、亮度调节等应用场景。该组件从API Version 7开始支持。无子组件 一、接口 Slider(options?: {value?: number, min?: number, max?: number, step?: number, style?: SliderStyle, direction?: Ax…

滑动条组件,通常用于快速调节设置值,如音量调节、亮度调节等应用场景。该组件从API Version 7开始支持。无子组件
一、接口
Slider(options?: {value?: number, min?: number, max?: number, step?: number, style?: SliderStyle, direction?: Axis, reverse?: boolean})
从API version 9开始,该接口支持在ArkTS卡片中使用。
参数:
 

HarmonyOS/OpenHarmony原生应用-ArkTS万能卡片组件Slider-开源基础软件社区


 

HarmonyOS/OpenHarmony原生应用-ArkTS万能卡片组件Slider-开源基础软件社区


SliderStyle枚举说明
从API version 9开始,该接口支持在ArkTS卡片中使用。
 

HarmonyOS/OpenHarmony原生应用-ArkTS万能卡片组件Slider-开源基础软件社区


二、属性
支持除触摸热区以外的通用属性设置。
 

HarmonyOS/OpenHarmony原生应用-ArkTS万能卡片组件Slider-开源基础软件社区


 

HarmonyOS/OpenHarmony原生应用-ArkTS万能卡片组件Slider-开源基础软件社区


三、事件
通用事件仅支持挂载卸载事件:OnAppear,OnDisAppear。
 

HarmonyOS/OpenHarmony原生应用-ArkTS万能卡片组件Slider-开源基础软件社区


SliderChangeMode枚举说明
从API version 9开始,该接口支持在ArkTS卡片中使用。
 

HarmonyOS/OpenHarmony原生应用-ArkTS万能卡片组件Slider-开源基础软件社区


四、示例

// xxx.ets
@Entry
@Component
struct SliderExample {@State outSetValueOne: number = 40@State inSetValueOne: number = 40@State outSetValueTwo: number = 40@State inSetValueTwo: number = 40@State vOutSetValueOne: number = 40@State vInSetValueOne: number = 40@State vOutSetValueTwo: number = 40@State vInSetValueTwo: number = 40build() {Column({ space: 8 }) {Text('outset slider').fontSize(9).fontColor(0xCCCCCC).width('90%').margin(15)Row() {Slider({value: this.outSetValueOne,min: 0,max: 100,style: SliderStyle.OutSet}).showTips(true).onChange((value: number, mode: SliderChangeMode) => {this.outSetValueOne = valueconsole.info('value:' + value + 'mode:' + mode.toString())})// toFixed(0)将滑动条返回值处理为整数精度Text(this.outSetValueOne.toFixed(0)).fontSize(12)}.width('80%')Row() {Slider({value: this.outSetValueTwo,step: 10,style: SliderStyle.OutSet}).showSteps(true).onChange((value: number, mode: SliderChangeMode) => {this.outSetValueTwo = valueconsole.info('value:' + value + 'mode:' + mode.toString())})Text(this.outSetValueTwo.toFixed(0)).fontSize(12)}.width('80%')Text('inset slider').fontSize(9).fontColor(0xCCCCCC).width('90%').margin(15)Row() {Slider({value: this.inSetValueOne,min: 0,max: 100,style: SliderStyle.InSet}).blockColor('#191970').trackColor('#ADD8E6').selectedColor('#4169E1').showTips(true).onChange((value: number, mode: SliderChangeMode) => {this.inSetValueOne = valueconsole.info('value:' + value + 'mode:' + mode.toString())})Text(this.inSetValueOne.toFixed(0)).fontSize(12)}.width('80%')Row() {Slider({value: this.inSetValueTwo,step: 10,style: SliderStyle.InSet}).blockColor('#191970').trackColor('#ADD8E6').selectedColor('#4169E1').showSteps(true).onChange((value: number, mode: SliderChangeMode) => {this.inSetValueTwo = valueconsole.info('value:' + value + 'mode:' + mode.toString())})Text(this.inSetValueTwo.toFixed(0)).fontSize(12)}.width('80%')Row() {Column() {Text('vertical outset slider').fontSize(9).fontColor(0xCCCCCC).width('50%').margin(15)Row() {Slider({value: this.vOutSetValueOne,style: SliderStyle.OutSet,direction: Axis.Vertical}).blockColor('#191970').trackColor('#ADD8E6').selectedColor('#4169E1').showTips(true).onChange((value: number, mode: SliderChangeMode) => {this.vOutSetValueOne = valueconsole.info('value:' + value + 'mode:' + mode.toString())})Slider({value: this.vOutSetValueTwo,step: 10,style: SliderStyle.OutSet,direction: Axis.Vertical}).blockColor('#191970').trackColor('#ADD8E6').selectedColor('#4169E1').showSteps(true).onChange((value: number, mode: SliderChangeMode) => {this.vOutSetValueTwo = valueconsole.info('value:' + value + 'mode:' + mode.toString())})}}.width('50%').height(300)Column() {Text('vertical inset slider').fontSize(9).fontColor(0xCCCCCC).width('50%').margin(15)Row() {Slider({value: this.vInSetValueOne,style: SliderStyle.InSet,direction: Axis.Vertical,reverse: true // 竖向的Slider默认是上端是min值,下端是max值,因此想要从下往上滑动,需要设置reverse为true}).showTips(true).onChange((value: number, mode: SliderChangeMode) => {this.vInSetValueOne = valueconsole.info('value:' + value + 'mode:' + mode.toString())})Slider({value: this.vInSetValueTwo,step: 10,style: SliderStyle.InSet,direction: Axis.Vertical,reverse: true}).showSteps(true).onChange((value: number, mode: SliderChangeMode) => {this.vInSetValueTwo = valueconsole.info('value:' + value + 'mode:' + mode.toString())})}}.width('50%').height(300)}}.width('100%')}
}

五、效果样式

HarmonyOS/OpenHarmony原生应用-ArkTS万能卡片组件Slider-开源基础软件社区

六、场景
适合卡片上直接操作提示滑动条组件,通常用于快速调节设置值,如音量调节、亮度调节等应用场景提供。

本文根据HarmonyOS官方文档整理

http://www.mmbaike.com/news/97584.html

相关文章:

  • 办公空间设计装修优化设计五年级上册语文答案
  • 阿里建站官网市场推广的方法和规划
  • 做电影网站算侵权吗辽源seo
  • 设计网站中如何设置特效西安官网seo技术
  • b2b网站优化建设设计师培训班多少钱
  • java 开发手机网站市场调研报告包括哪些内容
  • 百度站长 添加网站最有效的app推广方式有哪些
  • 网站301重定向web设计一个简单网页
  • 企业做网站收费网络营销的实现方式有哪些
  • 登封市城乡建设路网站站长号
  • 南宁网站建设技术支持steam交易链接在哪看
  • 天台县建设规划局网站小学生收集的新闻10条
  • 石家庄最新疫情最新消息轨迹五行seo博客
  • 网站备案幕布尺寸响应式网站 乐云seo品牌
  • 网站建设 合优网络网站排名怎么优化
  • 上海php做网站谷歌首页
  • 广西建设网培训中心360优化大师最新版的功能
  • 西安教育平台网站建设seo怎么优化效果更好
  • 易语言用电脑做网站服务器太原关键词优化报价
  • 做期货看什么网站今日国内新闻大事件
  • 网站内容避免被采集广州网站优化方案
  • 做网站需要的注意事项关键字排名查询
  • 汉中专业网站建设开发信阳搜索引擎优化
  • 一级页面的网站怎么做大数据分析师
  • 徐州市做网站网站权重如何查询
  • 万户网站建设百度竞价点击工具
  • 中企网站建设谷歌seo外包公司哪家好
  • 怎样把网站做的漂亮百度在线人工客服
  • 如何自己制作公众号天津seo博客
  • 杭州 网站开发公司微信crm管理系统