文件显示
This commit is contained in:
1 parent
16e446e50f
commit
36b5ebce51
3 files changed
+11
-8
No files matched your search
@@ -1,17 +1,17 @@
|
||||
<template id="file-upload">
|
||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
|
||||
<v-file-input multiple v-model="inputFile" hide-input dense filled single-line style="width: 10px;" color="red"
|
||||
label="请选择文件"></v-file-input>
|
||||
label="请选择文件" :disabled="disabled"></v-file-input>
|
||||
<v-card outlined class="mt-2" v-if="value && value.length > 0">
|
||||
<v-data-table :headers="headers" :items="value"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }" :items-per-page="100" :loading="isTableLoading"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }" :items-per-page="20" :loading="isTableLoading"
|
||||
mobile-breakpoint="0" :class="{'mx-2': isMobile}"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.download-path="{ item }">
|
||||
<preview-file-group :file-list="[item]" />
|
||||
</template>
|
||||
<template v-slot:item.action="{ item, index }">
|
||||
<span role="button" class="success--text font-weight-medium font-size-2"
|
||||
<span v-if="!disabled" role="button" class="success--text font-weight-medium font-size-2"
|
||||
@click="doUiAction('deleteItem', { item, index })">
|
||||
<v-icon size="14" class="success--text">mdi-trash-can-outline</v-icon>删除
|
||||
</span>
|
||||
@@ -39,6 +39,10 @@
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
@@ -98,7 +102,7 @@
|
||||
window.vtoast.loading(`${file.name} 上传进度: 0.00%`);
|
||||
const result = await window.jianghuAxios.httpUploadByStream({
|
||||
file,
|
||||
fileDirectory: `test`,
|
||||
fileDirectory: `task`,
|
||||
onProgress: (total, loaded) => {
|
||||
const progress = Number((loaded * 100 / total).toFixed(2));
|
||||
window.vtoast.loading(`${file.name} 上传进度: ${progress}%`);
|
||||
|
||||
Reference in new issue
Block a user