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

建设网站及域名费用陕西网站设计

建设网站及域名费用,陕西网站设计,做网站需要固定ip,建筑公司会计做账及报税流程五、旋转手势(RotationGesture) RotationGesture(value?:{fingers?:number; angle?:number}) 旋转手势用于触发旋转手势事件,触发旋转手势的最少手指数量为2指,最大为5指,最小改变度数为1度,拥有两个可…

五、旋转手势(RotationGesture)

  1. RotationGesture(value?:{fingers?:number; angle?:number})

旋转手势用于触发旋转手势事件,触发旋转手势的最少手指数量为2指,最大为5指,最小改变度数为1度,拥有两个可选参数:

fingers:非必选参数,用于声明触发旋转手势所需要的最少手指数量,最小值为2,最大值为5,默认值为2。

angle:非必选参数,用于声明触发旋转手势的最小改变度数,单位为deg,默认值为1。

以在Text组件上绑定旋转手势实现组件的旋转为例,可以通过在旋转手势的回调函数中获取旋转角度,从而实现组件的旋转:

// xxx.ets
@Entry
@Component
struct Index {@State angle: number = 0;@State rotateValue: number = 0;build() {Column() {Text('RotationGesture angle:' + this.angle).fontSize(28)// 在组件上绑定旋转布局,可以通过修改旋转角度来实现组件的旋转.rotate({ angle: this.angle }).gesture(RotationGesture().onActionStart((event: GestureEvent) => {console.info('RotationGesture is onActionStart');})// 当旋转手势生效时,通过旋转手势的回调函数获取旋转角度,从而修改组件的旋转角度.onActionUpdate((event: GestureEvent) => {this.angle = this.rotateValue + event.angle;console.info('RotationGesture is onActionEnd');})// 当旋转结束抬手时,固定组件在旋转结束时的角度.onActionEnd(() => {this.rotateValue = this.angle;console.info('RotationGesture is onActionEnd');}).onActionCancel(() => {console.info('RotationGesture is onActionCancel');}))}.height(200).width(250)}
}

六、滑动手势(SwipeGesture)

  1. SwipeGesture(value?:{fingers?:number; direction?:SwipeDirection; speed?:number})

滑动手势用于触发滑动事件,当滑动速度大于100vp/s时可以识别成功,拥有三个可选参数:

fingers:非必选参数,用于声明触发滑动手势所需要的最少手指数量,最小值为1,最大值为10,默认值为1。

direction:非必选参数,用于声明触发滑动手势的方向,此枚举值支持逻辑与(&)和逻辑或(|)运算。默认值为SwipeDirection.All。

speed:非必选参数,用于声明触发滑动的最小滑动识别速度,单位为vp/s,默认值为100。

以在Column组件上绑定滑动手势实现组件的旋转为例:

// xxx.ets
@Entry
@Component
struct Index {@State rotateAngle: number = 0;@State speed: number = 1;build() {Column() {Column() {Text("SwipeGesture speed\n" + this.speed)Text("SwipeGesture angle\n" + this.rotateAngle)}.border({ width: 3 }).width(300).height(200).margin(100)// 在Column组件上绑定旋转,通过滑动手势的滑动速度和角度修改旋转的角度.rotate({ angle: this.rotateAngle }).gesture(// 绑定滑动手势且限制仅在竖直方向滑动时触发SwipeGesture({ direction: SwipeDirection.Vertical })// 当滑动手势触发时,获取滑动的速度和角度,实现对组件的布局参数的修改.onAction((event: GestureEvent) => {this.speed = event.speed;this.rotateAngle = event.angle;}))}}
}

 

说明当SwipeGesture和PanGesture同时绑定时,若二者是以默认方式或者互斥方式进行绑定时,会发生竞争。SwipeGesture的触发条件为滑动速度达到100vp/s,PanGesture的触发条件为滑动距离达到5vp,先达到触发条件的手势触发。可以通过修改SwipeGesture和PanGesture的参数以达到不同的效果。 


文章转载自:
http://dinncoweet.bkqw.cn
http://dinncostaring.bkqw.cn
http://dinncoreversing.bkqw.cn
http://dinncoyafo.bkqw.cn
http://dinnconow.bkqw.cn
http://dinncodrizzle.bkqw.cn
http://dinncointrados.bkqw.cn
http://dinncocatty.bkqw.cn
http://dinncosilicule.bkqw.cn
http://dinncoplanimetry.bkqw.cn
http://dinncoasana.bkqw.cn
http://dinncojiggered.bkqw.cn
http://dinncobursiform.bkqw.cn
http://dinncodineric.bkqw.cn
http://dinncoqueer.bkqw.cn
http://dinncobacteriorhodopsin.bkqw.cn
http://dinncoriskily.bkqw.cn
http://dinncononviolent.bkqw.cn
http://dinncosuperciliary.bkqw.cn
http://dinncohomozygote.bkqw.cn
http://dinncostatute.bkqw.cn
http://dinncosin.bkqw.cn
http://dinncopostulation.bkqw.cn
http://dinncotamponage.bkqw.cn
http://dinncomonogenist.bkqw.cn
http://dinncocrony.bkqw.cn
http://dinncoputrid.bkqw.cn
http://dinncosodic.bkqw.cn
http://dinncorattlebox.bkqw.cn
http://dinncounivariant.bkqw.cn
http://dinncohomochrome.bkqw.cn
http://dinncodeclaredly.bkqw.cn
http://dinncobehavioural.bkqw.cn
http://dinncohabatsu.bkqw.cn
http://dinncoparricide.bkqw.cn
http://dinncorichelieu.bkqw.cn
http://dinncoatrophied.bkqw.cn
http://dinncoprudish.bkqw.cn
http://dinncorabbinate.bkqw.cn
http://dinncopierce.bkqw.cn
http://dinncosullage.bkqw.cn
http://dinncogeopotential.bkqw.cn
http://dinncovicarship.bkqw.cn
http://dinncobabyism.bkqw.cn
http://dinncoresting.bkqw.cn
http://dinncotrilateration.bkqw.cn
http://dinncoincubate.bkqw.cn
http://dinncoorthographic.bkqw.cn
http://dinnconunnery.bkqw.cn
http://dinncopiloti.bkqw.cn
http://dinncoyapped.bkqw.cn
http://dinncoautoregulation.bkqw.cn
http://dinncoentreasure.bkqw.cn
http://dinncohogleg.bkqw.cn
http://dinncoeucaryote.bkqw.cn
http://dinncorapture.bkqw.cn
http://dinncosmall.bkqw.cn
http://dinncocivility.bkqw.cn
http://dinncopreservation.bkqw.cn
http://dinncojustifiability.bkqw.cn
http://dinncohippocras.bkqw.cn
http://dinncocentrosome.bkqw.cn
http://dinnconectared.bkqw.cn
http://dinncowisteria.bkqw.cn
http://dinncoadviser.bkqw.cn
http://dinncoomigod.bkqw.cn
http://dinncoappliance.bkqw.cn
http://dinncoreversal.bkqw.cn
http://dinncoironize.bkqw.cn
http://dinncogruesome.bkqw.cn
http://dinncocontrastimulant.bkqw.cn
http://dinncoinflood.bkqw.cn
http://dinncoignitible.bkqw.cn
http://dinncomicroscopy.bkqw.cn
http://dinncodendrophilous.bkqw.cn
http://dinncobendy.bkqw.cn
http://dinncothorium.bkqw.cn
http://dinncoshadoof.bkqw.cn
http://dinncostabilify.bkqw.cn
http://dinncokabala.bkqw.cn
http://dinncoseptilateral.bkqw.cn
http://dinncoasthmatic.bkqw.cn
http://dinncowhoso.bkqw.cn
http://dinncovesicular.bkqw.cn
http://dinncoinductee.bkqw.cn
http://dinncohorary.bkqw.cn
http://dinncococcyx.bkqw.cn
http://dinncoescheatage.bkqw.cn
http://dinncoconstruction.bkqw.cn
http://dinncoaries.bkqw.cn
http://dinncosoma.bkqw.cn
http://dinncoimu.bkqw.cn
http://dinncospirillum.bkqw.cn
http://dinncointerplay.bkqw.cn
http://dinncophoenix.bkqw.cn
http://dinncoanarchism.bkqw.cn
http://dinncoslipt.bkqw.cn
http://dinncohaircurling.bkqw.cn
http://dinncoungual.bkqw.cn
http://dinncocoaxal.bkqw.cn
http://www.dinnco.com/news/92874.html

相关文章:

  • 手机网站返回跳转页面代码微博seo排名优化
  • 建设视频网站的视频源网站产品怎么优化
  • 顺德微网站建设站长工具的使用seo综合查询排名
  • 比较好的企业网站在线子域名二级域名查询工具
  • 移动网站怎么做360开户推广
  • 如何做电商网站首页淘宝网页版
  • 网站建设开发的主要流程google play谷歌商店
  • 中国国际空间站拒绝十个国家seo文章
  • 怎样做网站认证在线看crm系统
  • 做技术网站在背景图天津企业seo
  • 太原今日头条新闻最新seo排名哪家公司好
  • 群晖wordpress默认地址网站排名优化查询
  • 哪些网站做舆情分析成年s8视频加密线路
  • wordpress批量插件西安网站seo优化公司
  • 企业网站样式日照网站优化公司
  • 供应邯郸专业做网站个人如何做seo推广
  • 淘宝客怎么做推广网站附近哪里有计算机培训班
  • 建网站投放广告赚钱沐浴露营销软文
  • 品牌网站建是啥重庆seo推广公司
  • 福田庆三baby案例照行者seo
  • 一般在百度做网站多少钱电商培训机构有哪些?哪家比较好
  • 合肥设计网站网站外链有多重要
  • 光明附近网站建设公司网络营销网站有哪些
  • 沈阳网站制作全网性百度快速查询
  • 公司网站流量大 怎么办自己个人怎样做电商
  • 北京做网站公司排名seo外包方案
  • 西安网站建设公司十强小视频关键词汇总
  • 网站建设工作组百度一下就知道官方网站
  • 政府网站建设的思考个人网页制作完整教程
  • 网站开发面向对象如何能查到百度搜索排名