Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
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
zhaochengxiang
szse
Commits
f604e79b
Commit
f604e79b
authored
May 30, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产目录拉伸
parent
cddbe2d1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
31 deletions
+40
-31
index.jsx
src/view/Manage/AssetBrowse/index.jsx
+14
-7
index.less
src/view/Manage/AssetBrowse/index.less
+8
-10
index.jsx
src/view/Manage/AssetManage/index.jsx
+12
-5
index.less
src/view/Manage/AssetManage/index.less
+6
-9
No files found.
src/view/Manage/AssetBrowse/index.jsx
View file @
f604e79b
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
{
CaretLeftOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
{
CaretLeftOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
{
ResizableBox
}
from
'react-resizable'
;
import
AssetTree
from
'../AssetManage/Component/AssetTree'
;
import
AssetTree
from
'../AssetManage/Component/AssetTree'
;
import
AssetDirectory
from
'../AssetManage/Component/AssetDirectory'
;
import
AssetDirectory
from
'../AssetManage/Component/AssetDirectory'
;
...
@@ -60,9 +61,15 @@ const AssetBrowse = (props) => {
...
@@ -60,9 +61,15 @@ const AssetBrowse = (props) => {
return
(
return
(
<
div
className=
{
classes
}
>
<
div
className=
{
classes
}
>
<
div
className=
'left'
>
<
ResizableBox
className=
'left'
width=
{
230
}
height=
{
Infinity
}
axis=
'x'
minConstraints=
{
[
230
,
Infinity
]
}
maxConstraints=
{
[
500
,
Infinity
]
}
>
<
AssetTree
centerId=
{
centerId
}
onSelect=
{
onTreeSelect
}
reference=
{
reference
}
{
...
props
}
/>
<
AssetTree
centerId=
{
centerId
}
onSelect=
{
onTreeSelect
}
reference=
{
reference
}
{
...
props
}
/>
</
div
>
</
ResizableBox
>
{
{
expandTree
&&
<
Separate
width=
{
15
}
/>
expandTree
&&
<
Separate
width=
{
15
}
/>
}
}
...
@@ -82,12 +89,12 @@ const AssetBrowse = (props) => {
...
@@ -82,12 +89,12 @@ const AssetBrowse = (props) => {
<
AssetTable
nodeId=
{
nodeId
}
nodeType=
{
nodeParams
.
nodeType
}
reference=
{
reference
}
onCountChange=
{
onAssetCountChange
}
{
...
props
}
/>
<
AssetTable
nodeId=
{
nodeId
}
nodeType=
{
nodeParams
.
nodeType
}
reference=
{
reference
}
onCountChange=
{
onAssetCountChange
}
{
...
props
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
{
expandTree
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
{
expandTree
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
</
div
>
</
div
>
<
div
className=
'relation-toggle'
onClick=
{
relationToggleClick
}
>
<
div
className=
'relation-toggle'
onClick=
{
relationToggleClick
}
>
{
expandRelation
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
{
expandRelation
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
)
)
...
...
src/view/Manage/AssetBrowse/index.less
View file @
f604e79b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
height: 100%;
height: 100%;
.left {
.left {
width: 230px
;
flex: 0 0 auto
;
border-right: 1px solid #EFEFEF;
border-right: 1px solid #EFEFEF;
overflow: hidden;
overflow: hidden;
}
}
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
right: 0;
right: 0;
background: #f2f5fc;
background: #f2f5fc;
position: absolute;
position: absolute;
left:
245
px;
left:
0
px;
top: calc(50% - 40px);
top: calc(50% - 40px);
width: 12px;
width: 12px;
height: 80px;
height: 80px;
...
@@ -29,8 +29,10 @@
...
@@ -29,8 +29,10 @@
}
}
.right {
.right {
position: relative;
display: flex;
display: flex;
width: calc(100% - 245px);
flex: 1;
overflow: hidden;
flex-direction: column;
flex-direction: column;
}
}
...
@@ -40,7 +42,7 @@
...
@@ -40,7 +42,7 @@
align-items: center;
align-items: center;
background: #f2f5fc;
background: #f2f5fc;
position: absolute;
position: absolute;
left: calc(50% +
130
px);
left: calc(50% +
7.5
px);
top: calc(50% - 40px);
top: calc(50% - 40px);
width: 12px;
width: 12px;
height: 80px;
height: 80px;
...
@@ -52,24 +54,20 @@
...
@@ -52,24 +54,20 @@
&.asset-browse-relation-collapse {
&.asset-browse-relation-collapse {
.relation-toggle {
.relation-toggle {
left:
245
px;
left:
0
px;
}
}
}
}
}
}
.asset-browse-tree-collapse {
.asset-browse-tree-collapse {
.left {
.left {
width: 0;
width: 0
!important
;
}
}
.tree-toggle {
.tree-toggle {
left: 0;
left: 0;
}
}
.right {
width: 100%;
}
.relation-toggle {
.relation-toggle {
left: calc(50% + 7.5px);
left: calc(50% + 7.5px);
}
}
...
...
src/view/Manage/AssetManage/index.jsx
View file @
f604e79b
...
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
...
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
{
Form
}
from
'antd'
;
import
{
Form
}
from
'antd'
;
import
{
CaretLeftOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
{
CaretLeftOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
{
ResizableBox
}
from
'react-resizable'
;
import
AssetTree
from
'./Component/AssetManageTree'
;
import
AssetTree
from
'./Component/AssetManageTree'
;
import
AssetDirectory
from
'./Component/AssetDirectory'
;
import
AssetDirectory
from
'./Component/AssetDirectory'
;
...
@@ -66,9 +67,15 @@ const AssetManage = (props) => {
...
@@ -66,9 +67,15 @@ const AssetManage = (props) => {
return
(
return
(
<
div
className=
{
classes
}
>
<
div
className=
{
classes
}
>
<
div
className=
'left'
>
<
ResizableBox
className=
'left'
width=
{
230
}
height=
{
Infinity
}
axis=
'x'
minConstraints=
{
[
230
,
Infinity
]
}
maxConstraints=
{
[
500
,
Infinity
]
}
>
<
AssetTree
onSelect=
{
onTreeSelect
}
onDirectoryChange=
{
onDirectoryChange
}
{
...
props
}
/>
<
AssetTree
onSelect=
{
onTreeSelect
}
onDirectoryChange=
{
onDirectoryChange
}
{
...
props
}
/>
</
div
>
</
ResizableBox
>
{
{
expandTree
&&
<
Separate
width=
{
15
}
/>
expandTree
&&
<
Separate
width=
{
15
}
/>
}
}
...
@@ -76,14 +83,14 @@ const AssetManage = (props) => {
...
@@ -76,14 +83,14 @@ const AssetManage = (props) => {
<
AssetDirectory
id=
{
nodeId
}
assetCount=
{
assetCount
}
directoryChanged=
{
directoryChanged
}
onElementsChange=
{
onElementsChange
}
/>
<
AssetDirectory
id=
{
nodeId
}
assetCount=
{
assetCount
}
directoryChanged=
{
directoryChanged
}
onElementsChange=
{
onElementsChange
}
/>
<
Separate
height=
{
15
}
/>
<
Separate
height=
{
15
}
/>
<
AssetTable
nodeId=
{
nodeId
}
nodeType=
{
nodeType
}
nodeLevel=
{
nodeLevel
}
reference=
{
AssetManageReference
}
elementsChanged=
{
elementsChanged
}
assetActionChanged=
{
assetActionChanged
}
onSelect=
{
onTableSelect
}
onCountChange=
{
onAssetCountChange
}
{
...
props
}
/>
<
AssetTable
nodeId=
{
nodeId
}
nodeType=
{
nodeType
}
nodeLevel=
{
nodeLevel
}
reference=
{
AssetManageReference
}
elementsChanged=
{
elementsChanged
}
assetActionChanged=
{
assetActionChanged
}
onSelect=
{
onTableSelect
}
onCountChange=
{
onAssetCountChange
}
{
...
props
}
/>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
{
expandTree
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
</
div
>
</
div
>
</
div
>
<
Separate
width=
'15px'
/>
<
Separate
width=
'15px'
/>
<
div
className=
'right'
>
<
div
className=
'right'
>
<
AssetAction
form=
{
form
}
id=
{
assetId
}
dirId=
{
assetDirId
}
action=
'detail'
onChange=
{
onAssetActionChange
}
/>
<
AssetAction
form=
{
form
}
id=
{
assetId
}
dirId=
{
assetDirId
}
action=
'detail'
onChange=
{
onAssetActionChange
}
/>
</
div
>
</
div
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
{
expandTree
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
</
div
>
</
div
>
</
div
>
)
)
}
}
...
...
src/view/Manage/AssetManage/index.less
View file @
f604e79b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
height: 100%;
height: 100%;
.left {
.left {
width: 230px
;
flex: 0 0 auto
;
border-right: 1px solid #EFEFEF;
border-right: 1px solid #EFEFEF;
overflow: hidden;
overflow: hidden;
}
}
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
display: flex;
display: flex;
justify-content: center;
justify-content: center;
align-items: center;
align-items: center;
left:
245
px;
left:
0
px;
right: 0;
right: 0;
background: #f2f5fc;
background: #f2f5fc;
position: absolute;
position: absolute;
...
@@ -28,7 +28,9 @@
...
@@ -28,7 +28,9 @@
}
}
.middle {
.middle {
width: calc(100% - 230px - 400px - 30px);
position: relative;
flex: 1;
overflow: hidden;
}
}
.right {
.right {
...
@@ -39,14 +41,10 @@
...
@@ -39,14 +41,10 @@
.asset-manage-collapse {
.asset-manage-collapse {
.left {
.left {
width: 0;
width: 0
!important
;
}
}
.tree-toggle {
.tree-toggle {
left: 0;
left: 0;
}
}
.middle {
width: calc(100% - 400px - 30px);
}
}
}
\ No newline at end of file
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