Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React写的组件,H5端支持input元素的focus/blur事件,而编译成小程序不起作用 #54

Closed
songzhuorong18 opened this issue Dec 17, 2019 · 4 comments

Comments

@songzhuorong18
Copy link

No description provided.

@songzhuorong18 songzhuorong18 changed the title fdf React写的组件,H5端支持input元素的focus/blur事件,而编译成小程序不起作用 Dec 20, 2019
@songzhuorong18
Copy link
Author

import React from 'react'
import ReactDOM from 'react-dom'
class Counter extends React.Component {
constructor (props) {
super(props);
this.state = { value: 'test' };
}

printInfo (info) {
console.log("!!!!!!", info)
}

render () {
return (


测试
<input type="text" name="sex" id="male" value={this.state.value} onFocus={this.printInfo.bind(this, 'focus')}
onBlur={this.printInfo.bind(this, 'blur')}/>
)
}
}
export default function createApp() {
const container = document.createElement('div')
container.id = 'app'
document.body.appendChild(container)
ReactDOM.render(, container)
}

@songzhuorong18
Copy link
Author

focus和blur事件在浏览器中能触发,编译成小程序以后无法触发

@JuneAndGreen
Copy link
Collaborator

已在 miniprogram-render@0.7.0 和 miniprogram-element@0.7.0 兼容修复

@JuneAndGreen
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants