随笔分类 -  react项目

摘要:npx create-react-app appName npm run eject npm i npm start浏览器肯定运行打包后的代码在运行,但用开发环境运行在本地看不到打包后的代码,在内存中进行生成打包文件,然后启动服务器i运行内存中的打包文件 npm run build 1.内存中生成打 阅读全文
posted @ 2019-12-21 20:33 燕子fly 阅读(131) 评论(0) 推荐(0)
摘要:1 <Table 2 columns={this.columns} 3 dataSource={products} 4 size="middle" 5 loading={loading} 6 pagination={{defaultPageSize:2}} 7 /> columns=[ { titl 阅读全文
posted @ 2019-11-13 16:20 燕子fly 阅读(679) 评论(0) 推荐(0)
摘要:<script> <Menu defaultSelectedKeys={['/home']} //数组类型 让那个key被选中 这个值不应该写死,应该根据路径确定 defaultOpenKeys={['sub1']} mode="inline" //菜单下拉方式 vertival theme="da 阅读全文
posted @ 2019-11-10 17:56 燕子fly 阅读(494) 评论(0) 推荐(0)
摘要:https://github.com/jgthms/minireset.css/blob/master/minireset.css 把里面内容复制粘贴放入public/css/reset.css 加入 html, body { width: 100%; height: 100%; } #root { 阅读全文
posted @ 2019-11-10 15:53 燕子fly 阅读(136) 评论(0) 推荐(0)
摘要:render里面要直接跳到某个页面要用return <Redirect to="/" /> 不用this.props.history.replace('/'); 因为render里面必定return this.props.history.replace用在点击回调事件里面 1.admin.js里面 阅读全文
posted @ 2019-11-10 14:52 燕子fly 阅读(448) 评论(0) 推荐(0)