fix: 修改重命名可以无数据的问题
This commit is contained in:
parent
15b908773d
commit
80c5856732
@ -2,11 +2,15 @@
|
|||||||
<setting-item-box name="名称" :alone="true">
|
<setting-item-box name="名称" :alone="true">
|
||||||
<n-input
|
<n-input
|
||||||
type="text"
|
type="text"
|
||||||
maxlength="6"
|
maxlength="12"
|
||||||
show-count
|
minlength="1"
|
||||||
placeholder="请输入图表名称"
|
placeholder="请输入图表名称"
|
||||||
size="small"
|
size="small"
|
||||||
|
clearable
|
||||||
|
show-count
|
||||||
v-model:value="chartConfig.title"
|
v-model:value="chartConfig.title"
|
||||||
|
@focus="handleFocus"
|
||||||
|
@blur="handleBlur"
|
||||||
></n-input>
|
></n-input>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
</template>
|
</template>
|
||||||
@ -23,4 +27,16 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let valueCatch = ''
|
||||||
|
|
||||||
|
const handleFocus = () => {
|
||||||
|
valueCatch = props.chartConfig.title
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleBlur = () => {
|
||||||
|
if(!props.chartConfig.title.length) {
|
||||||
|
window['$message'].warning('请输入至少一个字符!')
|
||||||
|
props.chartConfig.title = valueCatch
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user