message: fix(Uploader): should't emit click-preview when delete
diff: @@ -200,19 +200,19 @@ export default createComponent({
  this.$emit('click-preview', file, this.detail);
  },
  - renderPreview() {
  - if (!this.previewImage) {
  - return;
  - }
  -
  - return this.fileList.map((item, index) => (
  - <div
  - class={bem('preview')}
  - onClick={() => {
  - this.onClickPreview(item);
  + renderPreviewItem(item, index) {
  + const DeleteIcon = (
  + <Icon
  + name="delete"
  + class={bem('preview-delete')}
  + onClick={event => {
  + event.stopPropagation();
  + this.onDelete(item, index);
  }}
  - >
  - {isImageFile(item) ? (
  + />
  + );
  +
  + const Preview = isImageFile(item) ? (
  <Image
  fit={this.imageFit}
  src={item.content || item.url}
  @@ -236,16 +236,25 @@ export default createComponent({
  {item.file ? item.file.name : item.url}
  </div>
  </div>
  - )}
  - <Icon
  - name="delete"
  - class={bem('preview-delete')}
  + );
  +
  + return (
  + <div
  + class={bem('preview')}
  onClick={() => {
  - this.onDelete(item, index);
  + this.onClickPreview(item);
  }}
  - />
  + >
  + {Preview}
  + {DeleteIcon}
  </div>
  - ));
  + );
  + },
  +
  + renderPreviewList() {
  + if (this.previewImage) {
  + return this.fileList.map(this.renderPreviewItem);
  + }
  },
  renderUpload() {
  @@ -299,7 +308,7 @@ export default createComponent({
  return (
  <div class={bem()}>
  <div class={bem('wrapper')}>
  - {this.renderPreview()}
  + {this.renderPreviewList()}
  {this.renderUpload()}
  </div>
  </div>
  