Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
31db7d18
Commit
31db7d18
authored
Nov 04, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 应用环境创建时间采用24小时制展示
parent
a3ba43ef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
index.module.scss
...ponents/CommonComponents/VirtuallyTable/index.module.scss
+15
-0
index.tsx
src/components/CommonComponents/VirtuallyTable/index.tsx
+11
-3
index.tsx
...ceCenter/UserResources/UserResourcesEnvironment/index.tsx
+1
-1
No files found.
src/components/CommonComponents/VirtuallyTable/index.module.scss
0 → 100644
View file @
31db7d18
.VTHeader
{
font-size
:
12px
;
line-height
:
20px
;
color
:
rgba
(
138
,
144
,
153
,
1
);
padding
:
12px
16px
;
white-space
:
nowrap
;
font-weight
:
400
;
}
.VTHeaderRow
{
background-color
:
rgba
(
247
,
248
,
250
,
1
);
box-sizing
:
border-box
;
}
.VTRow
{
background-color
:
yellow
;
}
src/components/CommonComponents/VirtuallyTable/index.tsx
View file @
31db7d18
import
React
from
"react"
;
import
React
from
"react"
;
import
{
useCallback
,
useEffect
,
useState
,
useRef
}
from
"react"
;
import
{
useCallback
,
useEffect
,
useState
,
useRef
}
from
"react"
;
import
{
Column
,
Table
,
AutoSizer
}
from
"react-virtualized"
;
import
{
Column
,
Table
,
AutoSizer
}
from
"react-virtualized"
;
import
style
from
"./index.module.scss"
;
import
"react-virtualized/styles.css"
;
// only needs to be imported once
import
"react-virtualized/styles.css"
;
// only needs to be imported once
type
Order
=
"ASC"
|
"DESC"
;
// 升序为asc,降序为desc。
type
Order
=
"ASC"
|
"DESC"
;
// 升序为asc,降序为desc。
...
@@ -111,10 +112,19 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
...
@@ -111,10 +112,19 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
ref=
{
virtuallyTableRef
}
ref=
{
virtuallyTableRef
}
width=
{
width
}
width=
{
width
}
height=
{
height
}
height=
{
height
}
headerHeight=
{
20
}
headerHeight=
{
59
}
rowHeight=
{
30
}
rowHeight=
{
30
}
rowCount=
{
rows
.
length
}
rowCount=
{
rows
.
length
}
rowGetter=
{
({
index
}:
any
)
=>
rows
[
index
]
}
rowGetter=
{
({
index
}:
any
)
=>
rows
[
index
]
}
headerClassName=
{
style
.
VTHeader
}
rowClassName=
{
({
index
}:
any
)
=>
{
if
(
index
<
0
)
{
return
style
.
VTHeaderRow
;
}
else
{
return
style
.
VTRow
;
}
}
}
// rowClassName=
{
style
.
VTRow
}
>
>
{
headCells
.
map
((
headCell
)
=>
{
{
headCells
.
map
((
headCell
)
=>
{
return
(
return
(
...
@@ -136,8 +146,6 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
...
@@ -136,8 +146,6 @@ const VirtuallyTable = (props: IVirtuallyTableProps) => {
/>
/>
);
);
})
}
})
}
{
/* <Column label="Name" dataKey="name" width={100} />
<Column width={200} label="Description" dataKey="description" /> */
}
</
Table
>
</
Table
>
)
}
)
}
</
div
>
</
div
>
...
...
src/views/ResourceCenter/UserResources/UserResourcesEnvironment/index.tsx
View file @
31db7d18
...
@@ -128,7 +128,7 @@ const UserResourcesEnvironment = () => {
...
@@ -128,7 +128,7 @@ const UserResourcesEnvironment = () => {
};
};
const
renderCreatedTime
=
(
item
:
any
)
=>
{
const
renderCreatedTime
=
(
item
:
any
)
=>
{
return
moment
(
new
Date
(
item
.
createdTime
)).
format
(
"yyyy-MM-DD
hh
:mm:ss"
);
return
moment
(
new
Date
(
item
.
createdTime
)).
format
(
"yyyy-MM-DD
HH
:mm:ss"
);
};
};
const
handleDelete
=
(
item
:
any
)
=>
{
const
handleDelete
=
(
item
:
any
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment