|
|
@ -11,7 +11,7 @@ |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="正文:" prop="content"> |
|
|
|
<editor /> |
|
|
|
<editor ref="editor" /> |
|
|
|
<!-- <el-input |
|
|
|
type="textarea" |
|
|
|
:rows="2" |
|
|
@ -90,8 +90,11 @@ |
|
|
|
submit(formName) { |
|
|
|
this.$refs.ruleForm.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
const child = this.$refs['editor'] |
|
|
|
formName.content = child.getValue(); |
|
|
|
if(this.showAdd){ |
|
|
|
this.addCarousel(formName) |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.updateCarousel(formName) |
|
|
|
} |
|
|
@ -114,7 +117,7 @@ |
|
|
|
await ADD_DETAIL(params).then((res) => { |
|
|
|
if(res.code === 200){ |
|
|
|
Alert.success('添加成功'); |
|
|
|
this.$emit('close', true) |
|
|
|
this.$emit('close') |
|
|
|
}else{ |
|
|
|
Alert.fail(res.msg || '添加失败'); |
|
|
|
} |
|
|
@ -134,7 +137,7 @@ |
|
|
|
await UPDATE_DETAIL(params).then((res) => { |
|
|
|
if(res.code === 200){ |
|
|
|
Alert.success('修改成功'); |
|
|
|
this.$emit('close', true) |
|
|
|
this.$emit('close') |
|
|
|
}else{ |
|
|
|
Alert.fail(res.msg || '修改失败'); |
|
|
|
} |
|
|
|