上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页
摘要: Renders the first child <Route> or <Redirect> that matches the location. If the URL is /about, then <About>, <User>, and <NoMatch> will all render bec 阅读全文
posted @ 2021-08-24 11:54 Redchar 阅读(158) 评论(0) 推荐(0) 编辑
摘要: mobx-react中Provider和inject通过context将store注入并使得任何层级的子组件可以访问到store 创建store后在根组件通过Provider组件注入 // App.jsx import React from "react"; import { render } fr 阅读全文
posted @ 2021-08-24 11:20 Redchar 阅读(440) 评论(0) 推荐(0) 编辑
摘要: React.lazy() 允许你定义一个动态加载的组件。这有助于缩减 bundle 的体积,并延迟加载在初次渲染时未用到的组件。 渲染 lazy 组件依赖该组件渲染树上层的 <React.Suspense> 组件。 React.Suspense 可以指定加载指示器(loading indicator 阅读全文
posted @ 2021-08-24 11:13 Redchar 阅读(75) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/xulei1992/p/15176992.html https://segmentfault.com/a/1190000038956767 tsdx.config.js const postcss = require('rollup-plugin-po 阅读全文
posted @ 2021-08-23 17:49 Redchar 阅读(1968) 评论(0) 推荐(0) 编辑
摘要: // tsdx.config.js const images = require('@rollup/plugin-image'); module.exports = { rollup(config, options) { config.plugins = [ images({ include: [' 阅读全文
posted @ 2021-08-23 17:48 Redchar 阅读(465) 评论(0) 推荐(0) 编辑
摘要: npm link是一种把包链接到包文件夹的方式,即:可以在不发布npm模块的情况下,调试该模块,并且修改模块后会实时生效,不需要通过npm install进行安装 模块和项目在同一目录下 $ npm link ../module 模块和项目不在同一目录下 $ # 先去到模块目录,把它 link 到全 阅读全文
posted @ 2021-08-23 16:36 Redchar 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 检查package.json或者npm link时是否正确,更改后删掉node_modules重新安装 阅读全文
posted @ 2021-08-23 16:35 Redchar 阅读(499) 评论(0) 推荐(0) 编辑
摘要: 此语法需要名为 "__spreadArray" 的导入帮助器 安装最新版tslib即可 阅读全文
posted @ 2021-08-20 14:50 Redchar 阅读(3064) 评论(0) 推荐(0) 编辑
摘要: declare module "*.png" 阅读全文
posted @ 2021-08-19 17:01 Redchar 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 如前文所示,在对应的index.d.ts/index.d.tsx中添加如下代码: interface Function { _toFixed(params: any): void; } Function.prototype._toFixed = function(params: any) { thi 阅读全文
posted @ 2021-08-19 14:29 Redchar 阅读(2224) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页