html
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/[email protected]/lib/index.js"></script>
<div id="app">
<el-date-picker
v-model="value"
type="date"
placeholder="选择日期">
</el-date-picker>
<el-calendar v-model="value">
</el-calendar>
</div>
JS
var Main = {
data() {
return {
value: new Date()
}
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…