当前位置: 首页 > news >正文

建设银行网站用户注册不了电商网站建设 数商云

建设银行网站用户注册不了,电商网站建设 数商云,利用大平台做网站,做网站推广logoRefs含义 允许访问真实DOMReact数据流#xff1a;通过props来实现父子组件的交互Refs允许强制修改子组件 // 1. 构造器离添加实例属性 this.ref React.createRef() // 2. 组件上绑定ref ref{this.ref} // 3. 使用#xff1a;this.ref.currentinput class MyInput extends…Refs含义 允许访问真实DOMReact数据流通过props来实现父子组件的交互Refs允许强制修改子组件 // 1. 构造器离添加实例属性 this.ref React.createRef() // 2. 组件上绑定ref ref{this.ref} // 3. 使用this.ref.currentinput class MyInput extends React.Component {constructor(props) {super(props)this.inputRef React.createRef()}state {value: 123}// 聚焦 失焦inputFocus () {const oInput this.inputRef.currentoInput.focus()oInput.value }inputBlur () {const oInput this.inputRef.currentoInput.blur()oInput.value }changeInputValue (e) {this.setState({value: e.target.value})}render() {return (divinputtypetextref{this.inputRef}value{this.state.value}onChange{this.changeInputValue}/button onClick{this.inputFocus}聚焦/buttonbutton onClick{this.inputBlur}失焦/button/div)} }video class MyVideo extends React.Component {constructor(props) {super(props);this.videoRef React.createRef();}videoPlay (operation) {const oVideo this.videoRef.currentoperation play ? oVideo.play() : oVideo.pause()}render() {return (divvideo srchttps://www.w3school.com.cn/i/movie.oggwidth300height200controlsref{this.videoRef}/videodivbutton onClick{() this.videoPlay(play)}播放/buttonbutton onClick{() this.videoPlay(pause)}暂停/button/div/div)} }强制动画 class MyBox extends React.Component {constructor(props) {super(props)this.boxRef React.createRef()}growBox () {const oBox this.boxRef.currentoBox.style.width 400pxoBox.style.height 400pxoBox.style.backgroundColor skyblue}render() {return (divstyle{{width: 200 px,height: 200 px,backgroundColor: orange,transition: all 1s}}ref{this.boxRef}/divbutton onClick{this.growBox}变大/button/)} }引入jQuery growBox () {const $box $(this.boxRef.current)console.log(jquery dom对象, $box)$box.animate({width: 400px,height: 400px,})}模态框 状态提升 class Modal extends React.Component {constructor(props) {super(props)this.modalRef React.createRef()}render() {return (divref{this.modalRef}style{{width: 300px,border: 1px solid #000,display: this.props.toOpen ? block : none}}h1This is a Modal/h1pThis is a super Modal/p/div)} } class App extends React.Component {state {toOpen: false,}changeStatus (toOpen) {this.setState({toOpen})}render() {return (Modal toOpen{this.state.toOpen} /button onClick{() this.changeStatus(true)}打开/buttonbutton onClick{() this.changeStatus(false)}关闭/button/)} }
http://wiki.neutronadmin.com/news/240825/

相关文章:

  • 建站工具 营销济宁商城网站建设
  • 宁波自助建网站建设网站的颜色
  • 备案时网站名称数据网站排名
  • 开网站需要什么流程怎么轻松搭建自己的网站
  • h5企业网站定制排名网页设计入门软件有哪些
  • 学做网站多长时间阿里云购买网站空间
  • 电商网站设计系列wordpress网址打不开
  • 怎么黑进网站后台网站一直百度上搜不到是怎么回事
  • 网站宣传推广文案网站微营销公司哪家好
  • 网站地图分析工具做业务有哪些好的网站
  • 四川省城乡建建设人事考试网站建设网站怎么做
  • 赣州制作网站百度办公网新闻上传网站开发
  • 贵阳网站建设推广网站域名归属权
  • 大连展厅设计公司德阳网站建设优化
  • 网站开发价格评估上海网站建设品牌
  • 建筑网站大图微信公众号登录页面
  • 个人网站cms深圳高品质网站建设服务
  • 没有服务器 怎么做网站wordpress设置网站导航
  • qq空间如何做微网站网站开发 集成包
  • 家电维修怎么自己做网站网易企业邮箱和个人邮箱的区别
  • 手机网站自助建免费的图库网站
  • 网站做的不好做网站公司负责修图吗
  • 设计网站做多大合适wordpress虚拟机
  • 做一个网站的价钱徐汇微信手机网站制作
  • 建设网站目的是什么360建筑网如何删除简历
  • 做淘宝网站需要多大空间一般公司做网站多少钱
  • 怎么自己创建一个网站代码北京h5网页设计
  • 开封网站建设优化留言板网页设计代码
  • 上海企业建站工具wordpress 图片热点
  • 网站建设深圳哪里学楚雄网站制作