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
9e7f2148
Commit
9e7f2148
authored
Jul 13, 2023
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: index page localstorage
parent
c01bde6b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
NormalTabs.vue
components/NormalTabs/NormalTabs.vue
+8
-3
echartElementData.js
mixins/echartElementData.js
+2
-2
fullscreen.vue
pages/fullscreen/fullscreen.vue
+5
-0
index.vue
pages/index/index.vue
+4
-4
No files found.
components/NormalTabs/NormalTabs.vue
View file @
9e7f2148
...
...
@@ -131,7 +131,10 @@
}
},
methods
:
{
initChart
()
{
initChart
()
{
if
(
!
this
.
elementData
.
dataList
)
{
return
}
this
.
tabsValue
=
this
.
elementInfo
.
option
.
tabs
.
defaultValue
if
(
this
.
elementData
.
dataList
.
defaultValue
)
{
this
.
tabsValue
=
this
.
elementData
.
dataList
.
defaultValue
...
...
@@ -266,7 +269,9 @@
display
:
flex
!
important
;
align-items
:
flex-start
;
flex-wrap
:
wrap
;
width
:
100%
;
width
:
100%
;
justify-content
:
center
;
align-items
:
center
;
}
.tab-vertical
{
display
:
flex
!
important
;
...
...
@@ -277,7 +282,7 @@
.tab-item
{
width
:
var
(
--
width
);
margin
:
1%
;
margin
:
3px
;
font-size
:
var
(
--
font-size
);
color
:
var
(
--
color
);
border
:
var
(
--
border-style
);
...
...
mixins/echartElementData.js
View file @
9e7f2148
...
...
@@ -213,8 +213,8 @@ export default {
}
},
'elementData.dataList'
:
{
handler
(
newVal
)
{
if
(
newVal
)
{
handler
(
newVal
,
oldVal
)
{
if
(
JSON
.
stringify
(
newVal
)
!==
JSON
.
stringify
(
oldVal
)
)
{
this
.
setStorageData
()
this
.
initChart
()
}
...
...
pages/fullscreen/fullscreen.vue
View file @
9e7f2148
...
...
@@ -71,6 +71,11 @@
// 去掉全屏的定制按钮
const
toolbox
=
{
show
:
false
}
this
.
element
.
option
.
toolbox
=
toolbox
},
onUnload
()
{
// 移除监听事件
uni
.
$off
(
'handleLinkParams'
)
uni
.
$off
(
'handleLinkComp'
)
},
onShow
()
{
/**
...
...
pages/index/index.vue
View file @
9e7f2148
...
...
@@ -124,9 +124,9 @@
// detail页面也会监听这两个事件,所有index页面需要在onShow里面增加监听,在onHide里面移除监听
onShow
()
{
const
that
=
this
// if(uni.getStorageSync('reportInfo')
) {
// this.reportInfo = JSON.parse(uni.getStorageSync('reportInfo'
))
//
}
if
(
Object
.
keys
(
that
.
reportInfo
).
length
)
{
uni
.
setStorageSync
(
'reportInfo'
,
JSON
.
stringify
(
that
.
reportInfo
))
}
/**
* 组件交互 - 参数
*/
...
...
@@ -267,7 +267,7 @@
}
that
.
reportInfo
=
this
.
handleTabsLink
(
res
.
data
.
Result
)
uni
.
setStorageSync
(
'reportInfo'
,
JSON
.
stringify
(
res
.
data
.
Result
))
uni
.
setStorageSync
(
'reportInfo'
,
JSON
.
stringify
(
that
.
reportInfo
))
that
.
getStickyTables
()
}
},
...
...
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