UNPKG

@aliretail/react-materials-components

Version:
54 lines (48 loc) 944 B
--- title: Button-Usage order: 1 --- isPreview & readOnly 暂时展现形式相同 ```jsx import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { MultiInput } from '@aliretail/react-materials-components'; class App extends Component { state = { value: { key1: 1, key2: 2, }, inputList: [ { key: 'key1', }, { key: 'key2', }, ], }; render() { const { inputList, value } = this.state; const onChange = (val) => { this.setState({ value: val }); }; const props = { inputList, value, onChange, }; return ( <div> <h3>isPreview</h3> <MultiInput {...props} isPreview /> <h3>disabled</h3> <MultiInput {...props} disabled /> <h3>readOnly</h3> <MultiInput {...props} readOnly /> </div> ); } } ReactDOM.render(<App />, mountNode); ```