uniapp开发中, uView日历平铺显示的方法

最近在用 uView开发待办程序,用到了日历。

 uView官方默认所有日历都是弹出形式的。

uniapp开发中, uView日历平铺显示的方法

不过要改成平铺形式,也比较容易。

1、找到日历组件文件:

\uni_modules\uview-ui\components\u-calendar\u-calendar.vue

将开头的 u-popup 弹窗删除,记得结束还有一个</u-popup>也要删除。

uniapp开发中, uView日历平铺显示的方法

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

uniapp开发中, uView日历平铺显示的方法

<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)

未连接

暂无评论,快来发表第一条评论吧!