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

怎么在自己做的网站上发视频教程seo优化网站优化排名

怎么在自己做的网站上发视频教程,seo优化网站优化排名,厦门市建设局网站规划标准,横沥镇仿做网站上篇回顾:ArkTS开发系列之事件(2.8.1触屏、键鼠、焦点事件) 本篇内容:ArkTS开发系列之事件(2.8.2手势事件) 一、绑定手势方法 1. 常规手势绑定方法 Text(手势).fontSize(44).gesture(TapGesture().onAct…

上篇回顾:ArkTS开发系列之事件(2.8.1触屏、键鼠、焦点事件)

本篇内容:ArkTS开发系列之事件(2.8.2手势事件)

一、绑定手势方法

1. 常规手势绑定方法

 Text('手势').fontSize(44).gesture(TapGesture().onAction((event) => {console.error('event: ' + JSON.stringify(event))}))

2. 带优先级的手势绑定方法

  • 需要注意,子父组件绑定相同级别手势时,子组件优先响应,如果父组件绑定优先级手势方法,子组件为普通绑定手势方法,则父组件优先响应
    .priorityGesture(TapGesture().onAction((event)=>{console.error('parentGesture: ' + JSON.stringify(event))}))

3. 并行手势绑定方法

  • 当父组件绑定此手势方法时,父子组件可同时响应手势
    .parallelGesture(TapGesture().onAction((event)=>{console.error('parent event: ' + JSON.stringify(event))}))

二、单一手势

1. 点击手势(tapGesture)

      Text('手势').fontSize(44).gesture(TapGesture().onAction((event) => {console.error('event: ' + JSON.stringify(event))}))

2. 长按手势(longPressGesture)

LongPressGesture(value?:{fingers?:number; repeat?:boolean; duration?:number})
  • fingers :触发最少手指数,默认1
  • repeat 是否连续触发 默认false
  • duration 长按多久触发,默认500
Text('长按手势').fontSize(55).gesture(LongPressGesture({fingers: 1, repeat: true, duration: 300})//fingers :触发最少手指数,默认1  repeat 是否连续触发 默认false  duration 长按多久触发,默认500.onAction(event=>{console.error('longPress: ' + JSON.stringify(event))}))

3. 拖动手势(PanGesture)

PanGesture(value?:{ fingers?:number; direction?:PanDirection; distance?:number})
  • fingers: 触发手势最少手指数,默认1
  • direction:触发手势方向,默认值Pandirection.All
  • distance:触发手势的最少距离,单位为vp,默认5vp
  • 有点类似于onTouch事件
  Text('拖动手势').fontSize(44).gesture(PanGesture().onActionStart(event => {console.error('Pan start: ' + JSON.stringify(event))}).onActionUpdate(event => {console.error('Pan update: ' + JSON.stringify(event))}).onActionEnd(event => {console.error('Pan end: ' + JSON.stringify(event))}).onActionCancel(() => {console.error('Pan cancel: ')}))

4. 撮合手势(PinchGesture)

PinchGesture(value?:{fingers?:number; distance?:number})
  • fingers: 触发手势最少手指数,默认2, 最大值为5
  • distance:触发手势的最少距离,单位为vp,默认5vp
      Text('撮合手势').fontSize(44).gesture(PinchGesture().onActionStart(event => {console.error('Pinch start: ' + JSON.stringify(event))}).onActionUpdate(event => {console.error('Pinch update: ' + JSON.stringify(event))}).onActionEnd(event => {console.error('Pinch end: ' + JSON.stringify(event))}).onActionCancel(() => {console.error('Pinch cancel: ')}))

5. 旋转手势(RotationGesture)

RotationGesture(value?:{fingers?:number; angle?:number})
  • fingers: 触发手势最少手指数,默认2, 最大值为5
  • angle: 触发手势的最小改变度数,单位是deg,默认为1deg
 Text().fontSize(44).gesture(RotationGesture({fingers:2}).onActionStart(event => {console.error('Rotation start: ' + JSON.stringify(event))}).onActionUpdate(event => {console.error('Rotation update: ' + JSON.stringify(event))}).onActionEnd(event => {console.error('Rotation end: ' + JSON.stringify(event))}).onActionCancel(() => {console.error('Rotation cancel: ')}))

6. 滑动手势(SwipeGesture)

SwipeGesture(value?:{fingers?:number; direction?:SwipeDirection; speed?:number})
  • fingers: 触发手势最少手指数,默认1, 最大值为10
  • direction: 触发手势的方向默认值是 SwipeDirection.All
  • speed: 触发手势的最小滑动速度,单位为vp/s,默认值为100vp/s
    .gesture(SwipeGesture({ direction: SwipeDirection.Vertical }).onAction(event => {console.error('Swipe : ' + JSON.stringify(event))}))

三、组合手势

GestureGroup(mode:GestureMode, ...gesture:GestureType[])

mode: 声明组合手势的类型
gesture: 手势数组

1. 顺序组合

    .gesture(GestureGroup(GestureMode.Sequence,SwipeGesture({ direction: SwipeDirection.Vertical }).onAction(event => {console.error('Swipe : ' + JSON.stringify(event))}),LongPressGesture().onAction(event => {console.error('longPress : ' + JSON.stringify(event))})))

2. 并行组合

    .gesture(GestureGroup(GestureMode.Parallel,SwipeGesture({ direction: SwipeDirection.Vertical }).onAction(event => {console.error('Swipe : ' + JSON.stringify(event))}),LongPressGesture().onAction(event => {console.error('longPress : ' + JSON.stringify(event))})))

3. 互斥组合

    .gesture(GestureGroup(GestureMode.Exclusive,SwipeGesture({ direction: SwipeDirection.Vertical }).onAction(event => {console.error('Swipe : ' + JSON.stringify(event))}),LongPressGesture().onAction(event => {console.error('longPress : ' + JSON.stringify(event))})))
http://www.shuangfujiaoyu.com/news/39146.html

相关文章:

  • 便宜的做网站公司长沙网站关键词排名
  • 做得比较好的公司网站网址域名ip查询
  • 如何做英文网站的外链seo在哪学
  • 给出一个网站怎么做渗透测试申请一个网站
  • 百度搜索引擎收录入口谈谈你对seo概念的理解
  • 好看到让人久久不忘的电影seo和竞价排名的区别
  • 免费建站的网址seo的中文含义
  • 股票海选公司用什么网站网页设计与制作
  • 自己在网上怎么做网站seo是啥意思
  • html5 css3网站模版厦门seo推广公司
  • 龙湾网站建设免费国外ddos网站
  • 住房和城乡建设部网站行标淄博网站优化
  • 河南大学学科建设处网站网站推广的途径有哪些
  • 怎么做网站数据库营销软件商城
  • 怎么分析网站用什么技术做的平台推广公司
  • mobi网站怎么注册龙岗网站设计
  • 手机游戏网站seo推广seo教程
  • 做网站营销怎么去推广关键词排名零芯互联关键词
  • 怎样做英文网站seo网站推广助理
  • 手机企业网站建设怎么做好市场宣传和推广
  • 炎陵做网站免费网络推广软件
  • 济南专门做公司网站的公司百度引流推广怎么做
  • 网站视频做栏目一般一期多钱培训机构排名一览表
  • 航空网站建设长沙百度网站快速排名
  • 网站首页置顶是怎么做谷歌手机版下载安装
  • 贵州门户网站建设如何在百度上发布自己的文章
  • 金山区做网站吗青岛网站
  • dedecms模板站源码如何在百度上做广告
  • 免费论坛网站大全关键的近义词
  • 单位做网站备案用身份证有啥用外贸业务推广