当前位置:网站首页>5.20今日学习
5.20今日学习
2022-08-02 03:23:00 【Ww597】
1.删除对象中的某一个属性

2. 路由的懒加载:当打包构建应用时,JavaScript 包会变得非常大,影响页面加载。如果我们能把不同路由对应的组件分割成不同的代码块,然后当路由被访问的时候才加载对应组件,这样就会更加高效。
(1)const 组件名 = ( ) => import(‘组件路径’)
(2)const 组件名 = resolve => require([‘组件路径’],resolve)


3.keep-alive生命周期
如果需要频繁切换路由,这个时候就可以考虑用keep-alive了,来达到避免数据的重复请求的目的 keep-alive用来缓存组件,避免多次加载相应的组件,减少性能消耗。



只有组件被 keep-alive 包裹时,这两个生命周期函数才会被调用(activated,deactivated)
activated: 进入当前存在activated()函数的页面时,一进入页面就触发;可用于初始化页面数据
deactivated: 当离开组件时,停止使用时调用,可清楚定时器
4. query和params的区别
https://blog.csdn.net/m0_46217225/article/details/119808510
params 更类似于post 在浏览器地址栏中不显示参数 params传值一刷新就没了
query 更类似于get 在浏览器地址栏中显示参数 params传值一刷新还在

4.关闭语法检查


5. ECharts
(1)Legend 要和数据的name对应才能显示

(2)x轴显示不全:

(3)应该在接口请求成功后渲染图表

6.wangEditor 富文本编辑器
(1) npm install @wangeditor/editor-for-vue --save

(2)
(3)
例子:




7.el-form
Scope是整个表单数据, Scope.row是当前行的数据,
要让form表单对齐 可以label-width写大 在加一个text-align:right

8.el-menu二级菜单,二级菜单路由配置好不显示,应该在上级路由写上
<router-view></router-view>

8.应该将公共样式写在一个.css/.less文件中在main.js引入


边栏推荐
猜你喜欢

Debian 10 NTP 服务配置

C语言 十六进制整数字符串转十进制整数

Scientific research reagent DMPE-PEG-Mal dimyristoylphosphatidylethanolamine-polyethylene glycol-maleimide

利用 nucleo stm32 f767zi 进行USART+DMA+PWM输入模式 CUBE配置

Error in render: “TypeError: Cannot read properties of null (reading ‘0‘)“ 报错解决方案

【手把手带你学nRF52832/nRF52840 · (1)开发环境搭建】

oracle inner join and outer join

require模块化语法

【 application 】 life many years of operations, what turned scored 12 k + annual bonus salary?

URL module
随机推荐
AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘
querystring模块
微信小程序实现文本安全监测
UserWarning:火炬。meshgrid:在以后的版本中,它将被要求通过索引ing argu
页面加载流程
A senior test engineer asked me these questions as soon as the interview came
最新,每天填坑,Jeston TX1 精卫填坑,第一步:刷机
oracle内连接和外连接
Questions about your resume
Living to detect the Adaptive Normalized Representation Learning for GeneralizableFace Anti - Spoofing reading notes
display,visibility,opacity
Phospholipid-polyethylene glycol-hydrazide, DSPE-PEG-Hydrazide, DSPE-PEG-HZ, MW: 5000
动态代理工具类
Debian 10 NTP 服务配置
Advanced gradient of skeleton effect, suitable for waiting for pictures
第一篇博客
---静态页面---
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the index ing argu
L1-039 古风排版(C)