上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 25 下一页

2025年2月11日

ts 基础指令和基础语法

摘要: 1. 安装 npm i typescript -g 2. 初始化生成tsconfig.json tsc -init 3. 监听ts文件并将ts文件转译多一份.js tsc -w const demo:string = 'demo' let v:void = undefined // let v1:v 阅读全文

posted @ 2025-02-11 23:52 ChoZ 阅读(95) 评论(0) 推荐(0)

nextTick

摘要: <template> <div style="height: 300px;width: 200px;border: 1px solid #000;overflow-y: auto;" ref="box"> <div v-for="item in chatList" :key="item" style 阅读全文

posted @ 2025-02-11 15:56 ChoZ 阅读(32) 评论(0) 推荐(0)

event Loop

摘要: <template> <div></div> </template> <script setup lang='ts'> // setTimeout是宏任务,promise是微任务,宏任务和微任务都是队列数据结构,为先进先出 // 事件循环的机制:同步代码先执行,然后处理微任务队列,接着是宏任务队列中 阅读全文

posted @ 2025-02-11 13:27 ChoZ 阅读(47) 评论(0) 推荐(0)

2025年2月10日

slotted()、style module、global、style v-bind

摘要: <template> <slotComponent> <template v-slot><div class="demo">789</div></template> </slotComponent> <h1 class="colorBlue">ref变量直接在style中通过v-bind使用</h1 阅读全文

posted @ 2025-02-10 19:19 ChoZ 阅读(28) 评论(0) 推荐(0)

scope、:deep()

摘要: <script setup lang="ts"> import HelloWorld from './components/HelloWorld.vue' </script> <template> <div> <a href="https://vite.dev" target="_blank"> < 阅读全文

posted @ 2025-02-10 18:22 ChoZ 阅读(43) 评论(0) 推荐(0)

插件编写

摘要: // 使用页面 <template> <div></div> </template> <script setup lang='ts'> import { ref, reactive } from 'vue' const app = getCurrentInstance() app?.proxy?.$ 阅读全文

posted @ 2025-02-10 14:47 ChoZ 阅读(41) 评论(0) 推荐(0)

全局变量和函数定义和使用

摘要: import { createApp } from 'vue' import './style.css' import App from './App.vue' import SelfComponent from './study/selfComponent/component.vue' impor 阅读全文

posted @ 2025-02-10 12:19 ChoZ 阅读(49) 评论(0) 推荐(0)

hook封装成库上传到npm库中,下载自己用

摘要: https://www.bilibili.com/video/BV1dS4y1y7vd?spm_id_from=333.788.videopod.episodes&vd_source=ce8f93194a63c57cca08d7e9eb10d3e5&p=41 阅读全文

posted @ 2025-02-10 11:46 ChoZ 阅读(30) 评论(0) 推荐(0)

2025年2月9日

hook:toBase64

摘要: <template> <img src="/src/assets/img/demo.png" alt="" width="500" height="600" id="image"> </template> <script setup lang='ts'> import usebase64 from 阅读全文

posted @ 2025-02-09 02:02 ChoZ 阅读(49) 评论(0) 推荐(0)

手写v-lazy指令

摘要: <template> <div v-for="item in arr" :key="item"> <img v-lazy="item" alt="" width="400" height="800"> </div> </template> <script setup lang='ts'> impor 阅读全文

posted @ 2025-02-09 01:09 ChoZ 阅读(82) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 25 下一页

导航