非空判断

This commit is contained in:
WUSIJIAN
2025-12-01 16:54:21 +08:00
parent 91ce6a597d
commit ad1acf29b8
2 changed files with 14 additions and 1 deletions

View File

@@ -164,6 +164,12 @@ const onSubmit = async () => {
return;
}
// 额外验证话术内容
if (!state.formData.description || state.formData.description === '<p><br></p>' || state.formData.description.trim() === '<p><br></p>') {
ElMessage.warning('产品详情内容不能为空');
return;
}
// 根据ID判断是新增还是修改
if (state.formData.id === 0) {
// 新增产品