随笔分类 -  前端

摘要:### 父组件 ```html const stuRecordInfo = ref({ stuNum: 11111 }) // 接口请求返回 stuRecordInfo.value.stuNum = 22222 ``` ### 子组件 ```html const info = toRef(props 阅读全文
posted @ 2023-08-21 16:00 Better-HTQ 阅读(299) 评论(0) 推荐(0) 编辑
摘要:目录安装 nvm安装 node使用 Vite创建项目运行项目初始化 Git 仓库修改 vite 配置文件集成 EditorConfig 配置插件安装配置文件集成 Prettier 配置集成 ESLint 配置解决 ESlint 和 Prettier 冲突集成 stylelint1. 安装2. 配置 阅读全文
posted @ 2023-04-21 18:48 Better-HTQ 阅读(402) 评论(0) 推荐(0) 编辑
摘要:Vue2 // vue.config.js const path = require("path"); function addStyleResource(rule) { rule .use("style-resource") .loader("style-resources-loader") .o 阅读全文
posted @ 2023-04-19 14:07 Better-HTQ 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Initialization setup props and state Mounting componentWillMount render componentDidMount Updation props 发生变化 componentWillReceiveProps // 1.从父组件接收参数 阅读全文
posted @ 2023-02-24 17:34 Better-HTQ 阅读(14) 评论(0) 推荐(0) 编辑
摘要:全局安装脚手架 npm install -g create-react-app 创建项目 npx create-react-app my-app 运行项目 cd my-app npm start 阅读全文
posted @ 2023-02-19 16:09 Better-HTQ 阅读(16) 评论(0) 推荐(0) 编辑
摘要:函数柯里化(function currying)。currying 的概念最早由俄国数学家 Moses Schönfinkel 发明,而后由著名的数理逻辑学家 Haskell Curry 将其丰富和发展,currying 由此得名。 currying 又称部分求值。一个 currying 的函数首先 阅读全文
posted @ 2023-01-11 17:03 Better-HTQ 阅读(166) 评论(0) 推荐(0) 编辑
摘要:// 生成随机数 randomNum(max, min) { return parseInt(Math.random() * (max - min)) + min; }, // 生成随机颜色 randomColor(min, max) { let r = this.randomNum(min, ma 阅读全文
posted @ 2022-12-31 15:25 Better-HTQ 阅读(55) 评论(0) 推荐(0) 编辑
摘要:1. 滚动条相关的CSS伪元素 ::-webkit-scrollbar 滚动条整体部分 ::-webkit-scrollbar-button 滚动条两端的按钮 ::-webkit-scrollbar-track 外层轨道 ::-webkit-scrollbar-track-piece 内层轨道,滚动 阅读全文
posted @ 2022-12-14 17:37 Better-HTQ 阅读(843) 评论(0) 推荐(0) 编辑

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