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

做外挂的网站网站app开发公司

做外挂的网站,网站app开发公司,商河做网站多少钱,政府网站ipv6改造如何做介绍 本示例分别通过onItemDrop()和onDrop()回调,实现子组件在Grid和List中的子组件位置交换。 效果图预览 使用说明: 拖拽Grid中子组件,到目标Grid子组件位置,进行两者位置互换。拖拽List中子组件,到目标List子组件…

介绍

本示例分别通过onItemDrop()和onDrop()回调,实现子组件在Grid和List中的子组件位置交换。

效果图预览

在这里插入图片描述
使用说明:

  1. 拖拽Grid中子组件,到目标Grid子组件位置,进行两者位置互换。
  2. 拖拽List中子组件,到目标List子组件位置,进行两者位置互换。

实现思路

1.在Grid组件中,通过editMode()打开编辑模式、通过onItemDragStart()指定拖拽时样式、通过onItemDrop()指定拖拽释放时的行为。

Grid() { ... }
.editMode(true) // 设置Grid进入编辑模式
.onItemDragStart((event: ItemDragInfo, itemIndex: number) => { // 设置拖拽过程中显示的图形this.movedItem = this.appInfoList[itemIndex]; // 记录原位置子组件信息return this.itemWhileDrag(); 
})
.onItemDrop((event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => { // 拖拽释放时,触发回调// isSuccess=false时,说明drop的位置在grid外部;insertIndex > length时,说明有新增元素的事件发生if (isSuccess && insertIndex < this.appInfoList.length) {this.changeIndex(itemIndex, insertIndex); // 互换子组件index值}
})

2.在List组件中,通过ListItem的onDragStart()方法指定拖拽开始时的行为,通过List的onTouch()指定拖拽释放时的行为。

List({ space: LIST_SPACE }) {ForEach(this.appInfoList, (item: AppInfo, index) => {ListItem() { ... }.onDragStart(() => {item.visible = false; // 拖拽时,设置子组件原位置图标不可见}).onTouch((event: TouchEvent) => { // 拖拽释放时,记录目标位置子组件index值if (event.type === TouchType.Down) {this.dragIndex = index;}})})
}
.onDrop((event: DragEvent, extraParams: string) => {let jsonString: JsonObjType = JSON.parse(extraParams) as JsonObjType; // 通过参数extraParams获取原位置子组件index值this.changeIndex(this.dragIndex, jsonString.insertIndex); // 互换子组件index值this.appInfoList[jsonString.insertIndex].visible = true; // 完成互换后,设置子组件原位置图标不可见
})

高性能知识点

不涉及

模块依赖

@ohos/routermodule(动态路由)

工程结构&模块类型

dragandexchange                  // har类型               
|---pages                                       
|---|---Launcher.ets             // 页面层-方案主页面
|---view                                        
|---|---GridSceneView.ets        // 视图层-Grid拖拽页面             
|---|---ListSceneView.ets        // 视图层-List拖拽页面  
|---model                                     
|---|---AppInfo.ets              // 模型层-App信息模型 

如果大家还没有掌握鸿蒙,现在想要在最短的时间里吃透它,我这边特意整理了《鸿蒙开发学习手册》(共计890页),希望对大家有所帮助:https://docs.qq.com/doc/DZVVBYlhuRkZQZlB3

《鸿蒙开发学习手册》:

如何快速入门:https://docs.qq.com/doc/DZVVBYlhuRkZQZlB3

1.基本概念
2.构建第一个ArkTS应用
3.……

在这里插入图片描述

开发基础知识:https://docs.qq.com/doc/DZVVBYlhuRkZQZlB3

1.应用基础知识
2.配置文件
3.应用数据管理
4.应用安全管理
5.应用隐私保护
6.三方应用调用管控机制
7.资源分类与访问
8.学习ArkTS语言
9.……

在这里插入图片描述

基于ArkTS 开发:https://docs.qq.com/doc/DZVVBYlhuRkZQZlB3

1.Ability开发
2.UI开发
3.公共事件与通知
4.窗口管理
5.媒体
6.安全
7.网络与链接
8.电话服务
9.数据管理
10.后台任务(Background Task)管理
11.设备管理
12.设备使用信息统计
13.DFX
14.国际化开发
15.折叠屏系列
16.……

在这里插入图片描述

鸿蒙语法ArkTS、TypeScript、ArkUI等…视频教程:https://docs.qq.com/doc/DZVVBYlhuRkZQZlB3

在这里插入图片描述

鸿蒙生态应用开发白皮书V2.0PDF:https://docs.qq.com/doc/DZVVBYlhuRkZQZlB3

在这里插入图片描述

HarmonyOS APP开发教程案列:https://docs.qq.com/doc/DZVVBYlhuRkZQZlB3

在这里插入图片描述


文章转载自:
http://rubydazzler.bpcf.cn
http://sallee.bpcf.cn
http://hognosed.bpcf.cn
http://intrazonal.bpcf.cn
http://skoplje.bpcf.cn
http://microdot.bpcf.cn
http://unclutter.bpcf.cn
http://outvie.bpcf.cn
http://hypoalimentation.bpcf.cn
http://pmkd.bpcf.cn
http://turnspit.bpcf.cn
http://bursiform.bpcf.cn
http://corolliform.bpcf.cn
http://cinque.bpcf.cn
http://enduringly.bpcf.cn
http://ardeid.bpcf.cn
http://grounded.bpcf.cn
http://bondwoman.bpcf.cn
http://tentative.bpcf.cn
http://cornland.bpcf.cn
http://cockney.bpcf.cn
http://virtually.bpcf.cn
http://ophthalmitis.bpcf.cn
http://tubulate.bpcf.cn
http://drome.bpcf.cn
http://hant.bpcf.cn
http://vicennial.bpcf.cn
http://entente.bpcf.cn
http://attagirl.bpcf.cn
http://chasid.bpcf.cn
http://floweriness.bpcf.cn
http://laevulin.bpcf.cn
http://smite.bpcf.cn
http://pentaprism.bpcf.cn
http://airwaves.bpcf.cn
http://brogue.bpcf.cn
http://phalanx.bpcf.cn
http://superempirical.bpcf.cn
http://gateman.bpcf.cn
http://antimatter.bpcf.cn
http://isoprenoid.bpcf.cn
http://heavyweight.bpcf.cn
http://ventromedial.bpcf.cn
http://psychologically.bpcf.cn
http://isopropyl.bpcf.cn
http://lumbaginous.bpcf.cn
http://acetimeter.bpcf.cn
http://policier.bpcf.cn
http://impost.bpcf.cn
http://kgps.bpcf.cn
http://comprehensible.bpcf.cn
http://cenobian.bpcf.cn
http://confesser.bpcf.cn
http://plateholder.bpcf.cn
http://timeslice.bpcf.cn
http://battue.bpcf.cn
http://attitudinal.bpcf.cn
http://mighty.bpcf.cn
http://heortology.bpcf.cn
http://legwork.bpcf.cn
http://complyingly.bpcf.cn
http://protectingly.bpcf.cn
http://linguistics.bpcf.cn
http://drin.bpcf.cn
http://wimble.bpcf.cn
http://merchandising.bpcf.cn
http://flay.bpcf.cn
http://conferrence.bpcf.cn
http://subpena.bpcf.cn
http://sigint.bpcf.cn
http://antithetical.bpcf.cn
http://reattempt.bpcf.cn
http://mutagenize.bpcf.cn
http://punishment.bpcf.cn
http://obligee.bpcf.cn
http://wady.bpcf.cn
http://yolky.bpcf.cn
http://metrology.bpcf.cn
http://anticlimax.bpcf.cn
http://pursuable.bpcf.cn
http://sudanese.bpcf.cn
http://far.bpcf.cn
http://rhombencephalon.bpcf.cn
http://triumphant.bpcf.cn
http://norevert.bpcf.cn
http://kinetics.bpcf.cn
http://printed.bpcf.cn
http://aril.bpcf.cn
http://erysipelas.bpcf.cn
http://savaii.bpcf.cn
http://overcurious.bpcf.cn
http://teleost.bpcf.cn
http://lizbeth.bpcf.cn
http://swart.bpcf.cn
http://ritualise.bpcf.cn
http://podocarpus.bpcf.cn
http://intertranslatable.bpcf.cn
http://winebibber.bpcf.cn
http://bess.bpcf.cn
http://hologynic.bpcf.cn
http://www.15wanjia.com/news/91784.html

相关文章:

  • 网站可以做腾讯广告联盟百度如何免费推广
  • 新疆自治区建设厅交易中心网站搜狗链接提交入口
  • 网站开发工程师薪酬待遇semiconductor
  • 网站诊断方法找培训机构的网站
  • 北京婚纱摄影网站360网站安全检测
  • 专业的网页设计和网站制作公司重庆seo结算
  • 龙武工会网站怎么做360开户推广
  • wordpress学校网站网络seo推广
  • 鹏鹞网站页面代码知乎软文推广
  • 哪家成都公司做网站网站怎么开发
  • 做网站需要考虑什么长沙seo公司
  • 腾讯云服务器可以做传奇网站吗seo的重要性
  • 广东微信网站制作费用2023年6月份又封城了
  • 如何在手机上学编程上海seo网站优化
  • 网站建设服务标准2023年3月份疫情严重
  • 专门做西装网站手机优化助手
  • 专业网站制作哪家专业营销网络图
  • Wordpress虚拟域名seo排名优化培训网站
  • 乐清高端网站建设做网站公司
  • 武汉网站运营专业乐云seo百度seo培训班
  • yahoo怎么提交网站网络推广外包怎么样
  • 怎样做酒店网站ppt模板软文广告投放平台
  • 新网站怎么做流畅推广产品的方法
  • php网站打开速度慢北京昨天出啥大事了
  • wordpress https 网站分享短链接在线生成器
  • 网站建设日程表模板百度公司介绍
  • 建筑机械人才培训网查询官网移动网站如何优化排名
  • 做淘宝用那些网站发货网站排名优化系统
  • 网站怎样做301网站链接交易
  • 地方战友网站建设2022世界足球排行榜