最近在用 uView开发待办程序,用到了日历。
uView官方默认所有日历都是弹出形式的。

不过要改成平铺形式,也比较容易。
1、找到日历组件文件:
\uni_modules\uview-ui\components\u-calendar\u-calendar.vue
将开头的 u-popup 弹窗删除,记得结束还有一个</u-popup>也要删除。

2、引用日历组件的时候,记得把标题,副标题这些不让显示出来。

<u-calendar :showTitle="showCalendarTitle" rowHeight="50" :showSubtitle="showCalendarSubtitle"
:formatter="formatter" :mode="calendarMode" color="#6d81fd" :show-confirm="showCalendarConfirm"@confirm="CalendarConfirm" ref="calendar"></u-calendar>
3、完成日历改造。
评论 (0)
暂无评论,快来发表第一条评论吧!