2019-10-15 14:55:05 +08:00
|
|
|
# Actions
|
|
|
|
```html
|
|
|
|
<n-date-picker
|
|
|
|
v-model="ts1"
|
2020-05-31 14:21:09 +08:00
|
|
|
type="date"
|
|
|
|
:actions="['confirm']"
|
|
|
|
style="margin-bottom: 12px;"
|
|
|
|
/>
|
|
|
|
<n-date-picker
|
|
|
|
v-model="ts2"
|
2019-10-15 14:55:05 +08:00
|
|
|
type="datetime"
|
|
|
|
style="margin-right: 12px; margin-bottom: 12px;"
|
|
|
|
:actions="['now']"
|
|
|
|
/>
|
|
|
|
<n-date-picker
|
2020-05-31 14:21:09 +08:00
|
|
|
v-model="range1"
|
|
|
|
type="daterange"
|
|
|
|
:actions="null"
|
2019-10-15 14:55:05 +08:00
|
|
|
style="margin-bottom: 12px;"
|
|
|
|
/>
|
|
|
|
<n-date-picker
|
2020-05-31 14:21:09 +08:00
|
|
|
v-model="range2"
|
2019-10-15 14:55:05 +08:00
|
|
|
type="datetimerange"
|
|
|
|
style="margin-bottom: 12px;"
|
|
|
|
:actions="['clear']"
|
|
|
|
/>
|
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
ts1: null,
|
2020-05-31 14:21:09 +08:00
|
|
|
ts2: 1183135260000,
|
|
|
|
range1: null,
|
|
|
|
range2: null
|
2019-10-15 14:55:05 +08:00
|
|
|
}
|
|
|
|
}
|
2020-05-31 14:21:09 +08:00
|
|
|
}
|
2019-10-15 14:55:05 +08:00
|
|
|
```
|
|
|
|
```css
|
|
|
|
.n-date-picker {
|
|
|
|
margin: 0 12px 8px 0;
|
|
|
|
}
|
|
|
|
```
|