update DatePicker
update DatePicker
This commit is contained in:
parent
07f400e572
commit
fa3a666da1
2 changed files with 9 additions and 3 deletions
|
@ -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: {
|
||||
|
|
|
@ -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']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue