5e761d68b4
- Clear input value after confirming in the SaveConfigModal component - Add a check for undefined grid source before removing series in chart actions Signed-off-by: peterlu14 <peterlu810516@gmail.com>
53 lines
966 B
Vue
53 lines
966 B
Vue
<template>
|
|
<div>
|
|
<va-modal
|
|
class="flex sm12 xl12 md12 xs12"
|
|
v-model="showModal"
|
|
size="small"
|
|
:title="'Save Config'"
|
|
:okText=" $t('modal.confirm') "
|
|
@ok="confirm"
|
|
@cancel="undo"
|
|
>
|
|
<va-input
|
|
v-model="inputValue"
|
|
removable
|
|
/>
|
|
<va-checkbox v-model="lock">
|
|
<template slot="label">
|
|
Lock
|
|
</template>
|
|
</va-checkbox>
|
|
</va-modal>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: 'save-config-modal',
|
|
components: {
|
|
},
|
|
data () {
|
|
return {
|
|
showModal: false,
|
|
inputValue: '',
|
|
lock: false,
|
|
}
|
|
},
|
|
methods: {
|
|
confirm: function () {
|
|
this.$emit('confirm', [this.inputValue, this.lock])
|
|
this.inputValue = ''
|
|
},
|
|
undo: function () {
|
|
this.inputValue = ''
|
|
},
|
|
show: function () {
|
|
this.showModal = true
|
|
},
|
|
hide: function () {
|
|
this.showModal = false
|
|
},
|
|
},
|
|
}
|
|
</script>
|