ant-design-vue/components/date-picker/demo/basic.md

33 lines
625 B
Markdown
Raw Normal View History

2018-03-17 13:38:29 +00:00
<cn>
#### 基本
2018-03-15 13:40:34 +00:00
最简单的用法,在浮层中可以选择或者输入日期。
2018-03-17 13:38:29 +00:00
</cn>
2018-03-15 13:40:34 +00:00
2018-03-17 13:38:29 +00:00
<us>
#### Basic
2018-03-15 13:40:34 +00:00
Basic use case. Users can select or input a date in panel.
2018-03-17 13:38:29 +00:00
</us>
2018-03-15 13:40:34 +00:00
2018-03-17 13:38:29 +00:00
```html
<template>
2018-03-15 13:40:34 +00:00
<div>
2018-03-17 13:38:29 +00:00
<a-date-picker @change="onChange" />
2018-03-15 13:40:34 +00:00
<br />
2018-03-17 13:38:29 +00:00
<a-month-picker @change="onChange" placeholder="Select month" />
2018-03-15 13:40:34 +00:00
<br />
2018-03-17 13:38:29 +00:00
<a-range-picker @change="onChange" />
2018-03-15 13:40:34 +00:00
<br />
2018-03-17 13:38:29 +00:00
<a-week-picker @change="onChange" placeholder="Select week" />
2018-03-15 13:40:34 +00:00
</div>
2018-03-17 13:38:29 +00:00
</template>
<script>
2019-09-28 12:45:07 +00:00
export default {
methods: {
onChange(date, dateString) {
console.log(date, dateString);
},
},
};
2018-03-17 13:38:29 +00:00
</script>
```