update DatePicker

update DatePicker
This commit is contained in:
梁灏 2016-12-19 17:36:17 +08:00
parent 07f400e572
commit fa3a666da1
2 changed files with 9 additions and 3 deletions

View file

@ -6,7 +6,7 @@
<div :class="[prefixCls + '-header']">
<span></span><span></span><span></span><span></span><span></span><span></span><span></span>
</div>
<span :class="getCellCls(cell)" v-for="cell in cells"><em :index="$index">{{ cell.text }}</em></span>
<span :class="getCellCls(cell)" v-for="cell in readCells"><em :index="$index">{{ cell.text }}</em></span>
</div>
</template>
<script>
@ -44,7 +44,8 @@
},
data () {
return {
prefixCls: prefixCls
prefixCls: prefixCls,
readCells: []
}
},
watch: {
@ -72,6 +73,9 @@
maxDate: this.maxDate
});
}
},
cells (cells) {
this.readCells = cells;
}
},
computed: {

View file

@ -1,5 +1,6 @@
<template>
<div style="margin: 50px">
<i-button @click="setDate">change date</i-button>
<br>
<row>
<i-col span="8">
@ -122,7 +123,8 @@
// console.log(s)
},
setDate () {
this.value = '2016-12-24'
// this.value = '2016-12-24'
// this.value2 = ['2016-9-1', '2016-9-20']
}
}
}