fix: crontab组件增加清除功能

This commit is contained in:
“怀磊”
2021-10-28 16:56:57 +08:00
committed by 老广
parent 68411de25b
commit 79068f44bf

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="box">
<el-input v-model="input" placeholder @focus="showDialog" />
<el-input v-model="input" clearable @focus="showDialog" @clear="onClear" />
</div>
<el-dialog :title="this.$t('common.CronTab.newCron')" :visible.sync="showCron" top="8vh" width="580px" append-to-body>
<Crontab
@@ -39,6 +39,10 @@ export default {
showDialog() {
this.expression = this.input
this.showCron = true
},
onClear() {
this.input = ''
this.$emit('change', '')
}
}
}