修复日期选取组件变量声明的bug
parent
66d07ea04d
commit
6f3979dfd4
|
@ -14,13 +14,13 @@
|
||||||
<dd class="contrl">
|
<dd class="contrl">
|
||||||
<a href="javascript:;"
|
<a href="javascript:;"
|
||||||
:click="$turn(1, -1)"
|
:click="$turn(1, -1)"
|
||||||
:text="btns.prevYear"></a>
|
:text="$prevYear"></a>
|
||||||
<a href="javascript:;" class="prev-month"
|
<a href="javascript:;" class="prev-month"
|
||||||
:click="$turn(0, -1)" :text="btns.prevMonth"></a>
|
:click="$turn(0, -1)" :text="$prevMonth"></a>
|
||||||
<a href="javascript:;" class="next-month"
|
<a href="javascript:;" class="next-month"
|
||||||
:click="$turn(0, 1)" :text="btns.nextMonth"></a>
|
:click="$turn(0, 1)" :text="$nextMonth"></a>
|
||||||
<a href="javascript:;" class="next-year"
|
<a href="javascript:;" class="next-year"
|
||||||
:click="$turn(1, 1)" :text="btns.nextYear"></a>
|
:click="$turn(1, 1)" :text="$nextYear"></a>
|
||||||
<span :text="calendar.year + '-' + calendar.month"></span>
|
<span :text="calendar.year + '-' + calendar.month"></span>
|
||||||
</dd>
|
</dd>
|
||||||
<dd class="calendar">
|
<dd class="calendar">
|
||||||
|
|
|
@ -82,7 +82,7 @@ define([
|
||||||
opts.calendar.maxMonth = opts.maxDate.format('m')
|
opts.calendar.maxMonth = opts.maxDate.format('m')
|
||||||
opts.calendar.maxDay = opts.maxDate.format('d')
|
opts.calendar.maxDay = opts.maxDate.format('d')
|
||||||
}
|
}
|
||||||
log(opts)
|
|
||||||
//移除部分属性
|
//移除部分属性
|
||||||
delete opts.minDate;
|
delete opts.minDate;
|
||||||
delete opts.maxDate;
|
delete opts.maxDate;
|
||||||
|
@ -220,12 +220,10 @@ define([
|
||||||
tips: '',
|
tips: '',
|
||||||
format: '', // 日期显示格式
|
format: '', // 日期显示格式
|
||||||
value: '', // 用于显示在输入框里的日期变量
|
value: '', // 用于显示在输入框里的日期变量
|
||||||
btns: { //切换年份/月份的按钮上的字符
|
$prevYear: '<<',
|
||||||
prevYear: '<<',
|
$nextYear: '>>',
|
||||||
nextYear: '>>',
|
$prevMonth: '<',
|
||||||
prevMonth: '<',
|
$nextMonth: '>',
|
||||||
nextMonth: '>'
|
|
||||||
},
|
|
||||||
$focus: yua.noop,
|
$focus: yua.noop,
|
||||||
$turn: yua.noop,
|
$turn: yua.noop,
|
||||||
$getDate: yua.noop,
|
$getDate: yua.noop,
|
||||||
|
@ -345,7 +343,10 @@ define([
|
||||||
|
|
||||||
//更新时间
|
//更新时间
|
||||||
function updateTime(vm, last){
|
function updateTime(vm, last){
|
||||||
var hour = minute = second = 0;
|
var hour = 0,
|
||||||
|
minute = 0,
|
||||||
|
second = 0;
|
||||||
|
|
||||||
last = {
|
last = {
|
||||||
year: +vm.calendar.year,
|
year: +vm.calendar.year,
|
||||||
month: +vm.calendar.month,
|
month: +vm.calendar.month,
|
||||||
|
|
Reference in New Issue