Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
e2b958b4
Commit
e2b958b4
authored
Feb 01, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日历禁用修改
parent
79627ed6
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
256 additions
and
253 deletions
+256
-253
calendar.vue
pages/scenic/scenicComponents/calendar.vue
+9
-8
u-calendar.vue
uview-ui/components/u-calendar/u-calendar.vue
+247
-245
No files found.
pages/scenic/scenicComponents/calendar.vue
View file @
e2b958b4
...
...
@@ -3,10 +3,9 @@
:show=
"showPop"
@
confirm=
"onConfirm"
@
close=
"showPop=false"
:maxDate=
"maxDate"
:minDate=
'minDate'
:defaultDate=
"defaultDate"
:formatter=
'formatter'
:customList=
'customList'
ref=
"calendar2"
rowHeight=
'112'
round=
'20'
...
...
@@ -21,10 +20,14 @@ export default {
dateList
:{
handler
(
newValue
,
oldValue
){
if
(
newValue
&&
newValue
.
length
>
0
){
this
.
maxDate
=
newValue
[
newValue
.
length
-
1
].
startTime
.
substr
(
0
,
10
)
//默认和最小日期都为第一天
this
.
minDate
=
newValue
[
0
].
startTime
.
substr
(
0
,
10
)
this
.
customList
=
newValue
.
map
(
item
=>
{
return
item
.
startTime
.
substr
(
0
,
10
)
}
)
this
.
defaultDate
=
newValue
[
0
].
startTime
.
substr
(
0
,
10
)
//由于传入了customList,最大日期和最小日期可以取消
// this.maxDate=newValue[newValue.length-1].startTime.substr(0,10)
// //默认和最小日期都为第一天
// this.minDate=newValue[0].startTime.substr(0,10)
}
},
deep
:
true
,
...
...
@@ -37,6 +40,7 @@ export default {
defaultDate
:
''
,
//默认日期
maxDate
:
''
,
//最大日期
minDate
:
''
,
//最小日期
customList
:[],
//转化之后的日期列表
}
},
mounted
()
{
...
...
@@ -67,9 +71,6 @@ export default {
// day.dot = true
// }
// })
// if (!day.bottomInfo) {
// day.type = 'disabled'
// }
return
day
}
...
...
uview-ui/components/u-calendar/u-calendar.vue
View file @
e2b958b4
This diff is collapsed.
Click to expand it.
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