摘要: 1 fetch和axios axios与fetch实现数据请求 (1)fetch(不是所有浏览器都支持,谷歌浏览器支持)XMLHttpRequest 是一个设计粗糙的 API,配置和调用方式非常混乱,而且基于事件的异步模型写起来不友好。 兼容性不好 2 axios的引入 <script src="h 阅读全文
posted @ 2022-02-11 23:18 甜甜de微笑 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1 钩子函数 create let vm = new Vue() mount 挂载,把div挂载到组件中 update let vm = new Vue({ el: '#box', data: { isShow: true // 修改这个内容 }, methods: { handleClick() 阅读全文
posted @ 2022-02-11 22:13 甜甜de微笑 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 1 setInterval 2 setTimeout 3 关掉定时器 1 setInterval 定时任务 每隔3s执行一次 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <sc 阅读全文
posted @ 2022-02-11 21:39 甜甜de微笑 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 一:生命周期图 1.官网原图 2.我理解的图 阅读全文
posted @ 2022-02-11 21:28 甜甜de微笑 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 1 v-model 之 lazy、number、trim lazy:等待input框的数据绑定时区焦点之后再变化,(懒加载)number:数字开头,只保留数字,后面的字母不保留;字母开头,都保留trim:去除首位的空格 2 lazy、number、trim <!DOCTYPE html> <html 阅读全文
posted @ 2022-02-11 21:00 甜甜de微笑 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1 checkbox 如果只有一个checkbox,绑定的值就是true和false <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="https://cd 阅读全文
posted @ 2022-02-11 20:48 甜甜de微笑 阅读(58) 评论(0) 推荐(0) 编辑