mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-10 20:57:10 +08:00
refactor: 更换 ESLint 配置为 @antfu/eslint-config
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useDraggable, useWindowSize, useElementSize } from '@vueuse/core'
|
||||
import { useDraggable, useElementSize, useWindowSize } from '@vueuse/core'
|
||||
import type { FileItem } from '@/apis'
|
||||
|
||||
interface Props {
|
||||
@@ -71,8 +71,8 @@ const audioStyle = computed(() => {
|
||||
}
|
||||
sessionStorage.setItem('AudioDialogXY', JSON.stringify({ top, left }))
|
||||
return {
|
||||
left: left + 'px',
|
||||
top: top + 'px'
|
||||
left: `${left}px`,
|
||||
top: `${top}px`
|
||||
}
|
||||
})
|
||||
|
||||
|
@@ -2,9 +2,8 @@ import type { Component } from 'vue'
|
||||
import { createApp } from 'vue'
|
||||
import ArcoVueIcon from '@arco-design/web-vue/es/icon'
|
||||
import ArcoVue from '@arco-design/web-vue'
|
||||
import type { FileItem } from '@/apis'
|
||||
|
||||
import ModalContent from './ModalContent.vue'
|
||||
import type { FileItem } from '@/apis'
|
||||
|
||||
function createModal<T extends { callback?: () => void }>(component: Component, options?: T) {
|
||||
// 创建一个挂载容器
|
||||
@@ -28,7 +27,7 @@ function createModal<T extends { callback?: () => void }>(component: Component,
|
||||
instance.use(ArcoVueIcon)
|
||||
instance.mount(el)
|
||||
}
|
||||
type TFileOptions = { data: FileItem; callback?: () => void }
|
||||
type TFileOptions = { data: FileItem, callback?: () => void }
|
||||
|
||||
/** 预览 音频文件 弹窗 */
|
||||
let fileAudioId = ''
|
||||
@@ -36,7 +35,7 @@ export function previewFileAudioModal(data: FileItem) {
|
||||
if (fileAudioId) return // 防止重复打开
|
||||
fileAudioId = data.id
|
||||
return createModal<TFileOptions>(ModalContent, {
|
||||
data: data,
|
||||
data,
|
||||
// 关闭的回调
|
||||
callback: () => {
|
||||
fileAudioId = ''
|
||||
|
@@ -14,8 +14,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { FileItem } from '@/apis'
|
||||
import FileImage from '../../main/FileMain/FileImage.vue'
|
||||
import type { FileItem } from '@/apis'
|
||||
import { formatFileSize } from '@/utils'
|
||||
|
||||
interface Props {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import type { FileItem } from '@/apis'
|
||||
import { h } from 'vue'
|
||||
import { Modal } from '@arco-design/web-vue'
|
||||
import ModalContent from './ModalContent.vue'
|
||||
import type { FileItem } from '@/apis'
|
||||
|
||||
/** 打开 详情 弹窗 */
|
||||
export function openFileDetailModal(fileItem: FileItem) {
|
||||
|
@@ -14,8 +14,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { FileItem } from '@/apis'
|
||||
import type { FormInstance } from '@arco-design/web-vue'
|
||||
import type { FileItem } from '@/apis'
|
||||
|
||||
interface Props {
|
||||
data: FileItem
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { updateFile, type FileItem } from '@/apis'
|
||||
import { ref, h } from 'vue'
|
||||
import { Modal, Message } from '@arco-design/web-vue'
|
||||
import { h, ref } from 'vue'
|
||||
import { Message, Modal } from '@arco-design/web-vue'
|
||||
import ModalContent from './ModalContent.vue'
|
||||
import { type FileItem, updateFile } from '@/apis'
|
||||
|
||||
export function openFileRenameModal(data: FileItem, callback?: () => void) {
|
||||
const ModalContentRef = ref<InstanceType<typeof ModalContent>>()
|
||||
|
@@ -8,6 +8,6 @@ export function previewFileVideoModal(data: FileItem) {
|
||||
title: '视频播放',
|
||||
width: 'auto',
|
||||
modalStyle: {},
|
||||
content: () => h(ModalContent, { data: data })
|
||||
content: () => h(ModalContent, { data })
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user