@et-modules/components
v1.0.75
Published
@et-modules/components
Downloads
1,261
Readme
EditRow
使用
import { EditRow } from '@et-modules/components';
参数说明
| 参数 | 说明 | 类型 | 是否必填 | 默认值 |
|----|----|----|----| ---- |
|text| 当前行的文字息| string
| 是 | - |
|extra|自定义的数据,由回调函数传回| Object
| 否 | - |
|valueChange| text 变化时的回调 | function(text, extra)
| 否 | - |
|rowClick| 点击当前行的回调 | function(text, extra)
| 否 | - |
示例
const App = () => {
const handleValueChange = (text, extra) => {
console.log('文本为:', text)
console.log('当前数据ID为:', extra.id)
}
const handleEditRowClick = (text, extra) => {
console.log('文本为:', text)
console.log('当前数据ID为:', extra.id)
}
return (
<EditRow text={'文本'} extra={{id: 1}} valueChange={handleValueChange} rowClick={handleEditRowClick} />;
)
}