Merge branch 'FileManager' into master_v2

This commit is contained in:
fangxiang 2023-02-15 19:08:10 +08:00
commit f9207cd6eb
1 changed files with 7 additions and 9 deletions

View File

@ -156,7 +156,7 @@
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
v-if="!uploading && !iswujie" v-if="!uploading &&!iswujie"
no-caps no-caps
icon="upload" icon="upload"
:label="$t('upload file')" :label="$t('upload file')"
@ -192,6 +192,7 @@
($q.platform.is.ipad && $store.state.landspace ? '61' : '68') + ($q.platform.is.ipad && $store.state.landspace ? '61' : '68') +
'vh', 'vh',
}" }"
class="q-mb-md"
v-show="!uploading" v-show="!uploading"
:rows="files" :rows="files"
:columns="columns" :columns="columns"
@ -350,7 +351,7 @@
:label="$t('select file') + ':'" :label="$t('select file') + ':'"
:accept="uploader_accept" :accept="uploader_accept"
@start="onStartUpload" @start="onStartUpload"
@finish="onFailed" @finish="onfinish"
> >
</q-uploader> </q-uploader>
<q-space /> <q-space />
@ -804,9 +805,9 @@ export default defineComponent({
console.log(e); console.log(e);
} }
}; };
let iswujie = ref(false); let iswujie=ref(false)
if ((window as any).$wujie) { if ((window as any).$wujie) {
iswujie.value = true; iswujie.value=true
} }
// //
// watch( // watch(
@ -899,7 +900,7 @@ export default defineComponent({
prompt: { prompt: {
model: "", model: "",
isValid: (val: string) => isValid: (val: string) =>
!!val && val.trim().length > 0 && val.indexOf(".") != 0, !!val && val.trim().length > 0&& val.indexOf(".") != 0 ,
type: "text", type: "text",
}, },
ok: { ok: {
@ -1079,10 +1080,8 @@ export default defineComponent({
onStartUpload() { onStartUpload() {
loading.value = true; loading.value = true;
}, },
async onFailed(info: any) { async onfinish(info: any) {
let file_list: any = await _request_list_files(path.value);
setTimeout(() => { setTimeout(() => {
if (files.value.length != file_list.files.length) {
$q.notify({ $q.notify({
type: "positive", type: "positive",
message: $t.t("file upload") + $t.t("finish") + "!", message: $t.t("file upload") + $t.t("finish") + "!",
@ -1091,7 +1090,6 @@ export default defineComponent({
}); });
loading.value = false; loading.value = false;
uploading.value = false; uploading.value = false;
}
}, 500); }, 500);
}, },
copyFile(file: FileEntity) { copyFile(file: FileEntity) {