keys查询新增加载效果

This commit is contained in:
Apple 2022-08-24 18:01:10 +08:00
parent dfc21f36b0
commit 97c98bb22c
1 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import menu from '@/assets/enum.js'
import _ from 'lodash' import _ from 'lodash'
import { import {
Button, Button,
BlockLoading,
Icon, Icon,
Notify, Notify,
Alert, Alert,
@ -137,6 +138,7 @@ const UseKeyList = () => {
key: '' key: ''
}, },
hash: '', hash: '',
loading:false,
page: 1, page: 1,
limit: 10, limit: 10,
isQuery: false, isQuery: false,
@ -189,10 +191,12 @@ const UseKeyList = () => {
*/ */
const getTable = () => { const getTable = () => {
const param = getParam() const param = getParam()
setState({loading:true});
getKeysList(param).then((res) => { getKeysList(param).then((res) => {
handelResponse( handelResponse(
res, res,
(req, msg) => { (req, msg) => {
setState({loading:false});
console.log('req =>', req) console.log('req =>', req)
if (req.total > 0) { if (req.total > 0) {
setState({ lodgingTable: false }) setState({ lodgingTable: false })
@ -616,6 +620,7 @@ const UseKeyList = () => {
{state.invalidTotal} {state.invalidTotal}
</Alert> </Alert>
) : null} ) : null}
<BlockLoading loading={state.loading} icon={'circle'}>
<Grid <Grid
spliteColor={'#fff'} spliteColor={'#fff'}
tableData={state.tableData} tableData={state.tableData}
@ -696,7 +701,9 @@ const UseKeyList = () => {
} }
}} }}
/> />
</BlockLoading>
</div> </div>
</TabPage> </TabPage>
{/* 批量上传 */} {/* 批量上传 */}