|
@@ -514,8 +514,8 @@ export default {
|
|
|
},
|
|
|
addGrid() {
|
|
|
if (!this.file.userid || this.file.userid == this.userid) {
|
|
|
- if (!this.file.video && !this.file.photo) {
|
|
|
- this.$message.error("至少上传一个视频或者一张图片");
|
|
|
+ if (!this.file.video && !this.file.photo && this.remarks == '') {
|
|
|
+ this.$message.error("至少上传一个视频、一张图片或者备注");
|
|
|
return;
|
|
|
}
|
|
|
if (!this.data[this.gIndex]) {
|
|
@@ -523,7 +523,7 @@ export default {
|
|
|
}
|
|
|
if (this.file.photo) {
|
|
|
this.data[this.gIndex].photo = this.file.photo;
|
|
|
- } else {
|
|
|
+ } else if(this.file.video){
|
|
|
// this.playerOptions.sources[0].src = ""
|
|
|
var video = JSON.parse(JSON.stringify(this.playerOptions));
|
|
|
video.sources[0].src = this.file.video;
|