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
071ce6d1
Commit
071ce6d1
authored
Apr 24, 2023
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:tabs add default value
parent
31232f8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
NormalTabs.vue
components/NormalTabs/NormalTabs.vue
+9
-11
No files found.
components/NormalTabs/NormalTabs.vue
View file @
071ce6d1
...
...
@@ -11,10 +11,6 @@
<u-icon
class=
"close-icon"
v-if=
"tabsValue && elementInfo.option.tabs.allowClear"
name=
"close-circle"
@
click
.
prevent
.
stop=
"handleClearValue"
></u-icon>
</view>
<!--
<u-select
v-model=
"show"
:default-value=
"defaultValue"
:list=
"elementData.dataList.series"
:safe-area-inset-bottom=
"true"
label-name=
"name"
:z-index=
"zIndex"
@
confirm=
"handleSelectChange"
>
</u-select>
-->
</
template
>
<swiper
v-if=
"elementInfo.option.tabs.type === 'group'"
class=
"tab-swiper"
...
...
@@ -47,7 +43,6 @@
show
:
false
,
tabsValue
:
''
,
selectValue
:
''
,
zIndex
:
0
,
defaultValue
:
[
0
]
}
},
...
...
@@ -103,13 +98,16 @@
},
methods
:
{
initChart
()
{
this
.
tabsValue
=
this
.
elementInfo
.
option
.
tabs
.
defaultValue
this
.
tabsValue
=
this
.
elementInfo
.
option
.
tabs
.
defaultValue
if
(
this
.
elementData
.
dataList
.
defaultValue
)
{
this
.
tabsValue
=
this
.
elementData
.
dataList
.
defaultValue
}
if
(
this
.
elementInfo
.
option
.
tabs
.
type
===
'select'
)
{
for
(
var
i
=
0
;
i
<
this
.
elementData
.
dataList
.
series
.
length
;
i
++
)
{
const
item
=
this
.
elementData
.
dataList
.
series
[
i
]
if
(
item
.
value
===
this
.
tabsValue
||
item
.
value
===
parseInt
(
this
.
tabsValue
))
{
this
.
selectValue
=
item
.
name
this
.
zIndex
=
i
const
item
=
this
.
elementData
.
dataList
.
series
[
i
]
if
(
item
.
value
==
this
.
tabsValue
||
item
.
value
==
parseInt
(
this
.
tabsValue
))
{
this
.
selectValue
=
item
.
name
}
}
}
...
...
@@ -124,7 +122,7 @@
id
:
this
.
elementInfo
.
id
,
show
:
true
,
list
:
this
.
elementData
.
dataList
.
series
,
defaultValue
:
this
.
default
Value
defaultValue
:
this
.
tabs
Value
})
},
setTabsValue
(
index
=
0
)
{
...
...
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