
简介
该用户还未填写简介
擅长的技术栈
可提供的服务
暂无可提供的服务
1.比较常用的就是修改路由配置在path:"/xxx/:type" 这种类型{name: 'xxxx',text: 'xx',path: '/xxxx/:type',component: xx},这种类型的主要是详情页面等不在一级显示的页面中使用。2.第二种使用query 来实现,首先引入import { Link } from 'react-router-dom'然后在需要跳转的地方添加.
Warning: You cannot set a form field before rendering a field associated with the value. 报错问题解决方案

当我们在一个div 父级盒子有点击事件,子级也有点击事件时,不想点击子级事件触发父级事件就需要做阻止冒泡处理。import React, { useState} from 'react'function Model(){const clickShowModel=(event,props)=>{event.stopPropagation();}...
react redux 基础使用一。准备工作1.安装reduxnpm install --save redux2.安装react-reduxnpm install --save react-redux安装完毕之后在项目中创建store文件夹主要有三个JS文件,store,action,reducersstore.js主要是存放store仓库import {createStore} from 're
react 模态框 嵌套from 表单 关闭模态框清空表单值
1.安装npm install --save socket.io-client2.连接地址const socket = io.connect(socketUrl),depart_id=props.depart_id3.推送登录信息socket.on('connect',function(){socket.emit('login', depart_id)})4.使用约定好的方法socket.on('
这个功能通过比对li的下标来实现功能,通过设置isShow 比对index,来实现动态的className 渲染import React, { useState} from 'react'function Model(){const [isShow, setIshow] = useState(0)const listStatus = (item, index) ...
1.通过设置iconStatus取反来实现点击收藏,取消收藏的功能import React,{useState} from 'react'function Model(){const [icoStatus, setIcoStatus] = useState(true)//点击收藏按钮const iconSouCangData = (event, props) =...
在做一些数据进行推送告警的时候,chrome浏览器安全限制会屏蔽声音响应,解决办法可以使用react-audio-player 插件1.安装npm install --save react-audio-player2.使用import ReactAudioPlayer from 'react-audio-player';import sounds from '@/assets/audio/alar
出现这个问题的主要原因是在父组件里面没有给子组件传history在我们的父组件里面传递一个historyfunction MyModel(props) {return(<><ResultCardhistory={props.history}></R...







