这篇文章主要介绍了vue-calendar-component 封装多日期选择组件,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
实现效果
安装vue-calendar-component日历组件
cnpm i vue-calendar-component --save //国内镜像
引入
import Calendar from "vue-calendar-component"; export default { components: { Calendar }, }
封装
<div class="x-f"> </div>
css样式
/* 日历组件 */ .wh_content_all{ background-color: #ffffff !important; } .wh_top_changge li{ color: rgb(50, 50, 51) !important; font-size: 0.18rem !important; } .wh_jiantou1{ width: 0.1rem !important; height: 0.1rem !important; border-top: 2px solid rgb(50, 50, 51) !important; border-left: 2px solid rgb(50, 50, 51) !important; } .wh_jiantou2{ width: 0.1rem !important; height: 0.1rem !important; border-top: 2px solid rgb(50, 50, 51) !important; border-right: 2px solid rgb(50, 50, 51) !important; } .wh_top_tag{ font-size: 0.16rem !important; } .wh_item_date{ font-size: 0.2rem !important; } .wh_content_item, .wh_content_item_tag{ width: 14.285% !important; color: rgb(50, 50, 51) !important; } .wh_content_item .wh_isToday{ background: transparent !important; } .wh_content_item .wh_chose_day{ background: #ee0a24 !important; color: #fff !important; } .wh_content{ padding: 0 0.1rem !important; } .wh_container{ position: relative; } .wh_container::after{ content: ''; width: 1px; height: 100%; position: absolute; right: 0; top: 0; background: #dddddd;; }
页面调用
<div class="form-item mt20 x-f"> <span class="form-label">日期</span> <span class="form-input">{{ rq}}</span></div>
写的不完善,有待优化
到此这篇关于vue-ca
本文来源gaodai.ma#com搞#代!码(网
lendar-component 封装多日期选择组件的文章就介绍到这了,更多相关vue-calendar-component 日期选择组件内容请搜索gaodaima搞代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持gaodaima搞代码网!
以上就是vue-calendar-component 封装多日期选择组件的实例代码的详细内容,更多请关注gaodaima搞代码网其它相关文章!