|
@@ -18,45 +18,47 @@
|
|
@blur="focusing = false"
|
|
@blur="focusing = false"
|
|
@click="focusing = false"
|
|
@click="focusing = false"
|
|
>
|
|
>
|
|
- <img
|
|
|
|
- class="el-upload-list__item-thumbnail"
|
|
|
|
- v-if="file.status !== 'uploading' && ['picture-card', 'picture'].indexOf(listType) > -1"
|
|
|
|
- :src="file.url" alt=""
|
|
|
|
- >
|
|
|
|
- <a class="el-upload-list__item-name" @click="handleClick(file)">
|
|
|
|
- <i class="el-icon-document"></i>{{file.name}}
|
|
|
|
- </a>
|
|
|
|
- <label class="el-upload-list__item-status-label">
|
|
|
|
- <i :class="{
|
|
|
|
- 'el-icon-upload-success': true,
|
|
|
|
- 'el-icon-circle-check': listType === 'text',
|
|
|
|
- 'el-icon-check': ['picture-card', 'picture'].indexOf(listType) > -1
|
|
|
|
- }"></i>
|
|
|
|
- </label>
|
|
|
|
- <i class="el-icon-close" v-if="!disabled" @click="$emit('remove', file)"></i>
|
|
|
|
- <i class="el-icon-close-tip" v-if="!disabled">{{ t('el.upload.deleteTip') }}</i> <!--因为close按钮只在li:focus的时候 display, li blur后就不存在了,所以键盘导航时永远无法 focus到 close按钮上-->
|
|
|
|
- <el-progress
|
|
|
|
- v-if="file.status === 'uploading'"
|
|
|
|
- :type="listType === 'picture-card' ? 'circle' : 'line'"
|
|
|
|
- :stroke-width="listType === 'picture-card' ? 6 : 2"
|
|
|
|
- :percentage="parsePercentage(file.percentage)">
|
|
|
|
- </el-progress>
|
|
|
|
- <span class="el-upload-list__item-actions" v-if="listType === 'picture-card'">
|
|
|
|
- <span
|
|
|
|
- class="el-upload-list__item-preview"
|
|
|
|
- v-if="handlePreview && listType === 'picture-card'"
|
|
|
|
- @click="handlePreview(file)"
|
|
|
|
|
|
+ <slot :file="file">
|
|
|
|
+ <img
|
|
|
|
+ class="el-upload-list__item-thumbnail"
|
|
|
|
+ v-if="file.status !== 'uploading' && ['picture-card', 'picture'].indexOf(listType) > -1"
|
|
|
|
+ :src="file.url" alt=""
|
|
>
|
|
>
|
|
- <i class="el-icon-zoom-in"></i>
|
|
|
|
|
|
+ <a class="el-upload-list__item-name" @click="handleClick(file)">
|
|
|
|
+ <i class="el-icon-document"></i>{{file.name}}
|
|
|
|
+ </a>
|
|
|
|
+ <label class="el-upload-list__item-status-label">
|
|
|
|
+ <i :class="{
|
|
|
|
+ 'el-icon-upload-success': true,
|
|
|
|
+ 'el-icon-circle-check': listType === 'text',
|
|
|
|
+ 'el-icon-check': ['picture-card', 'picture'].indexOf(listType) > -1
|
|
|
|
+ }"></i>
|
|
|
|
+ </label>
|
|
|
|
+ <i class="el-icon-close" v-if="!disabled" @click="$emit('remove', file)"></i>
|
|
|
|
+ <i class="el-icon-close-tip" v-if="!disabled">{{ t('el.upload.deleteTip') }}</i> <!--因为close按钮只在li:focus的时候 display, li blur后就不存在了,所以键盘导航时永远无法 focus到 close按钮上-->
|
|
|
|
+ <el-progress
|
|
|
|
+ v-if="file.status === 'uploading'"
|
|
|
|
+ :type="listType === 'picture-card' ? 'circle' : 'line'"
|
|
|
|
+ :stroke-width="listType === 'picture-card' ? 6 : 2"
|
|
|
|
+ :percentage="parsePercentage(file.percentage)">
|
|
|
|
+ </el-progress>
|
|
|
|
+ <span class="el-upload-list__item-actions" v-if="listType === 'picture-card'">
|
|
|
|
+ <span
|
|
|
|
+ class="el-upload-list__item-preview"
|
|
|
|
+ v-if="handlePreview && listType === 'picture-card'"
|
|
|
|
+ @click="handlePreview(file)"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-zoom-in"></i>
|
|
|
|
+ </span>
|
|
|
|
+ <span
|
|
|
|
+ v-if="!disabled"
|
|
|
|
+ class="el-upload-list__item-delete"
|
|
|
|
+ @click="$emit('remove', file)"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-delete"></i>
|
|
|
|
+ </span>
|
|
</span>
|
|
</span>
|
|
- <span
|
|
|
|
- v-if="!disabled"
|
|
|
|
- class="el-upload-list__item-delete"
|
|
|
|
- @click="$emit('remove', file)"
|
|
|
|
- >
|
|
|
|
- <i class="el-icon-delete"></i>
|
|
|
|
- </span>
|
|
|
|
- </span>
|
|
|
|
|
|
+ </slot>
|
|
</li>
|
|
</li>
|
|
</transition-group>
|
|
</transition-group>
|
|
</template>
|
|
</template>
|