Files
controller-wisetopvue/src/components/task/content/configuration/SaveConfigModal.vue
T
peterlu14 5e761d68b4 feat: refine UI behavior and enhance test compatibility
- 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>
2023-12-15 11:59:53 +08:00

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>