会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
市丸银
知行合一
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
18
19
20
21
22
23
24
25
26
···
98
下一页
2025年1月11日
npm i 报错
摘要: 1、安装nvm控制node版本 2、下载安装nvm https://nvm.uihtm.com/ 3、清缓存,删依赖,重新下载 npm cache clean --force rm -rf node_modules rm package-lock.json npm install
阅读全文
posted @ 2025-01-11 13:33 市丸银
阅读(44)
评论(0)
推荐(0)
2025年1月10日
Vue3 改变
摘要: 1、全局api Vue.config.xxx app.config.xxx Vue.component app.component Vue.directive app.directive Vue.mixin app.mixin Vue.use app.use Vue.prototype app.co
阅读全文
posted @ 2025-01-10 19:22 市丸银
阅读(39)
评论(0)
推荐(0)
Vue3 Suspense 异步组件<Suspense>
摘要: 1、异步引入组件 import { defineAsyncComponent } from 'vue'; const ChildData = defineAsyncComponent(() => import('./components/ChildData.vue')) 2、使用Suspense包裹
阅读全文
posted @ 2025-01-10 18:59 市丸银
阅读(60)
评论(0)
推荐(0)
Vue3 Teleport <Teleport to='位置'>
摘要: Teleport是一种能够将组件html结构移动到指定位置的技术 <template> <div> <button @click="isShow = true">弹窗</button> <Teleport v-if="isShow" to="body"> <div class="dialog"> <
阅读全文
posted @ 2025-01-10 18:33 市丸银
阅读(59)
评论(0)
推荐(0)
Vue3 响应式数据的判断
摘要: 1、isRef 2、isReactive 3、isReadonly 4、isProxy:检查一个对象是否由reactive或readonly方法创建代理
阅读全文
posted @ 2025-01-10 18:01 市丸银
阅读(40)
评论(0)
推荐(0)
Vue3 provide与inject 祖孙组件实现通信
摘要: 一、作用 祖孙组件实现通信 二、过程 父组件 provide()提供数据,后代组件inject()选项,开始使用这些数据 三、语法 1、祖组件 setup() { let car = reactive({ name: 'su7', print:30 }) provide('car',car) ret
阅读全文
posted @ 2025-01-10 17:06 市丸银
阅读(80)
评论(0)
推荐(0)
Vue3 customRef函数
摘要: 自定义ref <template> <input type="text" v-model="msg"> <h2>{{ msg }}</h2> </template> <script> import { customRef, ref } from 'vue'; export default { nam
阅读全文
posted @ 2025-01-10 16:30 市丸银
阅读(33)
评论(0)
推荐(0)
Vue3 toRaw函数和markRaw函数
摘要: 1、markRaw函数 作用:标记一个对象,使其永远不会成为响应式对象 应用场景: 有些值不值得被设置成响应式的。比如第三方库 当渲染具有不可变数据的大列表时,跳过响应式转换可以提高性能 2、toRaw函数 作用:把reactive响应式对象,变成普通对象 使用场景:用于读取响应式对象对应的普通对象
阅读全文
posted @ 2025-01-10 14:49 市丸银
阅读(265)
评论(0)
推荐(0)
Vue3 readyonly函数和shallowReadyonly函数
摘要: 1、readyonly:把响应式数据变成只读,深层次 2、shallowReadyonly:把响应式数据变成只读,浅层次 应用场景:不希望数据被修改
阅读全文
posted @ 2025-01-10 13:56 市丸银
阅读(32)
评论(0)
推荐(0)
Vue3 shallowRef函数和shallowReactive函数
摘要: 1、概念 轻量化的ref函数和reactive函数,只能进行一层响应式 2、对比 a、shallowRef和ref ref响应式的,可以是基本数据类型和对象,当是对象时,ref会借助reactive生产proxy,实现数据响应式 shallowRef,只能对基本数据类型进行响应式处理 b、shall
阅读全文
posted @ 2025-01-10 13:39 市丸银
阅读(84)
评论(0)
推荐(0)
上一页
1
···
18
19
20
21
22
23
24
25
26
···
98
下一页
公告