Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
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
lihuizhen
ec-report-refactor
Commits
697d35cf
Commit
697d35cf
authored
Jul 13, 2023
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dropdown animation in ios device
parent
a594c45c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
NormalTabs.vue
components/NormalTabs/NormalTabs.vue
+9
-3
u-dropdown.vue
uview-ui/components/u-dropdown/u-dropdown.vue
+4
-2
No files found.
components/NormalTabs/NormalTabs.vue
View file @
697d35cf
<
template
>
<view
class=
"normal-tabs"
>
<u-tabs
v-if=
"elementInfo.option.tabs.type === 'tabs'"
:list=
"elementData.dataList.series"
:is-scroll=
'elementData.dataList.series.length > 4'
<u-tabs
v-if=
"elementInfo.option.tabs.type === 'tabs'"
:list=
"elementData.dataList.series"
:is-scroll=
'elementData.dataList.series.length > 4'
:current=
"currentTabs"
:active-color=
"elementInfo.option.tabs.activeColor"
:inactive-color=
"elementInfo.option.tabs.color"
:bg-color=
"elementInfo.option.tabs.backgroundColor"
:font-size=
"getFontSize()"
@
change=
"handleTabsChange"
></u-tabs>
...
...
@@ -35,9 +36,11 @@
</
template
>
<u-dropdown
v-if=
"elementInfo.option.tabs.type === 'dropdown'"
:title-size=
"getFontSize()"
ref=
"uDropdown"
:active-color=
"elementInfo.option.tabs.color"
:inactive-color=
"elementInfo.option.tabs.color"
:menu-icon-size=
"getFontSize()"
:height=
"elementInfo.height"
>
:active-color=
"elementInfo.option.tabs.color"
:inactive-color=
"elementInfo.option.tabs.color"
:menu-icon-size=
"getFontSize()"
:height=
"getHeight()"
>
<u-dropdown-item
v-model=
"tabsValue"
:title=
"getSelectLabel(tabsValue)"
>
<view
class=
"slot-content"
:style=
"{'background-color': elementInfo.option.tabs.itemBackgroundColor}"
v-for=
"(item, index) in elementData.dataList.series"
:key=
"index"
>
<view
class=
"slot-content"
:style=
"{'background-color': elementInfo.option.tabs.itemBackgroundColor}"
v-for=
"(item, index) in elementData.dataList.series"
:key=
"index"
>
<view
class=
"drop-item"
@
click=
"handleDropdownValue(item)"
:style=
"{
'color':tabsValue === item.value ? elementInfo.option.tabs.activeColor : elementInfo.option.tabs.color,
...
...
@@ -242,6 +245,9 @@
},
getFontSize
()
{
return
this
.
$u
.
common
.
pxToRpx
(
this
.
elementInfo
.
option
.
tabs
.
fontSize
)
},
getHeight
()
{
return
this
.
$u
.
common
.
pxToRpx
(
this
.
elementInfo
.
height
)
}
},
watch
:
{
...
...
uview-ui/components/u-dropdown/u-dropdown.vue
View file @
697d35cf
...
...
@@ -134,7 +134,8 @@
popupStyle
()
{
let
style
=
{};
// 进行Y轴位移,展开状态时,恢复原位。收齐状态时,往上位移100%,进行隐藏
style
.
transform
=
`translateY(
${
this
.
active
?
0
:
'-100%'
}
)`
// style.transform = `translateY(${this.active ? 0 : "-100%"})`;
style
.
transform
=
`scaleY(
${
this
.
active
?
1
:
0
}
)`
style
[
'transition-duration'
]
=
this
.
duration
/
1000
+
's'
;
style
.
borderRadius
=
`0 0
${
this
.
$u
.
addUnit
(
this
.
borderRadius
)}
${
this
.
$u
.
addUnit
(
this
.
borderRadius
)}
`
;
return
style
;
...
...
@@ -291,6 +292,7 @@
&
__popup
{
position
:
relative
;
z-index
:
10
;
transform-origin
:
center
top
;
transition
:
all
0
.3s
;
transform
:
translate3D
(
0
,
-100%
,
0
);
overflow
:
hidden
;
...
...
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