ZhangXianQiang
2024-07-02 34c98099b187bef54aa81fc3fa680fe8099eb3ad
src/views/folder/index.vue
@@ -56,7 +56,7 @@
import { ref } from 'vue';
import NormalHeader from '@/components/NormalHeader/index.vue';
import { Search } from '@element-plus/icons-vue';
import { getFileList } from '@/api/modules/file.js';
const fileType = {
  'img': {
@@ -69,14 +69,12 @@
    iconPath: '/static/icons/file_type_video.png',
    handle: (item) => {
      console.log(item);
    }
  },
  'pdf': {
    iconPath: '/static/icons/file_type_image.png',
    handle: (item) => {
      console.log(item);
    }
  },
};
@@ -120,6 +118,13 @@
  fileType[item.type] && fileType[item.type].handle(item);
};
const getData = () => {
  getFileList().then(res => {
  });
};
getData();
</script>
<style lang="scss" scoped>