随笔分类 -  前端

摘要:一、跨层级传递 import { useContext, createContext, useState } from "react" const msgContext = createContext() function A(){ const m = useContext(msgContext) 阅读全文
posted @ 2025-12-19 10:58 东方不败--Never 阅读(2) 评论(0) 推荐(0)
摘要:使用说明 注册小程序 https://mp.weixin.qq.com/ 下载小程序编辑器 https://developers.weixin.qq.com/miniprogram/dev/devtools/stable.html 截流、分页、loading // pages/shoplist/sh 阅读全文
posted @ 2025-11-25 21:32 东方不败--Never 阅读(6) 评论(0) 推荐(0)
摘要:01.js // npm i express@4.17.1 // npm i -g nodemon // nodemon xx.js const express = require('express') const app = express() app.listen(3000,()=>{ cons 阅读全文
posted @ 2025-10-23 19:07 东方不败--Never 阅读(11) 评论(0) 推荐(0)
摘要:// 防抖函数,频繁操作,只执行最后一次操作 function xx(fun,t){ let timer return function(){ if(timer){ clearTimeout(timer) } timer=setTimeout(function(){fun()},t) } } // 阅读全文
posted @ 2025-10-16 11:23 东方不败--Never 阅读(11) 评论(0) 推荐(0)
摘要:1 <!DOCTYPE html> 2 <html> 3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 5 <head> 6 <title>I love you</title> 7 </head> 8 阅读全文
posted @ 2024-08-15 10:04 东方不败--Never 阅读(162) 评论(0) 推荐(0)
摘要:背景 一台电脑运行了多个不同版本的vue 项目,而这些项目用的 node 的版本不一样,该如何配置? 1、下载 nvm ,进行多个版本 node 控制 https://blog.csdn.net/u012903034/article/details/139899184 删除不用的node,会出现不让 阅读全文
posted @ 2024-07-12 16:50 东方不败--Never 阅读(297) 评论(0) 推荐(0)
摘要:vue2.js 下载地址:https://unpkg.com/vue@2.2.1/dist/vue.js vue-router.js 下载地址:https://unpkg.com/vue-router@3.5.3/dist/vue-router.js es6:https://es6.ruanyife 阅读全文
posted @ 2021-12-19 09:21 东方不败--Never 阅读(81) 评论(0) 推荐(0)