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']"> <div :class="[prefixCls + '-header']">
<span></span><span></span><span></span><span></span><span></span><span></span><span></span> <span></span><span></span><span></span><span></span><span></span><span></span><span></span>
</div> </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> </div>
</template> </template>
<script> <script>
@ -44,7 +44,8 @@
}, },
data () { data () {
return { return {
prefixCls: prefixCls prefixCls: prefixCls,
readCells: []
} }
}, },
watch: { watch: {
@ -72,6 +73,9 @@
maxDate: this.maxDate maxDate: this.maxDate
}); });
} }
},
cells (cells) {
this.readCells = cells;
} }
}, },
computed: { computed: {

View file

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