Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
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
ReactWeb5
wisdom-components
Commits
cbe7d9f4
Commit
cbe7d9f4
authored
Nov 16, 2021
by
秦文海
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 修改初始样式
parent
a4a48607
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
18 deletions
+22
-18
index.less
packages/base-components/TipTool/src/header/index.less
+0
-1
index.js
packages/base-components/TipTool/src/index.js
+20
-16
index.less
packages/base-components/TipTool/src/tableContent/index.less
+2
-1
No files found.
packages/base-components/TipTool/src/header/index.less
View file @
cbe7d9f4
...
...
@@ -14,7 +14,6 @@
width: 100%;
height: 15%;
min-height: 45px;
max-height: 55px;
background-color: #001529;
> div:nth-child(1) {
display: flex;
...
...
packages/base-components/TipTool/src/index.js
View file @
cbe7d9f4
...
...
@@ -14,14 +14,14 @@ const TipTool = (props) => {
const
data
=
[
{
name
:
'middle'
,
width
:
style
.
minWidth
??
'
2
00px'
,
height
:
style
.
minHeight
??
'
4
0px'
,
width
:
style
.
minWidth
??
'
6
00px'
,
height
:
style
.
minHeight
??
'
30
0px'
,
active
:
true
,
},
{
name
:
'large'
,
width
:
style
.
maxWidth
??
'
2
00px'
,
height
:
style
.
maxHeight
??
'40px'
,
width
:
style
.
maxWidth
??
'
8
00px'
,
height
:
style
.
maxHeight
??
'40
0
px'
,
active
:
false
,
},
];
...
...
@@ -29,7 +29,7 @@ const TipTool = (props) => {
const
scale
=
{
name
:
'small'
,
width
:
'200px'
,
height
:
'4
0
px'
,
height
:
'4
5
px'
,
active
:
true
,
};
const
[
styleState
,
setStyleState
]
=
useState
(
data
);
...
...
@@ -44,32 +44,36 @@ const TipTool = (props) => {
}
});
setStyleState
(
data
);
return
data
.
filter
((
item
)
=>
item
.
active
)
.
map
(({
width
,
height
})
=>
{
return
{
width
,
height
};
})[
0
];
return
getWidthAndHeight
(
data
);
};
const
changeScale
=
(
flag
)
=>
{
let
obj
=
{
...
styleScale
};
obj
.
active
=
flag
;
setScaleState
(
obj
);
return
{
height
:
obj
.
height
,
width
:
obj
.
width
};
if
(
flag
)
{
return
getWidthAndHeight
(
styleState
);
}
else
{
return
{
height
:
obj
.
height
,
width
:
obj
.
width
};
}
};
const
computedStyle
=
()
=>
{
if
(
!
styleScale
.
active
)
{
return
{
width
:
styleScale
.
width
,
height
:
styleScale
.
height
};
}
else
{
return
styleState
.
filter
((
item
)
=>
item
.
active
)
.
map
(({
width
,
height
})
=>
{
return
{
width
,
height
};
})[
0
];
return
getWidthAndHeight
(
styleState
);
}
};
const
getWidthAndHeight
=
(
data
)
=>
{
return
data
.
filter
((
item
)
=>
item
.
active
)
.
map
(({
width
,
height
})
=>
{
return
{
width
,
height
};
})[
0
];
};
const
displayComput
=
()
=>
{
if
(
styleScale
.
active
)
{
return
{
display
:
'inline-block'
};
...
...
packages/base-components/TipTool/src/tableContent/index.less
View file @
cbe7d9f4
...
...
@@ -34,8 +34,9 @@
}
&-contaner {
width: 100%;
height:
90
%;
height:
85
%;
overflow: scroll;
overflow-x: hidden;
ul {
display: flex;
flex-wrap: wrap;
...
...
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