From e06186fe0cff4ec98bed2fda2e2a2a6aac8a5e9e Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Fri, 3 Nov 2023 22:38:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A4=E7=89=8Cbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/App.js | 412 +++++++++++++++--------------- web/src/components/LogsTable.js | 2 +- web/src/components/TokensTable.js | 15 +- web/src/index.css | 11 +- web/src/index.js | 8 +- web/src/pages/Token/EditToken.js | 1 + web/src/pages/TopUp/index.js | 187 +++++++------- 7 files changed, 328 insertions(+), 308 deletions(-) diff --git a/web/src/App.js b/web/src/App.js index 4c8ea24..292dd95 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -89,215 +89,217 @@ function App() { return ( - - }> - - - } - /> - - - - } - /> - }> - - - } - /> - }> - - - } - /> - - - - } - /> - }> - - - } - /> - }> - - - } - /> - - - - } - /> - }> - - - } - /> - }> - - - } - /> - - - - } - /> - }> - - - } - /> - }> - - - } - /> - }> - - - } - /> - }> - - - } - /> - }> - - - } - /> - }> - - - } - /> - }> - - - } - /> - }> - - - } - /> - + + + }> - + - - } - /> - + } + /> + + + + } + /> + }> - + - - } - /> - - - - } - /> - - - - } - /> - }> - - - } - /> - }> - - - } - /> - - } /> - + } + /> + }> + + + } + /> + + + + } + /> + }> + + + } + /> + }> + + + } + /> + + + + } + /> + }> + + + } + /> + }> + + + } + /> + + + + } + /> + }> + + + } + /> + }> + + + } + /> + }> + + + } + /> + }> + + + } + /> + }> + + + } + /> + }> + + + } + /> + }> + + + } + /> + }> + + + } + /> + + }> + + + + } + /> + + }> + + + + } + /> + + + + } + /> + + + + } + /> + }> + + + } + /> + }> + + + } + /> + + } /> + + ); } diff --git a/web/src/components/LogsTable.js b/web/src/components/LogsTable.js index 832acb5..e539098 100644 --- a/web/src/components/LogsTable.js +++ b/web/src/components/LogsTable.js @@ -71,7 +71,7 @@ const LogsTable = () => { isAdminUser ? record.type === 0 || record.type === 2 ?
- { {text} } + { {text} }
: <> diff --git a/web/src/components/TokensTable.js b/web/src/components/TokensTable.js index aef94cc..4af8eca 100644 --- a/web/src/components/TokensTable.js +++ b/web/src/components/TokensTable.js @@ -187,21 +187,21 @@ const TokensTable = () => { const closeEdit = () => { setShowEdit(false); - setEditingToken({ - id: undefined, - }); + // setEditingToken({ + // id: undefined, + // }); } const setTokensFormat = (tokens) => { setTokens(tokens); - if (tokens.length === ITEMS_PER_PAGE) { + if (tokens.length >= ITEMS_PER_PAGE) { setTokenCount(tokens.length + ITEMS_PER_PAGE); } else { setTokenCount(tokens.length); } } - // let pageData = tokens.slice((activePage - 1) * ITEMS_PER_PAGE, activePage * ITEMS_PER_PAGE); + let pageData = tokens.slice((activePage - 1) * ITEMS_PER_PAGE, activePage * ITEMS_PER_PAGE); const loadTokens = async (startIdx) => { setLoading(true); const res = await API.get(`/api/token/?p=${startIdx}`); @@ -450,11 +450,12 @@ const TokensTable = () => { onClick={searchTokens} style={{marginRight: 8}}>查询 -
diff --git a/web/src/index.css b/web/src/index.css index c1cd6c2..e157699 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -8,6 +8,15 @@ body { scrollbar-width: none; color: var(--semi-color-text-0) !important; background-color: var( --semi-color-bg-0) !important; + height: 100%; +} + +#root { + height: 100%; +} + +.semi-layout { + height: 100%; } .tableShow { @@ -40,7 +49,7 @@ code { /*display: flex;*/ /*flex-direction: column;*/ /*width: 100%;*/ - height: 100vh; + height: 100%; overflow: hidden; } diff --git a/web/src/index.js b/web/src/index.js index f7cee42..fe453b4 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -22,7 +22,6 @@ root.render( - @@ -37,11 +36,12 @@ root.render( > -
+ {/**/} + {/*
*/} + {/*
*/}
+ - - {/*