Commit 054c50b9 authored by zhengke's avatar zhengke

修改

parent e32c4061
<style>
.calendar-day {
text-align: center;
color: #202535;
line-height: 30px;
font-size: 12px;
}
.is-selected {
color: #F8A535;
font-size: 10px;
margin-top: 5px;
}
#calendar .el-button-group>.el-button:not(:first-child):not(:last-child):after {
content: '当月';
}
.el-calendar-day {
position: relative;
}
.calendar-day {
position: absolute;
bottom: 5px;
left: 15px;
}
.calenderHeader {
display: flex;
justify-content: space-between;
padding:0 20px;
}
</style><template>
<div class="lesson_Form">
<div class="calenderHeader">
<div>
<el-radio-group v-model="checkedDays" size="mini">
<el-radio-button label="日"></el-radio-button>
<el-radio-button label="周"></el-radio-button>
<el-radio-button label="月"></el-radio-button>
<el-radio-button style="margin-left:20px;border-left:1px solid #DCDFE6;" label="今天"></el-radio-button>
</el-radio-group>
</div>
<div>
<q-btn color="primary" class="q-mr-md" icon="add" size="12px" label="新增日程" @click="addTrip()" />
</div>
</div>
<el-calendar v-model="value" id="calendar">
<!-- 这里使用的是 2.5 slot 语法,对于新项目请使用 2.6 slot 语法-->
<template slot="dateCell" slot-scope="{date, data}">
<!--自定义内容-->
<div class="calendar-day">{{ data.day.split('-').slice(2).join('-') }}</div>
<div v-for="item in calendarData">
<div v-if="(item.months).indexOf(data.day.split('-').slice(1)[0])!=-1">
<div v-if="(item.days).indexOf(data.day.split('-').slice(2).join('-'))!=-1">
<el-tooltip class="item" effect="dark" :content="item.things" placement="right">
<div class="is-selected">{{item.things}}</div>
</el-tooltip>
</div>
<div v-else></div>
</div>
<div v-else></div>
</div>
</template>
</el-calendar>
</div>
</template>
<script>
export default {
name: "calendar",
data() {
return {
calendarData: [{
months: ['09', '11'],
days: ['15'],
things: '看电影'
},
{
months: ['10', '11'],
days: ['02'],
things: '去公园野炊'
},
{
months: ['11'],
days: ['02'],
things: '看星星'
},
{
months: ['11'],
days: ['02'],
things: '看月亮'
}
],
value: new Date(),
checkedDays:'月'
}
},
created() {
this.getClassStatus();
this.getSchool();
},
mounted() {
this.getList();
},
methods: {
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment