摘要: import React from 'react'; import { Link }from 'react-router-dom'; import { Breadcrumb } from 'antd'; //具体导航的名称 const breadcrumbNameMap = { '/user':'用户管理', '/user/user_info':'用户信息', '/u... 阅读全文
posted @ 2019-02-23 15:23 小九_66 阅读(11702) 评论(2) 推荐(0) 编辑
摘要: 1.react中路由跳转后页面不置顶问题 问题: 从页面A跳转到页面B,页面A滚动到中间位置,跳转后页面B也会在中间位置 解决方法:在顶部组件的生命周期中进行判断,例如 componentWillReceiveProps(nextProps){ //当路由切换到新页面时置顶 if(this.prop 阅读全文
posted @ 2019-02-23 15:08 小九_66 阅读(2310) 评论(0) 推荐(0) 编辑
摘要: var str= "json字符串"; str=str.replace(/\\/g,"\\\\"); str=str.replace(/\n/g,"\\n"); str=str.replace(/\r/g,"\\r"); str=str.replace(/\t/g,"\\t"); str=str.r 阅读全文
posted @ 2019-01-03 15:58 小九_66 阅读(5672) 评论(1) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-12-14 14:34 小九_66 阅读(114) 评论(1) 推荐(0) 编辑
摘要: position的属性有哪些? { position: static; position: relative; position: absolute; position: fixed; position: inherit; position: initial; position: unset; } 阅读全文
posted @ 2018-10-17 11:50 小九_66 阅读(5958) 评论(0) 推荐(0) 编辑
摘要: 原因:不支持ES6,无法使用promise 解决办法: 1.安装 es6-promise cnpm install es6-promise --save-dev 2.引入 es6-promise import promise from 'es6-promise' 3.注册 es6-promise , 阅读全文
posted @ 2018-09-28 17:38 小九_66 阅读(1958) 评论(0) 推荐(0) 编辑
摘要: 要先npm安装jQuery插件哦 window.$=$; window.jQuery=$; 要先npm安装jQuery插件哦 window.$=$; window.jQuery=$; function loadJs(Url,callback){ var Nscript=document.create 阅读全文
posted @ 2018-08-31 16:53 小九_66 阅读(766) 评论(0) 推荐(0) 编辑
摘要: <div class="footer" @click="returnTop"> methods:{ returnTop:function(){ document.querySelector("#header").scrollIntoView(true); } } document.querySele 阅读全文
posted @ 2018-07-13 14:35 小九_66 阅读(570) 评论(0) 推荐(0) 编辑