提交 ce50ac97 authored 作者: lihuihui's avatar lihuihui

update

上级 eea3a471
......@@ -92,8 +92,7 @@ export default {
]
}
},
created() {
},
created() {},
mounted() {
if (Object.keys(this.data).length) {
this.dataEcho()
......@@ -156,6 +155,7 @@ export default {
},
// 传回父组件需要提交缓存的数据
makePreview() {
let flag = true
const params = {
titleParams: this.titleParams,
imgParams: this.imgParams,
......@@ -163,16 +163,31 @@ export default {
btnParams: this.btnParams
}
for (const data in params) {
console.log(params[data], '123')
if (params[data].show !== false || params[data].textValue === '') {
this.$message({
message: '请编辑主题',
type: 'warning'
})
return false
if (params[data].show !== false) {
flag = false
} else {
if (!params.titleParams.textValue || !params.describeParams.textValue || !params.btnParams.textValue) {
flag = false
} else {
if (
params.titleParams.textValue === '' ||
params.describeParams.textValue === '' ||
params.btnParams.textValue === ''
) {
flag = false
}
}
}
}
return params
if (flag) {
return params
} else {
this.$message({
message: '请编辑主题',
type: 'warning'
})
return false
}
},
// 上传图片
uploadImg() {
......
......@@ -77,7 +77,7 @@ export default {
})
} else if (this.data.index === 0) {
console.log(this.data)
if (this.data.date === '' || this.data.time === '' || this.data.time === null) {
if (this.data.date === '' || this.data.date === null || this.data.time === '' || this.data.time === null) {
flag = false
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论