Files
ClassContent/历届学生/front-end-team/项目练习/学生项目/陆旗/笔记
2024-09-27 02:06:13 +08:00

69 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

parseint :取整
math.raddom:数学函数随机数
appendChild:创建虚拟文件夹
setTimeout:在一定时间内执行一次代码,只会执行一次
setInterval:在一定时间执行一次代码 setInterval(function () {事件}, 1000)
clearInterval:清除定时器
transition :平滑过度
removechlid:删除文件
onclick:点击事件
document.querySelectorAll(''):获取所有标签
substring(开始,结束) 裁剪字符串 substring()+'...'
push :追加数组数据,排在最后面
unshift:追加数组数据,排在最前面
通过 for循环获取数组里面的数据(小于数组长度length) 要知道数组的下标 和数组搭配使用
<br/>换行
反引号`变量字符串拼接` ` ${变量名}`
object 对象 值 value 和 for in 循环搭配用 for (var key in obj) {}
对象里面新增数据:obj.test='' 删除 delete
parseInt 提取字符串里面的数字
return false 组织浏览器默认事件
select 下拉菜单
replace (旧的,新的)
indexof 搜索下标 includes
event 点击运行事件
autoplay muted 静音播放
typeof 变量名 求数组类型
json.stringify 把对象或者数组转换成字符串
json.parse 把字符串转化成对象
throw 显示报错
ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;//超过部分隐藏
forearch :只能能够用于数组
require 导入
module.exports 导出
axios 发送ajax请求
user-select: none; 禁止选中
cursor: pointer; 手型鼠标
order 改变顺序
overflow 滑动
route-link :用name跳转加地址
深度选择器: /deep/
组件内部必须是一个方法
component 全局组件 , template 里面存放html 代码 default:'默认参数' type :校验参数 string (字符串) number (数字)Arry (数组 )
写两个html分别用 在父组件引用然掉接口在config index.js里面 在servic掉接口
在父组件里面创造生命周期和方法methods() {里面传参数},
父组件拿到参数数据定义变量,子组件接受 父传子用props 接收 传出arry数组用 () =>[]
写for循环必须写key
router-link 自动渲染a标签
to进入详请页面带名字和地址 to="{ name : 页面,query: "url:地址"}"
进路由
通过地址栏访问的页面都需要缓存在appvue里面 keep-alive
决定哪些页面是否需要登录在 路由 里面用meta:{keepalive:true/false}
在appvue里面做判断
所有详情页面不做缓存
vue 重复跳转相同路由用key="$route.fullpath" 在appvue里面 router -view