1,model 彈出框css
this.precModel = Modal.info({
width: 1200,
className:'export',
title: '資源',
maskClosable:true,
content: <WeixinKu
onResult={this.onResultWX}
onCanced={this.onCanced}
/>,
})
onResultWX= async (value,items,isChange)=>{//1}
handleCheck = (value,items) => {
console.log(value,items)
let isChange = false;
this.props.onResult(value,items,isChange)
this.props.onCanced()
}
this.precModel.destroy();
css:
.export{
.ant-modal-confirm-body{
i{display: none !important;}
}
.ant-modal-confirm-btns{
display: none !important;
}
}
------------------------------------------------------
formatTime = (time) => { //unix時間戳轉換成時間
let unixtime = time
let unixTimestamp = new Date(unixtime * 1000)
let Y = unixTimestamp.getFullYear()
let M = ((unixTimestamp.getMonth() + 1) > 10 ? (unixTimestamp.getMonth() + 1) : '0' + (unixTimestamp.getMonth() + 1))
let D = (unixTimestamp.getDate() > 10 ? unixTimestamp.getDate() : '0' + unixTimestamp.getDate())
let toDay = Y + '-' + M + '-' + D
return toDay
}
this.formatTime(items.content.create_time)
--------------------------------------------------------
import _clientconfig from 'config-client.js'
<GKAjaxQuery apiUrl={`${_clientconfig.vlog.apiUrl}/gktag/queryvLogs`} // config-client/development.config.js/ body={postData}> {({loading, data, error, refetch}) => { if (loading) return <div>Loading ... </div> if (error) return <div>發生錯誤:{JSON.stringify(error, null, 2)} </div> console.log(JSON.stringify(data)) let {err, result} = data || {}; if (err) return <div>發生錯誤:{JSON.stringify(error, null, 2)} </div> let {data: {report = [], list = []}} = result console.log(list) return <div> <div style={{fontSize:'10px',color:"red",marginLeft:'60px'}}>動做類型沒法修改,請刪除後重建</div> <Table columns={this.columns} style={{margin:'10px 60px 10px',backgroundColor:"#fff"}} dataSource={list} pagination={false}/> </div> }}</GKAjaxQuery>-----------------------------------------------------------------