会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
亦茫茫
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
···
9
下一页
2025年3月18日
render与createApp
摘要: import { h, render, ref } from 'vue' const msg = ref('hello2222') setTimeout(() => { msg.value = 'word' }, 2000) const vnode = () => <div>{msg.value}<
阅读全文
posted @ 2025-03-18 10:33 亦茫茫
阅读(47)
评论(0)
推荐(0)
2024年7月22日
ts 交叉类型与联合类型
摘要: & 交叉类型 :数学当中的并集,| 联合类型:编程当中的“或”操作
阅读全文
posted @ 2024-07-22 11:32 亦茫茫
阅读(41)
评论(0)
推荐(0)
2024年4月29日
vue keepalive缓存问题
摘要: 当同时设置include和exclude时,且有交集时,exclude优先级更高。include、exclude中的名字数组为页面组件中defineOptions({name:''}) name设置的值 <router-view v-slot="{ Component }"> <transition
阅读全文
posted @ 2024-04-29 20:44 亦茫茫
阅读(37)
评论(0)
推荐(0)
vant list组件使用
摘要: <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 亦茫茫
阅读(490)
评论(0)
推荐(0)
2023年10月20日
async函数执行机制
摘要: 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 亦茫茫
阅读(25)
评论(0)
推荐(0)
2023年10月11日
父元素flex:1 子元素height:100%
摘要: <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 亦茫茫
阅读(657)
评论(0)
推荐(0)
vite.config.js base 与 vue-router base
摘要: 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 亦茫茫
阅读(2041)
评论(0)
推荐(0)
2023年4月26日
vue3 ref、computed、watch...
摘要: ``` 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 亦茫茫
阅读(54)
评论(0)
推荐(0)
2023年1月6日
vue 配置代理
摘要: 如果接口请求存在跨域问题且后端暂没时间解决,可以通过vue-cli配置代理的方式解决: .env.development中设置VUE_APP_BASE_API = Local Local为该项目运行时的服务器地址, vue.config.js中设置devServer:{proxy:'接口地址的公共部
阅读全文
posted @ 2023-01-06 12:35 亦茫茫
阅读(1114)
评论(0)
推荐(0)
2022年12月29日
DOM
摘要: document.scrollingElement 属性返回文档的滚动元素。也就是说,当文档整体滚动时,到底是哪个元素在滚动。 document.activeElement 属性返回获得当前焦点(focus)的 DOM 元素。通常,这个属性返回的是<input>、<textarea>、<select
阅读全文
posted @ 2022-12-29 17:10 亦茫茫
阅读(98)
评论(0)
推荐(0)
1
2
3
4
5
···
9
下一页
公告