Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
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
Damon
study
Commits
b21898fc
Commit
b21898fc
authored
Aug 06, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0
parents
5a5f2724
d5e73eca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
15 deletions
+27
-15
index.vue
src/components/calendar/index.vue
+27
-5
pages.json
src/pages.json
+0
-10
No files found.
src/components/calendar/index.vue
View file @
b21898fc
...
@@ -111,6 +111,9 @@
...
@@ -111,6 +111,9 @@
<u-button
:type=
"btnType"
shape=
"circle"
size=
"default"
@
click=
"btnFix()"
>
确定
</u-button>
<u-button
:type=
"btnType"
shape=
"circle"
size=
"default"
@
click=
"btnFix()"
>
确定
</u-button>
</view>
</view>
</view>
-->
</view>
-->
<view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</view>
<!--
</u-popup>
-->
<!--
</u-popup>
-->
</
template
>
</
template
>
...
@@ -287,6 +290,11 @@ export default {
...
@@ -287,6 +290,11 @@ export default {
return
[]
return
[]
},
},
},
},
// ture: 月和年切换不可超过本月;false: 不对月份限制,根据maxYear限制切换最大年份
currentMonthMax
:
{
type
:
Boolean
,
default
:
true
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -427,13 +435,27 @@ export default {
...
@@ -427,13 +435,27 @@ export default {
let
date
=
new
Date
(
`
${
year
}
/
${
month
}
/01 00:00:00`
)
let
date
=
new
Date
(
`
${
year
}
/
${
month
}
/01 00:00:00`
)
return
date
.
getDay
()
return
date
.
getDay
()
},
},
checkRange
(
year
)
{
checkRange
(
year
,
month
)
{
let
overstep
=
false
let
overstep
=
false
if
(
year
<
this
.
minYear
||
year
>
this
.
maxYear
)
{
let
now
=
new
Date
()
uni
.
showToast
({
let
mYear
=
this
.
currentMonthMax
?
now
.
getFullYear
()
:
this
.
maxYear
// ture: 月和年切换不可超过本月;false: 不对月份限制,根据maxYear限制切换最大年份
if
(
year
<
this
.
minYear
||
year
>
mYear
||
(
this
.
currentMonthMax
&&
year
==
mYear
&&
month
&&
month
>
now
.
getMonth
()
+
1
)
)
{
this
.
$refs
.
uToast
.
show
({
title
:
'日期超出范围啦~'
,
title
:
'日期超出范围啦~'
,
icon
:
'none'
,
type
:
'warning'
,
duration
:
1500
,
})
})
// uni.showToast({
// title: '日期超出范围啦~',
// icon: 'none',
// })
overstep
=
true
overstep
=
true
}
}
return
overstep
return
overstep
...
@@ -442,7 +464,7 @@ export default {
...
@@ -442,7 +464,7 @@ export default {
if
(
isAdd
)
{
if
(
isAdd
)
{
let
month
=
this
.
month
+
1
let
month
=
this
.
month
+
1
let
year
=
month
>
12
?
this
.
year
+
1
:
this
.
year
let
year
=
month
>
12
?
this
.
year
+
1
:
this
.
year
if
(
!
this
.
checkRange
(
year
))
{
if
(
!
this
.
checkRange
(
year
,
month
>
12
?
1
:
month
))
{
this
.
month
=
month
>
12
?
1
:
month
this
.
month
=
month
>
12
?
1
:
month
this
.
year
=
year
this
.
year
=
year
this
.
changeData
()
this
.
changeData
()
...
...
src/pages.json
View file @
b21898fc
...
@@ -83,16 +83,6 @@
...
@@ -83,16 +83,6 @@
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
"path"
:
"answerBackup"
,
"name"
:
"learnAnswerrBackup"
,
"style"
:
{
"navigationBarTitleText"
:
"答题-备份"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
{
"path"
:
"selectCategory"
,
"path"
:
"selectCategory"
,
"name"
:
"learnSelectCategory"
,
"name"
:
"learnSelectCategory"
,
...
...
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