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
c926b8af
Commit
c926b8af
authored
Nov 16, 2021
by
秦文海
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 返回窗口样式
parent
db729342
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
index.js
packages/base-components/TipTool/src/header/index.js
+4
-4
index.js
packages/base-components/TipTool/src/index.js
+7
-1
No files found.
packages/base-components/TipTool/src/header/index.js
View file @
c926b8af
...
...
@@ -20,13 +20,13 @@ const Header = (props) => {
let
name
;
setShowIcon
(
!
icon
);
showIcon
?
(
name
=
'large'
)
:
(
name
=
'middle'
);
changeStyle
({
name
});
windowChange
({
name
});
let
windowStyle
=
changeStyle
({
name
});
windowChange
({
name
,
...
windowStyle
});
};
const
getWindowStatus
=
(
flag
)
=>
{
setWindowStatus
(
flag
);
changeScale
(
flag
);
smallChange
({
flag
});
let
scaleStyle
=
changeScale
(
flag
);
smallChange
({
flag
,
...
scaleStyle
});
};
const
iconStyle
=
()
=>
{
if
(
windowStatus
)
{
...
...
packages/base-components/TipTool/src/index.js
View file @
c926b8af
...
...
@@ -34,7 +34,7 @@ const TipTool = (props) => {
};
const
[
styleState
,
setStyleState
]
=
useState
(
data
);
const
[
styleScale
,
setScaleState
]
=
useState
(
scale
);
const
changeStyle
=
({
name
,
flag
})
=>
{
const
changeStyle
=
({
name
})
=>
{
let
data
=
styleState
.
slice
();
data
.
map
((
item
)
=>
{
if
(
name
==
item
.
name
)
{
...
...
@@ -44,12 +44,18 @@ const TipTool = (props) => {
}
});
setStyleState
(
data
);
return
data
.
filter
((
item
)
=>
item
.
active
)
.
map
(({
width
,
height
})
=>
{
return
{
width
,
height
};
})[
0
];
};
const
changeScale
=
(
flag
)
=>
{
let
obj
=
{
...
styleScale
};
obj
.
active
=
flag
;
setScaleState
(
obj
);
return
{
height
:
obj
.
height
,
width
:
obj
.
width
};
};
const
computedStyle
=
()
=>
{
...
...
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