摘要: & 交叉类型 :数学当中的并集,| 联合类型:编程当中的“或”操作 阅读全文
posted @ 2024-07-22 11:32 亦茫茫 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 必须同时设置include和exclude,才能实现某些页面缓存,某些页面不缓存。且include、exclude中的名字数组为页面组件中defineOptions({name:''}) name设置的值<router-view v-slot="{ Component }"> <transition 阅读全文
posted @ 2024-04-29 20:43 亦茫茫 阅读(7) 评论(0) 推荐(0) 编辑
摘要: <div class="list-wrapper unique-container"> <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" class="list" @load="onLoad" 阅读全文
posted @ 2024-04-29 17:04 亦茫茫 阅读(102) 评论(0) 推荐(0) 编辑
摘要: fn() console.log(1); setTimeout(() => { console.log(4); }, 100); Promise.resolve().then(()=>{ console.log(2); }) console.log(3); function fnPromise(){ 阅读全文
posted @ 2023-10-20 13:14 亦茫茫 阅读(9) 评论(0) 推荐(0) 编辑
摘要: <style> .box{ display: flex; flex-direction: column; height: 100vh; overflow: hidden; //只要不是auto } .parent{ flex: 1; min-height: 0; //or height:0 } .c 阅读全文
posted @ 2023-10-11 14:19 亦茫茫 阅读(363) 评论(0) 推荐(0) 编辑
摘要: vite.config.js base 决定了打包后,资源引用的前缀 base:'/hlw/' link ref='/hlw/assets' 打包后的dist要放到 /hlw 路径下 base 的值 与 process.env.BASE_URL、import.meta.env.BASE_URL一致 阅读全文
posted @ 2023-10-11 11:03 亦茫茫 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: ``` setup() { const harmTypes = ref([{id: 1, harmName: '1'}]) function resData(){ harmTypes.value=[{id: 2, harmName: '2'}] } let filterHarmTypes = com 阅读全文
posted @ 2023-04-26 21:00 亦茫茫 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 如果接口请求存在跨域问题且后端暂没时间解决,可以通过vue-cli配置代理的方式解决: .env.development中设置VUE_APP_BASE_API = Local Local为该项目运行时的服务器地址, vue.config.js中设置devServer:{proxy:'接口地址的公共部 阅读全文
posted @ 2023-01-06 12:35 亦茫茫 阅读(1035) 评论(0) 推荐(0) 编辑
摘要: document.scrollingElement 属性返回文档的滚动元素。也就是说,当文档整体滚动时,到底是哪个元素在滚动。 document.activeElement 属性返回获得当前焦点(focus)的 DOM 元素。通常,这个属性返回的是<input>、<textarea>、<select 阅读全文
posted @ 2022-12-29 17:10 亦茫茫 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 1.beforeRouteEnter2.afterEach3.next()--beforeRouteEnter4.activated5.scrollBehavior6.next()--setTimeout--beforeRouteEnter 阅读全文
posted @ 2022-12-20 19:45 亦茫茫 阅读(68) 评论(0) 推荐(0) 编辑