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
613a74e7
Commit
613a74e7
authored
Mar 07, 2023
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: tabs add new style options
parent
838e84ce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
5 deletions
+39
-5
NormalTabs.vue
components/NormalTabs/NormalTabs.vue
+38
-4
index.vue
pages/index/index.vue
+1
-1
No files found.
components/NormalTabs/NormalTabs.vue
View file @
613a74e7
...
...
@@ -27,6 +27,12 @@
</view>
</swiper-item>
</swiper>
<
template
v-if=
"elementInfo.option.tabs.type === 'switch'"
>
<view
@
click=
"handleChangeSwitchValue()"
class=
"switch-view"
:style=
"[tabsStyle]"
>
{{
elementData
.
dataList
.
series
[
currentTabs
].
name
}}
</view>
</
template
>
</view>
</template>
...
...
@@ -107,6 +113,11 @@
}
}
}
if
(
this
.
elementInfo
.
option
.
tabs
.
type
===
'switch'
)
{
this
.
currentTabs
=
this
.
elementData
.
dataList
.
series
.
findIndex
(
item
=>
item
.
value
===
this
.
tabsValue
)
}
},
handleShowSelect
()
{
uni
.
$emit
(
'showSelect'
,
{
...
...
@@ -125,6 +136,7 @@
this
.
setTabsValue
(
index
)
this
.
tabsValueChange
()
},
handleSelectChange
(
e
)
{
this
.
selectValue
=
e
[
0
].
label
this
.
tabsValue
=
e
[
0
].
value
...
...
@@ -139,6 +151,18 @@
this
.
tabsValue
=
value
this
.
tabsValueChange
()
},
handleChangeSwitchValue
()
{
const
count
=
this
.
elementData
.
dataList
.
series
.
length
if
(
this
.
currentTabs
===
count
-
1
)
{
this
.
currentTabs
=
0
}
else
{
this
.
currentTabs
+=
1
}
this
.
tabsValue
=
this
.
elementData
.
dataList
.
series
[
this
.
currentTabs
].
value
this
.
tabsValueChange
()
},
/** 清除值 */
handleClearValue
()
{
this
.
tabsValue
=
''
...
...
@@ -153,6 +177,7 @@
paramName
,
data
}
=
this
.
elementInfo
.
child
console
.
log
(
this
.
tabsValue
)
if
(
this
.
elementInfo
.
child
.
type
===
'param'
)
{
uni
.
$emit
(
'handleLinkParams'
,
{
index
,
...
...
@@ -235,4 +260,13 @@
transform
:
translateY
(
-50%
);
z-index
:
2
;
}
.switch-view
{
width
:
100%
;
font-size
:
var
(
--
font-size
);
color
:
var
(
--
color
);
background
:
var
(
--
item-background-color
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
</
style
>
pages/index/index.vue
View file @
613a74e7
...
...
@@ -239,7 +239,7 @@
async
getReportCharts
()
{
clearInterval
(
this
.
timename
)
const
that
=
this
let
res
=
await
that
.
$u
.
api
.
getReportCharts
({
id
:
'6
27a16644606332538b4633c
'
})
let
res
=
await
that
.
$u
.
api
.
getReportCharts
({
id
:
'6
3647c3932f1997dd2ed53bf
'
})
uni
.
stopPullDownRefresh
()
uni
.
$emit
(
'handlePullDownRefresh'
)
const
{
Status
,
Result
:
{
info
,
list
}
}
=
res
.
data
...
...
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