chore: 优化 apis 导入,随着模块和接口的增加,方便维护

This commit is contained in:
2024-09-06 21:14:13 +08:00
parent cb03111c22
commit 8a80db0f92
80 changed files with 210 additions and 179 deletions

View File

@@ -21,7 +21,7 @@
<script setup lang="ts">
import { useDraggable, useElementSize, useWindowSize } from '@vueuse/core'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data: FileItem

View File

@@ -3,7 +3,7 @@ import { createApp } from 'vue'
import ArcoVueIcon from '@arco-design/web-vue/es/icon'
import ArcoVue from '@arco-design/web-vue'
import ModalContent from './ModalContent.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
function createModal<T extends { callback?: () => void }>(component: Component, options?: T) {
// 创建一个挂载容器

View File

@@ -22,7 +22,7 @@
<script setup lang="ts">
import FileImage from '../../main/FileMain/FileImage.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
import { formatFileSize } from '@/utils'
interface Props {

View File

@@ -1,7 +1,7 @@
import { h } from 'vue'
import { Modal } from '@arco-design/web-vue'
import ModalContent from './ModalContent.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
/** 打开 详情 弹窗 */
export function openFileDetailModal(fileItem: FileItem) {

View File

@@ -15,7 +15,7 @@
<script lang="ts" setup>
import type { FormInstance } from '@arco-design/web-vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data: FileItem

View File

@@ -1,7 +1,7 @@
import { h, ref } from 'vue'
import { Message, Modal } from '@arco-design/web-vue'
import ModalContent from './ModalContent.vue'
import { type FileItem, updateFile } from '@/apis'
import { type FileItem, updateFile } from '@/apis/system'
export function openFileRenameModal(data: FileItem, callback?: () => void) {
const ModalContentRef = ref<InstanceType<typeof ModalContent>>()

View File

@@ -4,7 +4,7 @@
<script lang="ts" setup>
import Player from 'xgplayer'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data: FileItem

View File

@@ -1,7 +1,7 @@
import { h } from 'vue'
import { Modal } from '@arco-design/web-vue'
import ModalContent from './ModalContent.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
export function previewFileVideoModal(data: FileItem) {
return Modal.open({