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>
This commit is contained in:
peterlu14
2023-12-15 11:59:53 +08:00
parent bcbe2b94b5
commit 5e761d68b4
2 changed files with 2 additions and 0 deletions
@@ -36,6 +36,7 @@ export default {
methods: {
confirm: function () {
this.$emit('confirm', [this.inputValue, this.lock])
this.inputValue = ''
},
undo: function () {
this.inputValue = ''
@@ -862,6 +862,7 @@ const chartActs = {
const { chartID, gridIndex, gridSourceIndex } = payload
const gridSource = state.chartData[chartID].gridSource[gridIndex][gridSourceIndex]
if (gridSource === undefined) return
// remove series
const seriesIndex = state.chartData[chartID].series.findIndex((val) => {
return val.name === gridSource.name