朱丽叶

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

06 2022 档案

vue3 + Ts中赋值组件之间的双向绑定
摘要:// 父组件 /** * <tables v-model="dataPagination"></tables> * 自定义组件上的 v-model 相当于传递了 modelValue prop * 接收抛出的 update:modelValue 事件: * * * 若需要更改 model 的名称,现 阅读全文

posted @ 2022-06-27 00:09 朱丽叶 阅读(1151) 评论(0) 推荐(0) 编辑

vue3+Ts prop的基本使用
摘要:<script lang="ts" setup> // 定义需要传入的props类型 interface PropsType { optins?: opertionBtns[] name: string } // 导入withDefaults父默认值 import { withDefaults } 阅读全文

posted @ 2022-06-23 00:22 朱丽叶 阅读(1784) 评论(0) 推荐(0) 编辑

Vue3通过ref方式获取子组件的属性与方法
摘要:// 父组件 <template> <update-password ref="updatePwd"></update-password> </template> <script lang="ts" setup> import updatePassword from '@/components/up 阅读全文

posted @ 2022-06-17 00:38 朱丽叶 阅读(3421) 评论(0) 推荐(0) 编辑

Vue+Vite动态注册组件
摘要:// Vite 支持使用特殊的 import.meta.glob 函数从文件系统导入多个模(导入views文件夹下的所有文件) export const modules = import.meta.glob('../views/**/**.vue') // 在需要动态添加组件的时候 const ro 阅读全文

posted @ 2022-06-14 23:49 朱丽叶 阅读(486) 评论(0) 推荐(0) 编辑

Vite+Vue3设置路径别名
摘要:// 1.vite.config.js文件添加 import path from 'path' // 如果引入的时候报错则需要 npm install --save-dev @types/node resolve: { alias: { '@': path.resolve(__dirname, 's 阅读全文

posted @ 2022-06-12 09:44 朱丽叶 阅读(542) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示