会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
王希有
越自律越自由,越努力越幸运
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
4
5
6
7
8
9
10
11
12
···
17
下一页
2021年8月5日
better-scroll2.0 及 react17 的 单页面 类组件 及 函数组件 使用
摘要: git https://gitee.com/mirrors/better-scroll/ 1.x 文档 https://better-scroll.github.io/docs-v1/doc/zh-hans/ 2.x文档 https://better-scroll.github.io/docs/zh
阅读全文
posted @ 2021-08-05 13:24 王希有
阅读(336)
评论(0)
推荐(0)
2021年8月4日
react 执行 yarn build ,无法直接打开dist文件下的index
摘要: 如果你使用create-react-app创建项目,执行命令 yarn build 后,直接以静态方式打开build文件夹内的index.html,会看到页面显示出现问题,打开console后会看到js、css、svg等文件的路径出现问题。 解释: 在打包之前,在 package.json 中 pr
阅读全文
posted @ 2021-08-04 14:07 王希有
阅读(4066)
评论(0)
推荐(0)
2021年8月2日
react-redux 持久数据存储
摘要: 1、 npm i redux-persist --save 2、store/index import { createStore, combineReducers } from 'redux'; import reducers from './reducers/index'; import {per
阅读全文
posted @ 2021-08-02 11:24 王希有
阅读(335)
评论(0)
推荐(0)
2021年7月28日
document.body.removeChild 获取到 symbol 标签
摘要: 在做全局loading时,出现的问题,使用 antd-mobile 中 Icon 组件,导致 loading组件无法关闭的问题, loading.jsx import React from 'react'; import ReactDOM from 'react-dom'; import { Ico
阅读全文
posted @ 2021-07-28 14:39 王希有
阅读(1262)
评论(0)
推荐(0)
2021年7月27日
react嵌套路由,并设置默认子路由
摘要: 弄了好长时间,记得之前写的时候没问题呀,现在不知道哪里出现问题,后来才发现 是 exact 和 跳转子路由 路径的问题,哎 App.js import React, {lazy, Suspense} from "react"; import { Switch, Route } from 'react
阅读全文
posted @ 2021-07-27 16:39 王希有
阅读(2839)
评论(0)
推荐(0)
2021年7月7日
js 根据出生日期年月日 计算年龄
摘要: 1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <meta charset="utf-8"> 6 <title></title> 7 </head> 8 9 <body> 10 <h1></h1> 11 </body> 12 13 </html> 14 <script
阅读全文
posted @ 2021-07-07 09:50 王希有
阅读(1648)
评论(0)
推荐(0)
js 实现新手引导页 思路
摘要: 原创 <!DOCTYPE html> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <meta charset="utf-8"> <meta content="width=devic
阅读全文
posted @ 2021-07-07 09:38 王希有
阅读(735)
评论(1)
推荐(0)
2021年6月28日
解决input时,中文及拼音问题
摘要: compositionstart:compositionstart事件触发于一段文字的输入之前(类似于 keydown 事件,但是该事件仅在若干可见字符的输入之前,而这些可见字符的输入可能需要一连串的键盘操作、语音识别或者点击输入法的备选词)。compositionend:当文本段落的组成完成或取消
阅读全文
posted @ 2021-06-28 11:07 王希有
阅读(515)
评论(0)
推荐(0)
2021年6月24日
React.forwardRef 理解
摘要: React.forwardRef 会创建一个React组件,这个组件能够将其接受的 ref 属性转发到其组件树下的另一个组件中。这种技术并不常见,但在以下两种场景中特别有用: 官方解释: https://react.docschina.org/docs/forwarding-refs.html#fo
阅读全文
posted @ 2021-06-24 13:49 王希有
阅读(2845)
评论(0)
推荐(0)
2021年6月23日
React.Children详解 及实现步骤条
摘要: 官方: https://react.docschina.org/docs/react-api.html#reactcomponent 其他博主: React.Children提供了处理this.props.children的工具,this.props.children可以任何数据(组件、字符串、函数
阅读全文
posted @ 2021-06-23 14:29 王希有
阅读(1126)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
···
17
下一页
公告