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']">
|
<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: {
|
||||||
|
|
|
@ -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']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue