当前位置:网站首页>抖音实战~评论数量同步更新
抖音实战~评论数量同步更新
2022-07-04 21:38:00 【gblfy】

一、快速入门
1. 子组件
<view @click='childBackHome'></view>
2. 父组件
父组件说明:
backHome :事件为子组件回调的方法,需要和子组件会调方法一致即可,可以自定义
back:自定义方法;需要在父组件的 methods: {}方法区中定义back方法,作为回调方法处理
<dev @backHome='back'></dev>
3. 子组件回调父页面
子组件
methods: {
childBackHome(){
this.$emit("backHome",e); //backHome父组件的方法,e要传递的参数
}
}
4. 父组件接收回调
父组件中,子组件回调的方法名
back(e){
console.log(e) //e是传过来的参数val
}
5. 组件调用流程
子组件也可以理解为公共组件,供其他父页面引入,达到公共页面或者逻辑抽取的效果
组件调用流程
- 1.父组件引入子组件
- 2.父组件传参子组件
- 3.子组件接收参数
- 4.执行处理
- 5.处理完成将结果回传父组件
- 6.父组件接收子组件回传结果
- 7.父组件继续执行以后的处理
二、抖音评论数量
2.1. 流程图

2.2. 流程简述
- 短视频页面点击评论图标
- 进入评论窗口
- 选择新增评论
- 回复评论
- 输入评论内容
- 提交评论内容
- 评论内容置顶
- 评论窗口评论数量更新
- 短视频页面评论数量更新
2.3. 流程图效果图鉴赏




边栏推荐
- Flutter TextField示例
- GTEST from ignorance to skillful use (1) GTEST installation
- 1807. 替换字符串中的括号内容
- 湘江鲲鹏加入昇腾万里伙伴计划,与华为续写合作新篇章
- Delphi SOAP WebService 服务器端多个 SoapDataModule 实现相同的接口方法,接口继承
- How is the entered query SQL statement executed?
- How was MP3 born?
- Master the use of auto analyze in data warehouse
- 机器人相关课程考核材料归档实施细则2022版本
- Bizchart+slider to realize grouping histogram
猜你喜欢

Application practice | Shuhai supply chain construction of data center based on Apache Doris

i.MX6ULL驱动开发 | 24 - 基于platform平台驱动模型点亮LED
![[C language] deep understanding of symbols](/img/4b/26cf10baa29eeff08101dcbbb673a2.png)
[C language] deep understanding of symbols

How to implement Devops with automatic tools

Keep on fighting! The city chain technology digital summit was grandly held in Chongqing

Cloudcompare & open3d DBSCAN clustering (non plug-in)

How to use concurrentlinkedqueue as a cache queue

Why do you have to be familiar with industry and enterprise business when doing Bi development?

玩转gRPC—深入概念与原理

迷失在Mysql的锁世界
随机推荐
GTEST from ignorance to proficient use (2) what is test fixture
能源势动:电力行业的碳中和该如何实现?
[advanced C language] array & pointer & array written test questions
【LeetCode】17、电话号码的字母组合
new IntersectionObserver 使用笔记
Interpreting the development of various intelligent organizations in maker Education
Flutter TextField示例
Telephone encryption, middle 4 is replaced by * * * *
How to remove the black dot in front of the title in word document
Drop down selection of Ehlib database records
vim 从嫌弃到依赖(23)——最后的闲扯
湘江鲲鹏加入昇腾万里伙伴计划,与华为续写合作新篇章
Use of class methods and class variables
面试题 01.01. 判定字符是否唯一
Analyzing the maker space contained in steam Education
Cadre WebGIS - kalrry
Flutter 返回按钮的监听
广电五舟与华为签署合作协议,共同推进昇腾AI产业持续发展
How is the entered query SQL statement executed?
1807. Replace the parentheses in the string