Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
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
wangxuelai
wechatapp.shangjiadao.com
Commits
c2c76fe7
Commit
c2c76fe7
authored
Jul 09, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
f678d536
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
index.js
business/components/calendar/index.js
+1
-1
index.js
components/calendar/index.js
+3
-2
No files found.
business/components/calendar/index.js
View file @
c2c76fe7
...
...
@@ -71,7 +71,7 @@ Component({
}
else
if
(
type
===
'next_month'
)
{
newMonth
=
curMonth
+
1
;
if
(
newMonth
>
12
)
{
newYear
=
curYear
+
1
;
newYear
=
Number
(
curYear
)
+
1
;
newMonth
=
1
;
}
}
...
...
components/calendar/index.js
View file @
c2c76fe7
...
...
@@ -53,6 +53,7 @@ Component({
methods
:
{
chooseDate
(
e
)
{
const
{
type
}
=
e
.
currentTarget
.
dataset
;
if
(
!
type
)
return
;
const
methodName
=
this
.
data
.
handleMap
[
type
];
this
[
methodName
](
type
);
...
...
@@ -77,13 +78,13 @@ Component({
if
(
type
===
'prev_month'
)
{
newMonth
=
curMonth
-
1
;
if
(
newMonth
<
1
)
{
newYear
=
curYear
-
1
;
newYear
=
Number
(
curYear
)
-
1
;
newMonth
=
12
;
}
}
else
if
(
type
===
'next_month'
)
{
newMonth
=
curMonth
+
1
;
if
(
newMonth
>
12
)
{
newYear
=
curYear
+
1
;
newYear
=
Number
(
curYear
)
+
1
;
newMonth
=
1
;
}
}
...
...
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