This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

修复日期选取组件变量声明的bug

old
宇天 2017-09-11 06:36:48 +08:00
parent 66d07ea04d
commit 6f3979dfd4
2 changed files with 13 additions and 12 deletions

View File

@ -14,13 +14,13 @@
<dd class="contrl">
<a href="javascript:;"
:click="$turn(1, -1)"
:text="btns.prevYear"></a>
:text="$prevYear"></a>
<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"
:click="$turn(0, 1)" :text="btns.nextMonth"></a>
:click="$turn(0, 1)" :text="$nextMonth"></a>
<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>
</dd>
<dd class="calendar">

View File

@ -82,7 +82,7 @@ define([
opts.calendar.maxMonth = opts.maxDate.format('m')
opts.calendar.maxDay = opts.maxDate.format('d')
}
log(opts)
//移除部分属性
delete opts.minDate;
delete opts.maxDate;
@ -220,12 +220,10 @@ define([
tips: '',
format: '', // 日期显示格式
value: '', // 用于显示在输入框里的日期变量
btns: { //切换年份/月份的按钮上的字符
prevYear: '<<',
nextYear: '>>',
prevMonth: '<',
nextMonth: '>'
},
$prevYear: '<<',
$nextYear: '>>',
$prevMonth: '<',
$nextMonth: '>',
$focus: yua.noop,
$turn: yua.noop,
$getDate: yua.noop,
@ -345,7 +343,10 @@ define([
//更新时间
function updateTime(vm, last){
var hour = minute = second = 0;
var hour = 0,
minute = 0,
second = 0;
last = {
year: +vm.calendar.year,
month: +vm.calendar.month,