摘要: var body = document.body; body.addEventListener("click", async function () { var stream = await navigator.mediaDevices.getDisplayMedia({ video: true } 阅读全文
posted @ 2022-11-22 15:09 银河游鱼 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 1、设置淘宝镜像源: npm config set registry https://registry.npmmirror.com/ 2、查看当前镜像源: npm config get registry 3、设置官方镜像源: npm config set registry https://regis 阅读全文
posted @ 2022-11-13 17:03 银河游鱼 阅读(8) 评论(0) 推荐(0) 编辑
摘要: nvm ls :列出所有已安装的 node 版本 nvm ls-remote :列出所有远程服务器的版本(官方node version list) nvm list :列出所有已安装的 node 版本 nvm list available :显示所有可下载的版本 nvm install stable 阅读全文
posted @ 2022-11-13 16:37 银河游鱼 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1.使用npm安装: npm init @vitejs/app 如果遇到报错请使用下面的命令 npm install -g create-vite-app 2.使用vite创建vue3项目: npm init vite-app projectName 3.安装依赖,运行项目: cd projectN 阅读全文
posted @ 2022-09-27 16:09 银河游鱼 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 1.异步组件使用场景:vue为单页面应用,同步加载大量的页面代码会导致页面长时间处于空白情况。 <template> <div id="center"> <span>我是主体内容部分</span> <Suspense> <template #default> <C></C> </template> 阅读全文
posted @ 2022-07-25 18:08 银河游鱼 阅读(908) 评论(0) 推荐(0) 编辑
摘要: 1.默认插槽的使用: 子组件: <template> <div class="a"> <div>我是A子组件</div> <slot></slot> </div> </template> <script setup lang="ts"> import { ref } from 'vue'; </sc 阅读全文
posted @ 2022-07-22 16:44 银河游鱼 阅读(579) 评论(0) 推荐(0) 编辑
摘要: <template> <Headler></Headler> <div class="content"> <Menu ref="menus"></Menu> <Content></Content> </div> </template> <script setup lang="ts"> import 阅读全文
posted @ 2022-07-21 15:34 银河游鱼 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 子组件: <template> <div>我是左侧内容<button @click="handleClick">向父组件派送数据</button></div> </template> <script setup lang="ts"> import { ref, reactive } from 'vu 阅读全文
posted @ 2022-07-21 14:50 银河游鱼 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 父组件: <template> <Headler title="我是父组件传递的值" :list="list"></Headler> <div class="content"> <Menu></Menu> <Content></Content> </div> </template> <script 阅读全文
posted @ 2022-07-20 17:47 银河游鱼 阅读(897) 评论(0) 推荐(0) 编辑
摘要: <template> <div>{{ obj.name }}</div> <div>{{ obj.age }}</div> </template> <script setup lang="ts"> import { ref, reactive, onBeforeMount, onMounted, o 阅读全文
posted @ 2022-07-15 17:25 银河游鱼 阅读(38) 评论(0) 推荐(0) 编辑