使用Antd元件在React中寫列表樣式

2021-09-13 20:27:38 字數 3918 閱讀 9528

buyername: "王路飛",

tradername: "**託",

tradermobile: "15112341234",

transfercode: "gh1234567890",

asktime: "wed mar 27 2019 10:03:15 gmt+0800",

remark: "備註備註備註備註",

orderstatestr: "列印中"

},,],

ordercode: "1234567890",

buyername: "王路飛",

tradername: "**託",

tradermobile: "15112341234",

transfercode: "gh1234567890",

asktime: "wed mar 27 2019 10:03:15 gmt+0800",

remark: "備註備註備註備註",

orderstatestr: "列印中"

}],}

import react from 'react';

import withrouter from 'umi/withrouter';

import from 'dva';

import from 'antd';

import classnames from 'classnames';

import from 'components';

import _ from 'lodash';

const formitem = form.item;

const = layout;

const confirm = modal.confirm;

/* 搜尋區域

*/class conditioninputform extends react.component = this.props;

form.validatefields((err, fieldsvalue) =>

console.log(fieldsvalue);

});};

/*重置查詢條件*/

handleformreset = () => = this.props;

form.resetfields();

};onref = (ref) => ;

render() = this.props.form;

return ();

}}/*

** */

function listitems(props) = props;

/*if(!list || list.length < 1)//>暫無內容

)}*/

return (

買家:

聯絡人:

過戶編號:

備註:

過戶狀態:

)}

);})

) : (

'')}

);}function transferorderlist() = transferorderlist;

const listprops = ,,,

,,],};

const tabprops = ,,,

,],};return (

);}export default withrouter(connect((transferorderlist) => transferorderlist)(transferorderlist));

(1)tab.js

import react from 'react';

import from 'antd';

const tabpane = tabs.tabpane;

function tab(props) = props;

return (

()} key=>

);}) : ''});

}export default tab;

(2)daterange.js

import react from 'react';

import from 'antd';

import moment from 'moment';

import styles from './daterange.less';

class daterange extends react.component ;

componentdidmount = () => ;

/*重置查詢條件*/

resetdate = () => ,function() );

}; disabledstartdate = (startvalue) =>

return startvalue.valueof() > moment().valueof();

//return startvalue.valueof() < moment(endvalue).subtract(6, 'months').valueof() || startvalue.valueof() > endvalue.valueof();

}; disabledenddate = (endvalue) =>

if(moment(startvalue).subtract(-6, 'months') > moment())

return endvalue.valueof() <= startvalue.valueof() || endvalue.valueof() > moment(startvalue).subtract(-6, 'months').valueof();

}; onchange = (field, value) => , () => );

}; onstartchange = (value) => ;

onendchange = (value) => ;

handlestartopenchange = (open) => );

} };

handleendopenchange = (open) => );

}; render() = this.state;

return (

~); }}

export default daterange;

.waitsaleorder

.list

}li }}

.childtablethead

}.childtabletbody

&.bordertopnone

.li-inner

&.li-inner-action

button

}span

}.childtabletbodytop,

.childtabletbodybottom }}

.childtabletbodytop

.topinner>div

.radius }}

}.childtabletbodymiddle

.childtabletbodybottom

.sumitem}}

}}}.page

(2)daterange.less

.datepicker

React中使用Antd元件

antd的高階配置 antd的自定義主題 在react專案中進行安裝yarn add antd或者npm i antd安裝 import react,from react import from antd 引入按鈕 import antd dist antd.css 還需要引入css樣式 目的是不用...

React使用antd元件Radio

div style radio group defaultvalue a buttonstyle solid radio button value a hangzhou radio.button radio button value b shanghai radio.button radio.gro...

七 React中UI元件庫的使用 antd

npm install antdimport antd dist antd.css scripts 根目錄下建立config overrides.js 配置具體的修改規則 const require customize cra module.exports override fixbabelimpo...