当前位置:网站首页>[bug notes] mounted is executed only once under keepalive
[bug notes] mounted is executed only once under keepalive
2022-04-22 07:15:00 【sunshine641】
The title is the essence !
prospects :
Vue project , To fit the table size , stay Mounted use window.onresize Monitor window size , obtain document.body.clientHeight Value .( The question written before )
It's written in js In the document , By mixing in Mixins Introduction page .
Within the page Watch monitor clientHeight, To change the height of the table .
problem :
Open the page A after , Successfully monitored clientHeight Change in value , Then open a new page B Also no problem , from B return A after ,A You can't monitor clientHeight Has changed .
solve :
I thought it was window.onresize The problem of event registration , perhaps watch The problem of monitoring ( Try to add deep Deep monitoring ), Later, it was found that they were not , Check the life cycle .
because KeepAlive After cache ,Mounted Just once , The page is not destroyed and will not be executed every time you jump back mounted, should Put it in activated Inside That's all right. !
版权声明
本文为[sunshine641]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220609132133.html
边栏推荐
- Is it difficult to get started with self-study of Digital IC design? How to get started quickly?
- ASP.NET日常开发随手记------后台执行js脚本
- paging
- leetcode 打卡
- Nacos服务提供者注册
- Clion and dynamic link library
- RSS pit entry Guide
- What is the learning route of switching to digital IC Verification? Is there time to start turning now? 985 master's degree, second year of Graduate School of Electronics
- CLion和动态链接库
- Nacos persistent switch configuration
猜你喜欢

ParseException Unparseable date 时间转换异常

Nacos persistent switch configuration

Distributed task scheduling and computing framework: powerjob quick start (local ide version) 02

C#日常开发随手记----解决一个集合引用另一个集合导致一起改变

From spec. to chip_ (Digital IC, analog IC, FPGA / CPLD design process and EDA tools)

微信小程序 canvas 画简单的仪表盘 渐近色

用大写的字段接受最终首字母却变小写

.NET学习笔记----关于.NET Core那些事(1)【.netcore的项目结构、五种向页面传值的方式、Log4Net和NLog的使用】

Introduction to IC Analog Layout - learning notes on layout Basics (5)

Relationship between Nacos namespace grouping and dataid
随机推荐
Digital IC design, after learning Verilog syntax, what else do you need to learn?
ParseException Unparseable date 时间转换异常
What knowledge and skills need to be added to IC design?
VSCode打开小程序运行到微信开发者工具WXML 文件编译报错
Format control of format() method
【Bug小记】keepalive下mounted只执行一次
老程序员常逛的网站(持续更新)
[jeecg] modify VISER chart color style
用大写的字段接受最终首字母却变小写
完成一个学生信息管理系统,系统练习面向对象、函数、字符串等知识。实现知识的综合应用。 使用类、函数、数据库等来实现
SQLSERVER存储过程开发笔记----零碎问题以及关于操作文件的操作
. net learning notes - about Net core (3) [reading configuration files, general parsing JSON files, reading static files]
Methods and skills of fast reading papers
【Bug小记】页面刷新后获取不到sessionstorage数据
Use of Tencent cloud object storage service
Parseexception unparseable date time conversion exception
From spec. to chip_ (Digital IC, analog IC, FPGA / CPLD design process and EDA tools)
Leetcode punch in
定义类Shape作为父类,并在类中定义方法求周长和面积; (2)定义Shape子类圆形(circle),具有半径属性和常量PI,同时重写父类中的方法; (3)定义Shape子类长方形(rect
设计一个圆类(circle),内有私有成员radius代表半径, 函数get_radius( )用于获得半径、area( )用于计算圆的面积; (2)定义一个桌子类table,内有私有数据h