Recently, I am working on a background system, using the react+ Flying Ice (ICE) UI framework. During the development process, I found that there is little information about the flying Ice UI framework, so HERE I share some common flying ice UI components examples, because of the content is quite large, so I will write several articles!

Complete form submission instance

HTML structure code

<Form labelAlign="top" className={styles.baseSetting} value={addList} responsive> <FormItem label=" user name "required ColSpan ={12}> <Input placeholder=" Name ="username" disabled={tabSwith? true : False} /> </FormItem> <FormItem label=" Required department "Required requiredMessage=" Required department" colSpan={6}> <TreeSelect name="syoufk" treeDefaultExpandAll dataSource={tableDataunits.data.list} style={{ width: ColSpan ={6}> <Select showSearch hasClear name='dutyfk' dataSource={tableDataposition.data.list} style={{ width: Placeholder =" position "/> </FormItem> <FormItem colSpan={6} Required label=" required" requiredMessage=" Required "> < radio.group name="isadmin" ARIa-Labelledby =" Authority of Project "defaultValue={1}> < radio.group name="isadmin" ARIa-Labelledby =" Authority of Project" defaultValue={1} </Radio> <Radio id="internal" value={0}> No </Radio> </ radio.group > </FormItem> <FormItem colSpan={12}> <Box spacing={8} Direction ="row"> < form. Submit type="primary" loading={submitloaging} validate onClick={submitAdd}> <Button type="secondary" onClick={onCloseadd}>Copy the code

Js code

const submitadd = (value, error) => { if (error) { return; } setaddVisible(true) var data = { roles: roleList, userName: value.username, dutyId: value.dutyfk ? value.dutyfk : '', isAdmin: value.isadmin, syoufk: value.syoufk, homefk: value.homefk ? value.homefk : '', mapfk: value.mapfk ? value.mapfk : '', phone: value.phone ? value.phone : '', name: value.name, alarm:value.alarm ? value.alarm : '', headimg: headimgData.headimg ? headimgData.headimg : '' } data.password = (md5(value.password)).toUpperCase(), // Add (data)} // Add const add = (data) => {setSubmitloaging (true) request.post(' ${request.useradd} ', data).then(function (response) { if (response.code ! = = {' 1 '). Common NoticeSuccess (' users', 'added success') / / websockerutils sendMessage (" cs ", {type: 3}) onCloseadd() props. OnCloseNews (true)} else {common.noticeError (' user ', NoticeError) Response. The message | | 'users increased by failure')} setsubmitloaging (false)}). The catch (function (e) {common. NoticeError (' users', 'New user failed ') setSubmitloAging (false)}); }Copy the code