mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
fix: 修复 eslint 报错
This commit is contained in:
@@ -4,21 +4,19 @@ import React from 'react'
|
||||
* 下拉单选框
|
||||
*/
|
||||
class Select extends React.Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
this.handleChange = this.handleChange.bind(this)
|
||||
}
|
||||
|
||||
handleChange (event) {
|
||||
handleChange = event => {
|
||||
const { onChange } = this.props
|
||||
onChange(event.target.value)
|
||||
}
|
||||
|
||||
render () {
|
||||
render() {
|
||||
return (
|
||||
<div className='py-1 space-x-3'>
|
||||
<label className='text-gray-500'>{this.props.label}</label>
|
||||
<select value={this.props.value} onChange={this.handleChange} className='border p-1 rounded cursor-pointer'>
|
||||
<select
|
||||
value={this.props.value}
|
||||
onChange={this.handleChange}
|
||||
className='border p-1 rounded cursor-pointer'>
|
||||
{this.props.options?.map(o => (
|
||||
<option key={o.value} value={o.value}>
|
||||
{o.text}
|
||||
|
||||
Reference in New Issue
Block a user