摘要: vue3的父子组件生命周期的执行顺序 father setup -> father onBeforeMount -> child setup -> child onBeforeMount -> child onMounted -> father onMounted vue2的父子组件生命周期的执行顺 阅读全文
posted @ 2023-05-05 19:00 丿流水 阅读(216) 评论(0) 推荐(0)
摘要: 声明:以下是vue3设置方式,vue2一样 第一步 createRouter({ // router-line-active 可以自定义别的名字,随便 linkActiveClass: 'router-line-active', history: createWebHistory(), routes 阅读全文
posted @ 2023-04-09 10:29 丿流水 阅读(298) 评论(0) 推荐(0)
摘要: 冒泡排序 原理:数组中的数据前后两两进行对比,如果后面一个数据小于前面一个则进行交换。 /** * 冒泡排序 * @param {array} arr */ function bubbleSort ( arr = [] ) { const length = arr.length for ( let 阅读全文
posted @ 2023-03-13 15:28 丿流水 阅读(57) 评论(0) 推荐(0)
摘要: 开启严格模式 特点 全局变量必须先声明 禁止使用with 创建eval作用域 禁止this指向window 函数参数不能重名 阅读全文
posted @ 2023-03-09 20:57 丿流水 阅读(18) 评论(0) 推荐(0)
摘要: props和$emit 自定义事件 $attr $parent $refs provide/inject Vuex 阅读全文
posted @ 2023-03-09 16:11 丿流水 阅读(13) 评论(0) 推荐(0)
摘要: 三次握手——建立连接 Clien发包,Server接收。Server:有Client要找我 Server发包,Client接收。Client:Server已经收到信息了 Client发包,Server接收。Server:Client要准备发送了 四次挥手——关闭连接 Client发包,Server接 阅读全文
posted @ 2023-03-09 15:42 丿流水 阅读(52) 评论(0) 推荐(0)
摘要: <body> <div class="box box1">box1</div> <div class="box box2">box2</div> <div class="box box3">box3</div> </body> .box1 { width: 10vw; height: 10vh; } 阅读全文
posted @ 2023-03-09 15:15 丿流水 阅读(45) 评论(0) 推荐(0)
摘要: <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico" /> --> <!-- 禁用 favicon.ico --> <link rel="icon" href="data:;base64,="> 阅读全文
posted @ 2022-10-20 18:07 丿流水 阅读(872) 评论(0) 推荐(0)
摘要: let object = {} let obj = { ...object, ...( true && { add: 'new attr' } ) } console.log(obj) // { add: 'new attr' } 阅读全文
posted @ 2022-10-20 16:30 丿流水 阅读(20) 评论(0) 推荐(0)
摘要: 控制台打印object默认是收缩的,需要一个个点开看 如果数据不是很多,可以使用JSON.stringify函数打印json格式数据。 console.log(JSON.stringify(object, null, '\t')) 或者 console.log(JSON.stringify(obje 阅读全文
posted @ 2022-10-20 11:25 丿流水 阅读(397) 评论(0) 推荐(0)