刘光辉
3 小时以前 cf11e63b659afcc9792ab3e395f1b45d844431a8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<script lang="ts" setup>
import { computed } from 'vue';
import { useRoute } from 'vue-router';
 
import FileCenter from '../file-center/FileCenter.vue';
 
defineOptions({ name: 'DmsCurrentFileCenter' });
 
const route = useRoute();
 
function queryText(value: unknown) {
  if (typeof value === 'string') return value;
  if (Array.isArray(value) && typeof value[0] === 'string') return value[0];
  return '';
}
 
const targetFolderId = computed(() => queryText(route.query.dmsFolderId));
const targetFolderPath = computed(() => queryText(route.query.dmsFolderPath));
</script>
 
<template>
  <FileCenter mode="CURRENT" :target-folder-id="targetFolderId" :target-folder-path="targetFolderPath" />
</template>