vue-multi-picker
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -13,3 +13,3 @@ 'use strict'; | ||
var CalendarDay = { template: "<table class=vmp-calendar-day><tr><th colspan=7>{{ period.get('y') }} 年 {{ period.get('M') + 1 }} 月<tr><th v-for=\"day in weekDays\">{{ day }}<tr v-for=\"week in calendarWeeks\"><td v-for=\"day in calendar.slice(week * 7, week * 7 + 7)\" :class=getClass(day.clone()) @click=click(day.clone()) @mouseenter=enter(day.clone())>{{ day.get('date') }}</table>", | ||
var CalendarDay = { template: "<table class=vmp-calendar-day><tr><th colspan=7><div class=calendar-title>{{ period.get('y') }} 年 {{ period.get('M') + 1 }} 月</div><tr><th v-for=\"day in weekDays\"><div class=calendar-weekdays>{{ day }}</div><tr v-for=\"week in calendarWeeks\"><td v-for=\"day in calendar.slice(week * 7, week * 7 + 7)\"><div class=calendar-item :class=getClass(day.clone()) @click=click(day.clone()) @mouseenter=enter(day.clone())>{{ day.get('date') }}</div></table>", | ||
name: 'CalendarDay', | ||
@@ -207,3 +207,5 @@ | ||
var CalendarWeek = { template: "<table class=vmp-calendar-week><tr><th>{{ period.get('y') }} 年 {{ period.get('M') + 1 }} 月<tr v-for=\"week in weeks\"><td :class=getClass(week.clone()) @click=click(week.clone())>{{ getWeekInfo(week.clone()) }}</table>", | ||
var CalendarWeek = { template: "<table class=vmp-calendar-week><tr><th><div class=calendar-title>{{ period.get('y') }} 年 {{ period.get('M') + 1 }} 月</div><tr v-for=\"week in weeks\"><td><div :class=getClass(week.clone()) @click=click(week.clone())>{{ getWeekInfo(week.clone()) }}</div></table>", | ||
name: 'CalendarWeek', | ||
props: { | ||
@@ -278,3 +280,5 @@ restrict: { | ||
var CalendarMonth = { template: "<table class=vmp-calendar-month><tr><th colspan=4>{{ period.get('y') }} 年<tr v-for=\"_ in 3\"><td v-for=\"__ in 4\" :class=\"getClass(_ * 4 + __)\" @click=\"click(_ * 4 + __)\">{{ _ * 4 + __ + 1 }} 月</table>", | ||
var CalendarMonth = { template: "<table class=vmp-calendar-month><tr><th colspan=4><div class=calendar-title>{{ period.get('y') }} 年</div><tr v-for=\"_ in 3\"><td v-for=\"__ in 4\"><div class=calendar-item :class=\"getClass(_ * 4 + __)\" @click=\"click(_ * 4 + __)\">{{ _ * 4 + __ + 1 }} 月</div></table>", | ||
name: 'CalendarMonth', | ||
props: { | ||
@@ -342,2 +346,3 @@ restrict: { | ||
restrict: { type: Function }, | ||
resetOnTypeChange: { type: Boolean, default: true }, | ||
// day | ||
@@ -348,7 +353,8 @@ calendarNum: { type: Number, default: 1 }, | ||
data: function data() { | ||
return {}; | ||
watch: { | ||
'selectType': function selectType() { | ||
if (this.resetOnTypeChange) this.selected = null; | ||
} | ||
}, | ||
events: { | ||
@@ -355,0 +361,0 @@ prev: function prev() { |
{ | ||
"name": "vue-multi-picker", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "A multi function date picker", | ||
@@ -5,0 +5,0 @@ "keywords": "datepicker weekpicker monthpicker", |
@@ -19,3 +19,4 @@ # vue-multi-picker | ||
:selected.sync="selected (moment range object)" | ||
:restrict="resFunc (a moment object given as arg, return true to restrict)"> | ||
:restrict="resFunc (a moment object given as arg, return true to restrict)" | ||
:reset-on-type-change="true (reset selected to null, default enabled)"> | ||
</multi-picker> | ||
@@ -22,0 +23,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
28966
410
42