feat: publicize doc implemetation
This commit is contained in:
39
one/docs/demo/calendar/default.vue
Normal file
39
one/docs/demo/calendar/default.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-calendar v-model="date"/>
|
||||
<p>Selected: {{ readableDate }}</p>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Calendar } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-calendar': Calendar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
date: new Date()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
readableDate () {
|
||||
return this.date.toLocaleDateString(this.$i18n.locale, {
|
||||
weekday: 'long',
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<docs>
|
||||
支持 `v-model`,数据类型为原生 `Date` 类型。
|
||||
</docs>
|
||||
|
||||
<docs locale="en-US">
|
||||
Supports `v-model` with value type being the native `Date`.
|
||||
</docs>
|
||||
Reference in New Issue
Block a user