Commit d2cefc9c authored by wcmoon's avatar wcmoon

fix: 适配模板的文件类型项

parent 45fb07bb
...@@ -59,7 +59,9 @@ export default { ...@@ -59,7 +59,9 @@ export default {
let hashes = []; let hashes = [];
for (let index = 0; index < this.property.value.length; index++) { for (let index = 0; index < this.property.value.length; index++) {
const element = this.property.value[index]; const element = this.property.value[index];
hashes.push(element.value); if (element.value) {
hashes.push(element.value);
}
} }
if (hashes.length === this.property.value.length) { if (hashes.length === this.property.value.length) {
this.getAudios(hashes); this.getAudios(hashes);
...@@ -223,4 +225,4 @@ export default { ...@@ -223,4 +225,4 @@ export default {
.audio-box { .audio-box {
padding: 20px; padding: 20px;
} }
</style> </style>
\ No newline at end of file
...@@ -84,7 +84,7 @@ export default class ImageForm extends Vue { ...@@ -84,7 +84,7 @@ export default class ImageForm extends Vue {
this.property.value = this.imageInfo.imgList; this.property.value = this.imageInfo.imgList;
} }
public async PushList(url: any) { public async PushList(url: any) {
if (!url) return false; if (!url || !url.value) return false;
this.imageInfo.imgList.push({ this.imageInfo.imgList.push({
url: await this.requestPictures(url.value), url: await this.requestPictures(url.value),
hash: url.value, //同时保存hash hash: url.value, //同时保存hash
......
...@@ -51,7 +51,9 @@ export default { ...@@ -51,7 +51,9 @@ export default {
let hashes = []; let hashes = [];
for (let index = 0; index < this.property.value.length; index++) { for (let index = 0; index < this.property.value.length; index++) {
const element = this.property.value[index]; const element = this.property.value[index];
hashes.push(element.value); if (element.value) {
hashes.push(element.value);
}
} }
if (hashes.length === this.property.value.length) { if (hashes.length === this.property.value.length) {
this.getPDF(hashes); this.getPDF(hashes);
...@@ -235,4 +237,4 @@ export default { ...@@ -235,4 +237,4 @@ export default {
padding-right: 6px; padding-right: 6px;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -83,7 +83,9 @@ export default { ...@@ -83,7 +83,9 @@ export default {
let hashes = []; let hashes = [];
for (let index = 0; index < this.property.value.length; index++) { for (let index = 0; index < this.property.value.length; index++) {
const element = this.property.value[index]; const element = this.property.value[index];
hashes.push(element.value); if (element.value) {
hashes.push(element.value);
}
} }
if (hashes.length === this.property.value.length) { if (hashes.length === this.property.value.length) {
this.getVideos(hashes); this.getVideos(hashes);
...@@ -284,4 +286,4 @@ video { ...@@ -284,4 +286,4 @@ video {
.left { .left {
float: right; float: right;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment