mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-12 10:45:10 +08:00
fix: allow clearable
to control both of the clear button (#2072)
fix #2035
This commit is contained in:
parent
0d29cc444c
commit
35ae8f4a33
@ -181,6 +181,7 @@
|
||||
</div>
|
||||
<div v-if="showTime" class="el-picker-panel__footer">
|
||||
<el-button
|
||||
v-if="clearable"
|
||||
size="mini"
|
||||
type="text"
|
||||
class="el-picker-panel__link-btn"
|
||||
@ -578,7 +579,7 @@ export default defineComponent({
|
||||
ctx.emit('set-picker-option', ['handleClear', handleClear])
|
||||
|
||||
const pickerBase = inject('EP_PICKER_BASE') as any
|
||||
const { shortcuts, disabledDate, cellClassName, format, defaultTime, defaultValue, arrowControl } = pickerBase.props
|
||||
const { shortcuts, disabledDate, cellClassName, format, defaultTime, defaultValue, arrowControl, clearable } = pickerBase.props
|
||||
|
||||
watch(() => props.parsedValue, newVal => {
|
||||
if (newVal && newVal.length === 2) {
|
||||
@ -652,6 +653,7 @@ export default defineComponent({
|
||||
handleClear,
|
||||
handleConfirm,
|
||||
timeFormat,
|
||||
clearable,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user