摘要: 一. react项目搭建 技术点: React + antd + typescript 创建项目: yarn create react-app myapp 引入antd: yarn add antd 引入typescript yarn add typescript @types/node @type 阅读全文
posted @ 2021-08-04 15:14 小L同学 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 一. PC适配问题 下载插件 npm install -S lib-flexible (可以使用rem作为单位,在根元素html上设置font-size) npm install -D postcss-px2rem (编译运行或者打包时,项目中的px,转换为rem) 修改node_modules中 阅读全文
posted @ 2021-08-04 15:08 小L同学 阅读(74) 评论(0) 推荐(1) 编辑
摘要: 问题总结 上周开发遇到了一个问题 表象: ​ 通过数组循环生成一个组件列表,在第一个组件写入数据之后,当在数组首位添加一个数据的时候,发现之前首位组件的数据,被渲染到了,新添加的首位组件上。并且之前的首位组件,数据也被清空。 原因: 和组件的Key相关,v-for指令渲染时,会通过key值,进行数据 阅读全文
posted @ 2021-08-04 15:06 小L同学 阅读(28) 评论(0) 推荐(0) 编辑