Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d082a4b0
authored
2025-05-30 23:59:20 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
日历
1 parent
596506f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
5 deletions
src/viewsPc/components/homeCalendar.vue
src/viewsPc/index.vue
src/viewsPc/components/homeCalendar.vue
View file @
d082a4b
<
template
>
<div>
<el-calendar
v-model=
"currentDate"
:range=
"calendarRange"
>
<el-calendar
ref=
"calendar"
v-model=
"currentDate"
:range=
"calendarRange"
>
<template
#
header=
"
{ date }">
<div
class=
"father"
>
<span
class=
"textDay"
>
{{
date
}}
</span>
<el-button-group
class=
"son"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"selectDateCalendar('prev-month')"
>
上一月
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"selectDateCalendar('today')"
>
今天
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"selectDateCalendar('next-month')"
>
下一月
</el-button>
</el-button-group>
</div>
</
template
>
<
template
#
date-cell=
"data"
>
<div
:class=
"data.data.day==query.currentDate?'primaryDate date':'date'"
@
click=
"selectDate(data.data.day)"
>
{{
data
.
data
.
day
.
slice
(
8
,
10
)
}}
</div>
</
template
>
</el-calendar>
<div
class=
"calendarList"
>
...
...
@@ -30,14 +44,15 @@ import { dayjs } from 'element-plus'
import
{
getIndexScheduleList
}
from
'@/apiPc/common'
import
{
useRouter
}
from
'vue-router'
const
calendar
=
ref
(
''
)
const
router
=
useRouter
()
const
currentDate
=
ref
(
new
Date
())
const
calendarRange
=
ref
([
dayjs
(
'2025-07-17'
).
toDate
(),
dayjs
(
'2025-07-17'
).
toDate
()])
// const calendarRange = ref([dayjs().toDate(), dayjs(
).toDate()])
const
schList
=
ref
([])
const
loading
=
ref
(
false
)
const
query
=
ref
({
// currentDate:dayjs().format('YYYY-MM-DD')
currentDate
:
'2025-07-17'
currentDate
:
dayjs
().
format
(
'YYYY-MM-DD'
)
})
getScheduleList
()
...
...
@@ -68,6 +83,16 @@ function goMatch(n) {
}
})
}
const
selectDateCalendar
=
(
val
)
=>
{
if
(
!
calendar
.
value
)
return
calendar
.
value
.
selectDate
(
val
)
if
(
val
==
'today'
)
{
query
.
value
.
currentDate
=
dayjs
().
toDate
()
getScheduleList
()
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -190,4 +215,23 @@ function goMatch(n) {
}
}
.father
{
text-align
:
center
;
position
:
relative
;
width
:
100%
;
}
.son
{
position
:
absolute
;
right
:
0
;
width
:
200px
;
}
.textDay
{
font-weight
:
bold
;
background
:
linear-gradient
(
to
right
,
#8623FC
,
#453DEA
);
/* 定义渐变方向和颜色 */
-webkit-background-clip
:
text
;
/* 兼容 WebKit 浏览器 */
background-clip
:
text
;
/* 标准语法 */
-webkit-text-fill-color
:
transparent
;
/* 文字颜色透明 */
}
</
style
>
...
...
src/viewsPc/index.vue
View file @
d082a4b
...
...
@@ -174,7 +174,7 @@
<
template
#
default=
"scope"
>
<div>
<span
:class=
"`flag-icon flag-icon-$
{scope.row.code}`" />
{{
language
==
0
?
scope
.
row
.
name
:
scope
.
row
.
countryNameEn
}}
{{
language
==
0
?
scope
.
row
.
name
:
scope
.
row
.
enName
}}
</div>
</
template
>
</el-table-column>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment