鸿蒙完整项目-仿盒马App(一)首页静态页面

跟着鸿蒙小林博主,练习下项目~记录下首页的搭建,后续继续完善和整体项目完成会进行布局修改,先按照博主的跟做,后续在改
在这里插入图片描述
1.分为底部整体框架搭建
2.首页布局(顶部搜索、新人专享、金刚区(两个不同集合数据)、图片海报、三个分区、瀑布流列表)。组件单独写的
在这里插入图片描述

  1. MainPages
@Entry
@Component/***首页*/
struct MainPages {@State isCheck_Index_One: boolean = true@State currentIndex: number = 0//底部ui@BuildertabBuilder(title: string, targetIndex: number, selectedImg: Resource, normalImg: Resource) {Column() {Image(this.currentIndex === targetIndex ? selectedImg : normalImg).width(this.isCheck_Index_One && targetIndex === 0 ? 50 : 25).height(this.isCheck_Index_One && targetIndex === 0 ? 50 : 25).borderRadius(this.isCheck_Index_One && targetIndex === 0 ? 25 : 0)Text(title).margin({ top: 5 }).fontSize(14).margin({ top: 5 }).fontWeight(this.currentIndex === targetIndex ? FontWeight.Bold : FontWeight.Normal).fontColor('#6B6B6B')}.width('100%').height(50).justifyContent(FlexAlign.Center)}build() {//底部导航栏Column() {Tabs({ barPosition: BarPosition.End }) {TabContent() {//首页布局HomeUI()}.tabBar(this.tabBuilder("首页", 0, $r('app.media.me_image'), $r('app.media.index1_not_check')))TabContent() {Text('分类').fontSize(30)}.tabBar(this.tabBuilder("分类", 1, $r('app.media.index2_check'), $r('app.media.index2_not_check')))TabContent() {Text('购物车').fontSize(30)}.tabBar(this.tabBuilder("购物车", 2, $r('app.media.index3_check'), $r('app.media.index3_not_check')))TabContent() {Text('我的').fontSize(30)}.tabBar(this.tabBuilder("我的", 3, $r('app.media.index4_check'), $r('app.media.index4_not_check')))}.onChange((index: number) => {this.currentIndex = indexif (index === 0) {this.isCheck_Index_One = true} else {this.isCheck_Index_One = false}})}.linearGradient({angle: 180,colors: [[0xff0000, 0], [0xff6666, 0.2], [0xffffff, 1]]}).width('100%').height('100%')}
}
  1. HomeUI
//首页布局
@Component
@Preview
export struct HomeUI {@State locationName: string = ''@State coupons: ESObject[] = [{ amount: "¥10", desc: "新人专享" },{ amount: "¥20", desc: "新人专享" },{ amount: "¥10", desc: "新人专享" },{ amount: "¥30", desc: "新人专享" }]/***新用户*/@BuilderCouponComponent() {Column() {Row() {Text("新人专享卷").fontSize(24).fontColor('#FF0000')Text("前三单免运费").fontSize(14).fontColor('#888888').margin({ left: 10 })}.width('100%').padding(16)}List({ space: 10 }) {ForEach(this.coupons, (item: ESObject) => {ListItem() {Column() {Text(item.amount).fontSize(22).fontColor('#FF4444').margin({ bottom: 8 })Text(item.desc).fontSize(14).fontColor('#999999')}}})}}build() {Scroll(){Column() {HomeTopBar({ locationName: this.locationName })CommonSearBar({onSearchClick: () => {console.debug('测试点击')}});CouponComponent().margin({ top: 15, left: 10, right: 10 })//金刚区SplitLayout()//海报区Image("https://img0.baidu.com/it/u=2721636467,4123351490&fm=253&fmt=auto&app=138&f=JPEG?w=1000&h=500").width("95%").height(100).margin({top:10}).borderRadius(20).objectFit(ImageFit.Fill)//三个海报SpecialColumn().margin({ top: 15, left: 10, right: 10,bottom:10 })//瀑布流列表WaterFlowGoods().margin({  left: 10, right: 10})}}.width('100%').height('100%')}
}

3.首页里面的搜索组件

/***搜索组件*/
@Component
export struct CommonSearBar {@State searchText: string = ''private onSearchClick?: () => voidbuild() {Row() {Image($r('app.media.search')).width(24).height(24).margin({ left: 12 })Text(this.searchText || "请输入搜索内容").width('70%').height(35).backgroundColor(Color.White).padding({ left: 5 }).fontSize(16)Text('搜索').width(90).layoutWeight(1).fontSize(16).fontColor(Color.White).backgroundColor('#FF0000').borderRadius(20).padding({ top: 5, bottom: 5 }).textAlign(TextAlign.Center)}.height(40).width('90%').padding(1).backgroundColor('#F5F5F5').borderRadius(28).onClick(() => {this.onSearchClick?.()})}
}

4.CouponComponent首页新用户领劵

/***首页新用户领劵*/
@Component
export struct CouponComponent {@State coupons: ESObject[] = [{ amount: "¥10", desc: "新人专享" },{ amount: "¥20", desc: "新人专享" },{ amount: "¥10", desc: "新人专享" },{ amount: "¥30", desc: "新人专享" }]build() {Column() {Row() {Text("新人专享券").fontSize(24).fontColor('#FF0000')Text("前三单免运费").fontSize(14).fontColor('#888888').margin({ left: 10 })}.width('100%').padding(10)List({ space: 10 }) {ForEach(this.coupons, (item: ESObject) => {ListItem() {Column() {Text(item.amount).fontSize(22).fontColor('#FF4444').margin({ bottom: 8 })Text(item.desc).fontSize(14).fontColor('#999999')}.width(80).padding(16).backgroundColor('#FFFFFF').borderRadius(8)}})}.width('100%').height(100).margin({left:20}).listDirection(Axis.Horizontal)Button('立即领取').width(200).height(40).backgroundColor('#FF0000').fontColor(Color.White).borderRadius(20).margin({ top:20,bottom: 16 })}.backgroundColor("#F5F5F5").width('100%').height('33%').borderRadius(10)}
}

5.SplitLayout金刚区+海报

/***金刚区*/
@Component
@Preview
export struct SplitLayout {build() {Column() {Grid() {ForEach(HomeData.topData, (row: ESObject) => {ForEach(row, (item: ESObject) => {GridItem() {Column() {Image(item.image).width(40).height(40).borderRadius(20).margin({ top: 5 })Text(item.title).padding(1).fontSize(16).fontColor(Color.Black).textAlign(TextAlign.Center)}}})})}.columnsTemplate('1fr 1fr 1fr 1fr ').height(200)List({ space: 25 }) {ForEach(HomeData.bottomData, (item: ESObject) => {ListItem(){Column(){Image(item.image).width(40).height(40).borderRadius(15)Text(item.title).textAlign(TextAlign.Center).fontColor(Color.Black).fontSize(16).padding(5)}}})}.scrollBar(BarState.Off).margin({left:10}).height(70).listDirection(Axis.Horizontal)}.alignItems(HorizontalAlign.Start).height(310).width('95%').margin({ top: 20 }).backgroundColor('#F5F5F5').padding(16).borderRadius(20)}
}

6.三个海报SpecialColumn

@Component
@Preview
export struct SpecialColumn {build() {Row(){Column() {Row() {Text('今日疯抢').fontSize(16).fontWeight(FontWeight.Bold).fontColor(Color.Black)Blank()Text('一元秒杀').fontSize(10).fontColor(Color.White).backgroundColor(Color.Red).borderRadius({ topLeft: 8, bottomRight: 8 }).padding(2)}Text('立省两元').fontSize(10).fontColor('#999999').margin({ top: 4 })List({ space: 10 }) {ForEach(HomeData.priceInfo,(priceInfo:ESObject)=>{ListItem() {Column() {Image(priceInfo.image).width(40).height(50).margin({ bottom: 8 }).objectFit(ImageFit.Cover)Row() {Text(priceInfo.oldPrice).fontSize(12).fontColor('#999999').decoration({ type: TextDecorationType.LineThrough })Blank()Text(priceInfo.newPrice).fontSize(14).fontColor(Color.Red)}}.margin({ top: 12 }).padding(8).borderRadius(8)}})}.listDirection(Axis.Horizontal).width('100%').height(100)}.borderRadius(8).alignItems(HorizontalAlign.Start).linearGradient({direction: GradientDirection.Bottom, // 渐变方向colors: [["#F8D7D8", 0.0], ["#FEFFFF", 0.3]]}).width('45%').padding(10)Column() {Text('尝鲜盒子').fontSize(16).fontColor(Color.Black).fontWeight(FontWeight.Bold)Text('一分钱试吃').fontSize(10).fontColor('#999999').margin({ top: 4 })Column() {Image(HomeData.priceInfo[0].image).width(40).height(50).margin({ bottom: 8 }).objectFit(ImageFit.Cover)Text(HomeData.priceInfo[0].newPrice).fontSize(14).fontColor(Color.Red)}.margin({ top: 12 }).padding(10)}.borderRadius(8).linearGradient({direction: GradientDirection.Bottom, // 渐变方向colors: [["#FCECD0", 0.0], ["#FEFFFF", 0.3]]}).width('25%').padding(10)Column() {Text('健康生活').fontSize(16).fontColor(Color.Black).fontWeight(FontWeight.Bold)Text('果蔬榨榨杯').fontSize(10).fontColor('#999999').margin({ top: 4 })Column() {Image(HomeData.priceInfo[1].image).width(40).height(50).margin({ bottom: 8 }).objectFit(ImageFit.Cover)Text(HomeData.priceInfo[1].newPrice).fontSize(14).fontColor(Color.Red)}.margin({ top: 12 }).padding(10)}.linearGradient({direction: GradientDirection.Bottom, // 渐变方向colors: [["#BFE4CB", 0.0], ["#FEFFFF", 0.3]]}).borderRadius(8).width('25%').padding(10)}.width('100%').height(150).justifyContent(FlexAlign.SpaceBetween)}}

7.瀑布流 WaterFlowGoods()

/***首页瀑布流*/
@Component
@Preview
export struct WaterFlowGoods {@State goodsList: Array<GoodsItem> = [{image: "https://img1.baidu.com/it/u=499325528,1576211670&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=667",name: "红颜草莓",spec: "早熟",originalPrice: "¥39",price: "¥19"},{image: "https://img0.baidu.com/it/u=3907484858,1857304284&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",name: "沙地红心西瓜",spec: "脆甜",originalPrice: "¥13",price: "¥9.9"},{image: "https://img0.baidu.com/it/u=3907484858,1857304284&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",name: "芒果",spec: "香甜",originalPrice: "¥23",price: "¥19.9"} ,{image: "https://img0.baidu.com/it/u=3907484858,1857304284&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",name: "海南菠萝",spec: "脆酸甜",originalPrice: "¥43",price: "¥29.9"}]@State columns: number = 2build() {//瀑布流WaterFlow(){ForEach(this.goodsList,(item:GoodsItem)=>{FlowItem(){//布局Column(){Image(item.image).width('100%').borderRadius({topLeft:10,topRight:10})Column(){Text(item.name).fontSize(16).fontColor('#333').margin({ bottom: 4 })Text(item.spec).fontSize(12).fontColor('#666').margin({ bottom: 8 })Row(){Text(item.originalPrice).fontSize(12).fontColor('#999').decoration({ type: TextDecorationType.LineThrough })Text(item.price).fontSize(16).fontColor(Color.Red).margin({left:10})Blank()Column(){Image($r('app.media.cart')).width(20).height(20)}.justifyContent(FlexAlign.Center).width(36).height(36).backgroundColor("#ff2bd2fa").borderRadius(18)}.width('100%').justifyContent(FlexAlign.SpaceBetween)}.alignItems(HorizontalAlign.Start).padding(12)}.backgroundColor(Color.White).borderRadius(12)}.margin({ bottom: 12 })})}.margin({top:30})//设置列数.columnsTemplate('1fr 1fr').columnsGap(12)}
}

8.数据类HomeData

export class  HomeData{static  topData: ESObject[][] = [[{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.iqeBi3j390BfpXYkfwL7ZwHaIC?w=168&h=182&c=7&r=0&o=5&dpr=2&pid=1.7", title: "当季水果" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.45Yw7hjv6Pya3G4AkSXV7gHaE6?w=268&h=180&c=7&r=0&o=5&dpr=2&pid=1.7", title: "有机蔬菜" },{ image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.D4joDEE4liDJ24JkH8vT7wHaE8?w=274&h=183&c=7&r=0&o=5&dpr=2&pid=1.7", title: "进口水产" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qlXw3xeqY17Pz4Zes2XO9wHaGn?w=221&h=197&c=7&r=0&o=5&dpr=2&pid=1.7", title: "散养家禽" },{ image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.iiVk_wx6cKy6Qz-GORTrBQHaE7?w=280&h=187&c=7&r=0&o=5&dpr=2&pid=1.7", title: "五谷杂粮" }],[{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.45Yw7hjv6Pya3G4AkSXV7gHaE6?w=268&h=180&c=7&r=0&o=5&dpr=2&pid=1.7", title: "有机蔬菜" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qlXw3xeqY17Pz4Zes2XO9wHaGn?w=221&h=197&c=7&r=0&o=5&dpr=2&pid=1.7", title: "散养家禽" },{ image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.D4joDEE4liDJ24JkH8vT7wHaE8?w=274&h=183&c=7&r=0&o=5&dpr=2&pid=1.7", title: "进口水产" },{ image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.iiVk_wx6cKy6Qz-GORTrBQHaE7?w=280&h=187&c=7&r=0&o=5&dpr=2&pid=1.7", title: "五谷杂粮" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.iqeBi3j390BfpXYkfwL7ZwHaIC?w=168&h=182&c=7&r=0&o=5&dpr=2&pid=1.7", title: "当季水果" }]]static bottomData: ESObject[] = [{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.iqeBi3j390BfpXYkfwL7ZwHaIC?w=168&h=182&c=7&r=0&o=5&dpr=2&pid=1.7", title: "尝夏鲜" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.45Yw7hjv6Pya3G4AkSXV7gHaE6?w=268&h=180&c=7&r=0&o=5&dpr=2&pid=1.7", title: "烧烤露营" },{ image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.D4joDEE4liDJ24JkH8vT7wHaE8?w=274&h=183&c=7&r=0&o=5&dpr=2&pid=1.7", title: "厨卫百货" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qlXw3xeqY17Pz4Zes2XO9wHaGn?w=221&h=197&c=7&r=0&o=5&dpr=2&pid=1.7", title: "天天会员价" },{ image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.iiVk_wx6cKy6Qz-GORTrBQHaE7?w=280&h=187&c=7&r=0&o=5&dpr=2&pid=1.7", title: "盒马NB" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.iqeBi3j390BfpXYkfwL7ZwHaIC?w=168&h=182&c=7&r=0&o=5&dpr=2&pid=1.7", title: "自有产品" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.45Yw7hjv6Pya3G4AkSXV7gHaE6?w=268&h=180&c=7&r=0&o=5&dpr=2&pid=1.7", title: "每日秒杀" },{ image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.D4joDEE4liDJ24JkH8vT7wHaE8?w=274&h=183&c=7&r=0&o=5&dpr=2&pid=1.7", title: "好劵连连" },{ image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qlXw3xeqY17Pz4Zes2XO9wHaGn?w=221&h=197&c=7&r=0&o=5&dpr=2&pid=1.7", title: "清洁纸品" },{ image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.iiVk_wx6cKy6Qz-GORTrBQHaE7?w=280&h=187&c=7&r=0&o=5&dpr=2&pid=1.7", title: "敬请期待" }]static  priceInfo: ESObject = [{image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.n_NQx-NMBlbYSU0fvKlMfwHaHa?w=213&h=213&c=7&r=0&o=5&dpr=2&pid=1.7",oldPrice: "¥99",newPrice: "¥79"},  {image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qHml5NfgkGlIvftvCc6krAHaE8?w=270&h=180&c=7&r=0&o=5&dpr=2&pid=1.7",oldPrice: "¥99",newPrice: "¥79"}]
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.pswp.cn/bicheng/82759.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

LINUX安装运行jeelowcode后端项目(idea启动)

参考 LINUX安装运行jeelowcode后端项目&#xff08;命令行&#xff09;-CSDN博客 IntelliJ IDEA下载地址&#xff08;社区版、付费版&#xff09;-CSDN博客 软件已安装好&#xff0c;数据库也初始化完毕。 步骤1&#xff1a;打开项目目录步骤2&#xff1a;配置JDK步骤3&…

Web Vitals 核心指标快速掌握指南

Next.js 内置了对测量和报告性能指标的支持,我们可以通过 useReportWebVitals 钩子自行管理报告。它会在应用的前端代码开始之前运行,用于对应用进行全局分析、错误跟踪以及性能监控。 本篇内容主要详细介绍 6 个性能分析的指标,帮助我们更好的进行性能优化。 1. TTFB 定…

专业课复习笔记 10

感觉专业课就是考研的几个科目里面难度最高的科目&#xff0c;我要好好加油&#xff0c;争取拿下一百二十分。这个要是过不了线&#xff0c;考研基本废完了。我感觉专业课练习题没有说像是数学那么多练习题&#xff0c;反而是需要自己仔细去理解里面的知识&#xff0c;记住知识…

C语言 文件操作(2)

目录 1.文件的顺序读写 2.文件的随机读写 3.文件读取结束的判定 4.文件的缓冲区 1.文件的读取顺序 1.1 顺序读写函数介绍 上面说的适用于所有输入流一般指适用于标准输入流和其他输入流&#xff08;如文件输入流&#xff09;&#xff1b;所有输出流 一般指适用于标准输出…

QGIS新手教程2:线图层与多边形图层基础操作指南(点线互转、中心点提取与WKT导出)

QGIS新手教程&#xff1a;线图层与多边形图层基础操作指南&#xff08;点线互转、中心点提取与WKT导出&#xff09; 目录 QGIS新手教程&#xff1a;线图层与多边形图层基础操作指南&#xff08;点线互转、中心点提取与WKT导出&#xff09;&#x1f4cc; 引言第一部分&#xff1…

Netty 框架介绍

1. Netty 框架介绍 Netty 是一个基于 Java NIO&#xff08;Non-blocking I/O&#xff09;的异步事件驱动网络应用框架&#xff0c;旨在快速开发高性能、高可靠性的网络服务器和客户端。它简化了 TCP/UDP 等协议的编程&#xff0c;并提供了高度可定制的组件&#xff0c;适用于高…

Eclipse 插件开发 5.2 编辑器 获取当前编辑器

Eclipse 插件开发 5.2 编辑器 获取当前编辑器 1 获取活跃编辑器2 获取全部编辑器 Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Click1 Bundle-SymbolicName: com.xu.click1;singleton:true Bundle-Version: 1.0.0 Bundle-Activator: com.xu.click1.Activato…

完成LRU页面调度算法的模拟

目录 1.上代码 2.实现思路 1.上代码 #include<iostream> using namespace std; //内存块类 class memory { public:void init();void alter(int a, int b);int check_full();int check_old();int check_exist(int a);void run();void refresh();friend int manage(me…

Three.js 直线拐角自动圆角化(圆弧转弯)

目录 前言 计算圆心坐标 计算两条直线的角平分线 计算dir1 dir2的夹角 计算圆心到直线交点的距离 计算圆心 计算从正X轴算起曲线开始、终止的角度 计算垂足与两直线交点距离 计算垂足 计算垂线 计算两垂线与x轴的夹角 ​编辑 计算圆弧是否按照顺时针方向来绘制 成功…

【MYSQL】mysql单表亿级数据查询优化处理

1、实践表明mysql单表数据超过一亿后&#xff0c;数据进行交并差效率会非常慢&#xff0c;所以这时候就要进行表的优化。 我这里主要是使用索引。 2、表字段精量精简 查索引&#xff0c;建索引&#xff0c;删索引语法 --查看索引 -- SHOW INDEX FROM 表名; -- 删除索引 --AL…

C++基础:模拟实现vector(有存在深层次的浅拷贝问题)

目录 引言 一、vector的基本框架 二、尾插push_back、reserve扩容、任意位置插入insert&#xff08;增&#xff09; 1.reserve扩容 2.push_back尾插 3.深层次的浅拷贝问题 4. 任意位置插入数据insert(会使迭代器失效) 三、构造、析构、拷贝构造函数 1.构造函数 1.1无…

【力扣】关于链表索引

怎么才能走到目标节点呢&#xff1f; 从9走到2&#xff0c;需要2步&#xff0c;他们的索引分别是&#xff1a;0&#xff0c;2 在for循环里&#xff1a;int i 0; i < 2; i i的范围是【0&#xff0c;2&#xff09; 有&#xff1a;2 2 - 0 如果从虚拟头节点开始走到2&#x…

C++ ODB框架详解:现代C++对象关系映射解决方案

目录 框架简介安装与配置基础概念实体映射数据库操作查询操作高级功能性能优化最佳实践 框架简介 ODB&#xff08;Object-Relational Database&#xff09;是一个专为C设计的对象关系映射&#xff08;ORM&#xff09;框架&#xff0c;由CodeSynthesis公司开发。它提供了一种…

Ai书签管理工具开发全记录(一):项目总览与技术蓝图

文章目录 Ai书签管理工具开发全记录&#xff08;一&#xff09;&#xff1a;项目总览与技术蓝图 ✨1. 项目背景与核心价值 &#x1f4a1;1.1. 核心特点 2. 技术架构分析 &#x1f3d7;️功能架构全景图典型工作流 3. 核心技术栈选择 &#x1f6e0;️4. 预期使用功能说明 &#…

GUI 编程——python

GUI 编程核心概念 GUI&#xff08;图形用户界面&#xff0c;Graphical User Interface&#xff09; 是一种通过图形元素&#xff08;窗口、按钮、菜单等&#xff09;与用户交互的应用程序形式&#xff0c;相比命令行界面更直观易用。以下是学习 GUI 编程的基础概念和流程&…

【Doris基础】Apache Doris 基本架构深度解析:从存储到查询的完整技术演进

目录 1 引言 2 Doris 架构全景图 2 核心组件技术解析 2.1 Frontend 层&#xff08;FE&#xff09; 2.2 Backend 层&#xff08;BE&#xff09; 3 数据存储与复制机制 3.1 存储架构演进 3.2 副本复制策略 4 查询处理全流程解析 4.1 查询生命周期 5 高可用设计 5.1 F…

光电赋能低空场景,灵途科技助力无人机持续升级

2025 UASE 主题为“步入低空经济新时代”的“2025第九届世界无人机大会暨国际低空经济与无人系统博览会/第十届深圳国际无人机展览会”5月23日在深圳会展中心隆重开幕。本届展会汇聚了全球800余家企业参展&#xff0c;展示5000多款无人机及系统设备&#xff0c;全面呈现低空经…

iOS QQ抽屉式导航的实现

QQ个人中心的侧滑功能(通常称为"抽屉式导航")可以通过以下几种方式在iOS中实现&#xff1a; 主要实现方案 使用第三方库 最快速的方式是使用成熟的第三方库&#xff1a; SWRevealViewController&#xff1a;最流行的侧滑菜单库MMDrawerController&#xff1a;另一…

【Pandas】pandas DataFrame drop

Pandas2.2 DataFrame Reindexing selection label manipulation 方法描述DataFrame.add_prefix(prefix[, axis])用于在 DataFrame 的行标签或列标签前添加指定前缀的方法DataFrame.add_suffix(suffix[, axis])用于在 DataFrame 的行标签或列标签后添加指定后缀的方法DataFram…

长短期记忆网络 (LSTM) 详解:从原理到应用

一、引言&#xff1a;序列数据处理的挑战​ 在自然语言处理、语音识别、时间序列分析等领域&#xff0c;数据通常以序列形式存在&#xff0c;前后数据点之间存在依赖关系。传统循环神经网络 (RNN) 虽然能捕捉序列依赖&#xff0c;但存在严重的梯度消失 / 爆炸问题&#xff0c;…