功能
滑动切换时间,打点功能,支持月周切换日历组件
这是一款支持滑动切换以及周模式和月模式切换功能的日历组件,可以设置打卡信息,自定义样式。
组件样式使用了sass所有需要项目中先安装node-sass和sass-loader。
日历组件,组件名:zzx-calendar,代码块: zzxCalendar。
地址:https://ext.dcloud.net.cn/plugin?id=1732
代码
<template>
<view class="content">
<zzx-calendar @selected-change="datechange" @days-change="days" showBack />
</view>
</template>
<script>
import zzxCalendar from "@/components/zzx-calendar/zzx-calendar.vue";
export default {
components: {
zzxCalendar,
},
data() {
return {
};
},
methods: {
datechange(e) {
console.log('选择日期', e);
},
days(e) {
console.log('本月开始时间和结束时间', e)
}
},
}
</script>
<style lang="scss" scoped>
.content {
100%;
min-height: 100vh;
}
/*表格通用样式*/
.zzx-form {
box-sizing: border-box;
100%;
padding: 0 30upx;
font-size: 24upx;
}
.zzx-form-btn {
560upx;
height:90upx;
background:linear-gradient(180deg,rgba(28,173,251,1) 0%,rgba(61,190,253,1) 100%);
box-shadow:0upx 3upx 6upx rgba(0,0,0,0.16);
border-radius:45upx;
color: #ffffff;
&[disabled]:not([type]) {
color: #ffffff;
560upx;
height:90upx;
background:rgba(221,221,221,1);
box-shadow:0upx 3upx 6upx rgba(0,0,0,0.16);
border-radius:45upx;
}
}
.zzx-form-item {
calc(100% - 60upx);
margin: 0 auto;
display: flex;
height: 90upx;
line-height: 90upx;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
border-bottom: 1upx solid #DDDDDD;
&:last-child {
border: none;
margin: 30upx auto;
}
.zzx-form-label {
150upx;
}
.zzx-form-label-required {
&:before {
display: inline;
content: '*';
color: #ff5500;
}
}
.zzx-form-arrow {
18upx;
height: 36upx;
}
}
.zzx-form-value{
flex: 1;
.zzx-radio-label {
margin-right: 15upx;
}
.zzx-checkbox-label {
margin-right: 15upx;
}
}
.zzx-form-input {
height: 90upx;
line-height: 90upx;
}
.zzx-picker-null {
color: #dddddd;
}
</style>
有问题联系QQ1291481728或在下方评论,会在第一时刻处理。

