2025年3月13日
摘要: Promise 上的方法分为 静态方法 和 实例方法 模拟一个Promise const createPromise = (delay, flag = true) => { return new Promise((resolve, reject) => { setTimeout(() => { // 阅读全文
posted @ 2025-03-13 18:19 贲风 阅读(1) 评论(0) 推荐(0) 编辑
  2025年3月10日
摘要: 感谢禹神,参考地址: https://www.bilibili.com/video/BV19n4y1d7Gr/?spm_id_from=333.337.search-card.all.click&vd_source=9f9e93fdd48179f56492874d4af8ba44 1. 购买一个服务 阅读全文
posted @ 2025-03-10 15:25 贲风 阅读(3) 评论(0) 推荐(0) 编辑
  2025年3月8日
摘要: 做一个大屏项目 mounted 函数中调用 echarts 生成函数 发现在方法中打印不到数据 undefied 将调用时机 由 mounted 改为watch 监听 生成ecahrt 对象时 可能会出现 元素未渲染 加判断 if(!pieDom2) return pieDom 即为 this.$r 阅读全文
posted @ 2025-03-08 13:27 贲风 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 变异方法会直接修改原数组,非变异方法则不会 变异方法: 1. push() 在数组末尾添加一个或多个元素,返回新数组的长度 let arr = [1,2,3] console.log('result', arr.push(4)) // result 4 2. pop() 移除数组的最后一个元素,返回 阅读全文
posted @ 2025-03-08 13:24 贲风 阅读(3) 评论(0) 推荐(0) 编辑
  2025年2月10日
摘要: 1. 请求路径 模块化 使用特征代表 /user、 /article 、 /cate 、 /role 2. 请求方式 GET 用于获取数据 POST 用于添加数据 PUT 用于修改数据(修改数据整个覆盖) PATCH 用于修改数据(修改数据个别参数) DELETE 用于删除数据 eg: https: 阅读全文
posted @ 2025-02-10 23:36 贲风 阅读(5) 评论(0) 推荐(0) 编辑
  2025年2月4日
摘要: 在vite.config.js/ts 中 export default defineConfig({ plugins: [ vue() ], resolve: { alias: { // 配置路径别名 使用@ 代替 ./src '@': fileURLToPath(new URL('./src', 阅读全文
posted @ 2025-02-04 22:18 贲风 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 在vite.conig.js/ts 中 1. fileURLToPath import { fileURLToPath } from 'url' export default defineConfig({ plugins: [ vue() ], resolve: { alias: { // 配置路径 阅读全文
posted @ 2025-02-04 22:16 贲风 阅读(81) 评论(0) 推荐(0) 编辑
  2025年1月24日
摘要: 1. 初始化项目 npm init -y 1.1 或者使用脚手架 npm install -g koa-generator 全局安装 【使用框架就无需执行其他命令 1/2/3.... 】 生成项目 koa2 <projectname> projectname即为项目名 这里可能需要再 package 阅读全文
posted @ 2025-01-24 01:02 贲风 阅读(84) 评论(0) 推荐(0) 编辑
  2025年1月2日
摘要: 当需要为 当前激活的 router-link 添加样式时 我通常会使用 router-link-active 本次复习重新学习了一下 router-link-active & router-link-exact-active router-link-active 当你多重嵌套路由时 嵌套的多个页面都 阅读全文
posted @ 2025-01-02 01:08 贲风 阅读(12) 评论(0) 推荐(0) 编辑
  2024年12月28日
摘要: animation 属性是 【animation-name】【animation-duration】【animation-timing-function】【animation-delay】【animation-iteration-count】【animation-direction】【animati 阅读全文
posted @ 2024-12-28 16:23 贲风 阅读(21) 评论(0) 推荐(0) 编辑