Showing
1 changed file
with
8 additions
and
3 deletions
@@ -286,13 +286,18 @@ | @@ -286,13 +286,18 @@ | ||
286 | this.selection.color = selection.color = this.colors[0]; | 286 | this.selection.color = selection.color = this.colors[0]; |
287 | } | 287 | } |
288 | 288 | ||
289 | - this.sizes = colorSizes[selection.color.value]; | ||
290 | this.colorSizes = colorSizes; | 289 | this.colorSizes = colorSizes; |
291 | this.thumbnails = thumbnails; | 290 | this.thumbnails = thumbnails; |
292 | 291 | ||
293 | // 选择默认值 | 292 | // 选择默认值 |
294 | - this.$emit('feature:color.select', selection.color); | ||
295 | - this.$emit('feature:size.select', selection.size); | 293 | + if (selection.color) { |
294 | + this.sizes = colorSizes[selection.color.value]; | ||
295 | + this.$emit('feature:color.select', selection.color); | ||
296 | + } | ||
297 | + | ||
298 | + if (selection.size) { | ||
299 | + this.$emit('feature:size.select', selection.size); | ||
300 | + } | ||
296 | } | 301 | } |
297 | }, | 302 | }, |
298 | components: { | 303 | components: { |
-
Please register or login to post a comment