mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
feat(date-picker): clear on non-range panel
This commit is contained in:
parent
a2bc7df45f
commit
d08d6a1f8f
@ -75,6 +75,14 @@
|
||||
v-if="actions && actions.length"
|
||||
class="n-date-panel-actions"
|
||||
>
|
||||
<n-button
|
||||
v-if="actions.includes('clear')"
|
||||
size="tiny"
|
||||
round
|
||||
@click="clearValue"
|
||||
>
|
||||
Clear
|
||||
</n-button>
|
||||
<n-button
|
||||
v-if="actions.includes('now')"
|
||||
size="tiny"
|
||||
|
@ -97,6 +97,14 @@
|
||||
v-if="actions && actions.length"
|
||||
class="n-date-panel-actions"
|
||||
>
|
||||
<n-button
|
||||
v-if="actions.includes('clear')"
|
||||
size="tiny"
|
||||
round
|
||||
@click="clearValue"
|
||||
>
|
||||
Clear
|
||||
</n-button>
|
||||
<n-button
|
||||
v-if="actions.includes('now')"
|
||||
size="tiny"
|
||||
|
@ -35,7 +35,7 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
type: Array,
|
||||
default: () => ['now', 'confirm']
|
||||
default: () => ['now', 'clear', 'confirm']
|
||||
},
|
||||
isDateDisabled: {
|
||||
type: Function,
|
||||
|
Loading…
Reference in New Issue
Block a user