mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
feat(components): [date-picker] add show-now
prop (#18625)
This commit is contained in:
parent
1c1b2743a1
commit
60b899d9bc
@ -111,6 +111,7 @@ datetime-picker/custom-icon
|
|||||||
| teleported | whether datetime-picker dropdown is teleported to the body | ^[boolean] | true |
|
| teleported | whether datetime-picker dropdown is teleported to the body | ^[boolean] | true |
|
||||||
| empty-values ^(2.7.0) | empty values of component, [see config-provider](/en-US/component/config-provider#empty-values-configurations) | ^[array] | — |
|
| empty-values ^(2.7.0) | empty values of component, [see config-provider](/en-US/component/config-provider#empty-values-configurations) | ^[array] | — |
|
||||||
| value-on-clear ^(2.7.0) | clear return value, [see config-provider](/en-US/component/config-provider#empty-values-configurations) | ^[string] / ^[number] / ^[boolean] / ^[Function] | — |
|
| value-on-clear ^(2.7.0) | clear return value, [see config-provider](/en-US/component/config-provider#empty-values-configurations) | ^[string] / ^[number] / ^[boolean] / ^[Function] | — |
|
||||||
|
| show-now ^(2.8.7) | whether to show the now button | ^[boolean] | true |
|
||||||
|
|
||||||
## Events
|
## Events
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-show="footerVisible" :class="ppNs.e('footer')">
|
<div v-show="footerVisible" :class="ppNs.e('footer')">
|
||||||
<el-button
|
<el-button
|
||||||
v-show="!isMultipleType"
|
v-show="!isMultipleType && showNow"
|
||||||
text
|
text
|
||||||
size="small"
|
size="small"
|
||||||
:class="ppNs.e('link-btn')"
|
:class="ppNs.e('link-btn')"
|
||||||
|
@ -57,6 +57,10 @@ export const panelSharedProps = buildProps({
|
|||||||
},
|
},
|
||||||
dateFormat: String,
|
dateFormat: String,
|
||||||
timeFormat: String,
|
timeFormat: String,
|
||||||
|
showNow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
} as const)
|
} as const)
|
||||||
|
|
||||||
export const panelRangeSharedProps = buildProps({
|
export const panelRangeSharedProps = buildProps({
|
||||||
|
@ -151,6 +151,7 @@
|
|||||||
:unlink-panels="unlinkPanels"
|
:unlink-panels="unlinkPanels"
|
||||||
:type="type"
|
:type="type"
|
||||||
:default-value="defaultValue"
|
:default-value="defaultValue"
|
||||||
|
:show-now="showNow"
|
||||||
@pick="onPick"
|
@pick="onPick"
|
||||||
@select-range="setSelectionRange"
|
@select-range="setSelectionRange"
|
||||||
@set-picker-option="onSetPickerOption"
|
@set-picker-option="onSetPickerOption"
|
||||||
|
@ -227,6 +227,13 @@ export const timePickerDefaultProps = buildProps({
|
|||||||
},
|
},
|
||||||
...useEmptyValuesProps,
|
...useEmptyValuesProps,
|
||||||
...useAriaProps(['ariaLabel']),
|
...useAriaProps(['ariaLabel']),
|
||||||
|
/**
|
||||||
|
* @description whether to show the now button
|
||||||
|
*/
|
||||||
|
showNow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
} as const)
|
} as const)
|
||||||
|
|
||||||
export type TimePickerDefaultProps = ExtractPropTypes<
|
export type TimePickerDefaultProps = ExtractPropTypes<
|
||||||
|
Loading…
Reference in New Issue
Block a user