Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
Overview
Overview
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
fengzhaoyu
schedule
Commits
79443252
Commit
79443252
authored
Apr 01, 2020
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改scroll定位
parent
b7fb19ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
scheduleList.axml
PageComponents/scheduleList/scheduleList.axml
+1
-1
scheduleList.js
PageComponents/scheduleList/scheduleList.js
+16
-10
No files found.
PageComponents/scheduleList/scheduleList.axml
View file @
79443252
...
...
@@ -2,7 +2,7 @@
<view>2020年3月</view>
<view onTap="changesidebar">icon</view>
</view>
<scroll-view class="indexScrollView" scroll-y="{{true}}" style="background: #FFFFFF" lower-threshold="1000" onScrollToLower="lower" scroll-into-view="{{t
hisDay
}}">
<scroll-view class="indexScrollView" scroll-y="{{true}}" style="background: #FFFFFF" lower-threshold="1000" onScrollToLower="lower" scroll-into-view="{{t
odayStr
}}">
<block a:for="{{scheduleList}}" a:for-item="scheduleYearList">
<block a:for="{{scheduleYearList}}">
<block a:if="{{item.type == 'year'}}">
...
...
PageComponents/scheduleList/scheduleList.js
View file @
79443252
...
...
@@ -59,18 +59,24 @@ create.Component({
scheduleList
.
push
(
that
.
returnScheduleList
(
2019
+
i
));
}
// 第一次加载
const
today
=
new
Date
();
// finalDate 是用来定位到今天的
const
finalDate
=
new
Date
(
today
);
const
finalDate
=
new
Date
();
// finalDate.setDate(today.getDate() - today.getDay())
that
.
setData
({
scheduleList
:
scheduleList
,
todayStr
:
finalDate
.
toLocaleDateString
(),
thisYear
:
year
,
maxYear
:
year
,
startPageOnShow
:
true
,
isFirstLoad
:
false
});
that
.
setData
(
{
scheduleList
:
scheduleList
,
thisYear
:
year
,
maxYear
:
year
,
startPageOnShow
:
true
,
isFirstLoad
:
false
},
()
=>
{
that
.
setData
({
todayStr
:
finalDate
.
toLocaleDateString
()
});
}
);
}
);
});
...
...
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