09 2022 档案

摘要:之前写的一个uniapp的项目,这段时间又看了一下,在打包的APP中发现webview打开显示空白(以前的时候没问题) 一开始以为是链接问题,跨域问题,总之就是各种尝试了 因为小程序上没问题,一开始没想到从webview的高度上出发 最后果然是高度问题(EMO~~~~) 最后给style设置动态高度 阅读全文
posted @ 2022-09-28 10:13 秃头的铲屎官 阅读(3197) 评论(0) 推荐(0) 编辑
摘要:第一步:执行以下命令: npm run eject 第二步:在package.json 中修改代码 "eslintConfig": { "extends": [ "react-app", "react-app/jest" ], "rules":{ "no-undef":"off" } }, 第三步: 阅读全文
posted @ 2022-09-13 15:50 秃头的铲屎官 阅读(1871) 评论(0) 推荐(0) 编辑
摘要:v5中的嵌套路由: 主页面v5中使用{this.props.children}来接收子页面 import React, { Component } from 'react'; export default class About extends Component { render() { retu 阅读全文
posted @ 2022-09-09 17:52 秃头的铲屎官 阅读(347) 评论(0) 推荐(0) 编辑
摘要:使用react中的router v6版本踩坑记录。 根据报错的意思提示大概就是要给路由提供一个上下文 一开始我的index.js是这样的: import React from 'react'; import ReactDOM from 'react-dom/client'; import './in 阅读全文
posted @ 2022-09-09 17:09 秃头的铲屎官 阅读(1547) 评论(0) 推荐(0) 编辑
摘要:使用Route报错:A <Route> is only ever to be used as the child of <Routes> element, never rendered directl 报错原因是react-router-dom依赖为6版本,需要使用6版本的写法 function r 阅读全文
posted @ 2022-09-09 17:02 秃头的铲屎官 阅读(475) 评论(0) 推荐(0) 编辑
摘要:在项目中,vuepress写文档说明时,加载element-ui报错 解决办法: npm install async-validator@1.11.5 阅读全文
posted @ 2022-09-07 14:37 秃头的铲屎官 阅读(211) 评论(0) 推荐(0) 编辑
摘要:原因是使用class定义组件的时候 component写成小写的,如下: class Page extends React.component 正确的应该是:(Component要大写) class Page extends React.Component 阅读全文
posted @ 2022-09-01 16:43 秃头的铲屎官 阅读(824) 评论(0) 推荐(0) 编辑

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