摘要: 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:15 亦茫茫 阅读(6) 评论(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 亦茫茫 阅读(261) 评论(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 亦茫茫 阅读(650) 评论(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 亦茫茫 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 如果接口请求存在跨域问题且后端暂没时间解决,可以通过vue-cli配置代理的方式解决: .env.development中设置VUE_APP_BASE_API = Local Local为该项目运行时的服务器地址, vue.config.js中设置devServer:{proxy:'接口地址的公共部 阅读全文
posted @ 2023-01-06 12:35 亦茫茫 阅读(1019) 评论(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:46 亦茫茫 阅读(66) 评论(0) 推荐(0) 编辑
摘要: <div>1. <img src="" alt="" _src='https://t7.baidu.com/it/u=2621658848,3952322712&fm=193&f=GIF'></div> <div>2. <img src="" alt="" _src='https://t7.baid 阅读全文
posted @ 2022-10-21 17:26 亦茫茫 阅读(20) 评论(0) 推荐(0) 编辑
摘要: href的不同url值的区别 <a href="www.baidu.com">click me</a> //此种情况,会默认在地址前添加,当前页面的路径,拼接成如: http://127.0.0.1:5500/demo/www.baidu.com <a href="/www.baidu.com">c 阅读全文
posted @ 2022-08-11 10:52 亦茫茫 阅读(25) 评论(0) 推荐(0) 编辑
摘要: { "compilerOptions": { "module": "es2015", "target": "es2015", "sourceMap": true, //用来指定编译后的文件所在的目录 "outDir": "./dist", //将代码合并为一个文件 //"outFile": "./d 阅读全文
posted @ 2022-07-27 17:11 亦茫茫 阅读(21) 评论(0) 推荐(0) 编辑