uniApp打卡日歷


功能

    滑動切換時間,打點功能,支持月周切換日歷組件

     這是一款支持滑動切換以及周模式和月模式切換功能的日歷組件,可以設置打卡信息,自定義樣式。

  組件樣式使用了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 {
    width: 100%;
    min-height: 100vh;
}
/*表格通用樣式*/
.zzx-form {
    box-sizing: border-box;
    width: 100%;
    padding: 0 30upx;
    font-size: 24upx;
}
.zzx-form-btn {
    width: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;
        width: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 {
    width: 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 {
        width: 150upx;
    }
    .zzx-form-label-required {
        &:before {
            display: inline;
            content: '*';
            color: #ff5500;
        }
    }
    .zzx-form-arrow {
        width: 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>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM