refactor: 调整 eslint.config.js,优化代码格式

This commit is contained in:
2024-10-28 21:20:08 +08:00
parent 0e8fe5ff1f
commit 9e5dff144b
176 changed files with 5956 additions and 5624 deletions

View File

@@ -51,7 +51,7 @@ if (obj && obj.top && obj.left) {
axis.value.left = obj.left
}
const { x, y } = useDraggable(audioRef, {
initialValue: { x: axis.value.left - boxWidth.value, y: axis.value.top }
initialValue: { x: axis.value.left - boxWidth.value, y: axis.value.top },
})
const audioStyle = computed(() => {
@@ -72,7 +72,7 @@ const audioStyle = computed(() => {
sessionStorage.setItem('AudioDialogXY', JSON.stringify({ top, left }))
return {
left: `${left}px`,
top: `${top}px`
top: `${top}px`,
}
})

View File

@@ -20,14 +20,14 @@ function createModal<T extends { callback?: () => void }>(component: Component,
document.body.removeChild(el)
options?.callback && options?.callback()
}, 350)
}
},
})
instance.use(ArcoVue)
instance.use(ArcoVueIcon)
instance.mount(el)
}
type TFileOptions = { data: FileItem, callback?: () => void }
interface TFileOptions { data: FileItem, callback?: () => void }
/** 预览 音频文件 弹窗 */
let fileAudioId = ''
@@ -39,6 +39,6 @@ export function previewFileAudioModal(data: FileItem) {
// 关闭的回调
callback: () => {
fileAudioId = ''
}
},
})
}

View File

@@ -12,6 +12,6 @@ export function openFileDetailModal(fileItem: FileItem) {
modalStyle: { maxWidth: '320px' },
width: '90%',
footer: false,
content: () => h(ModalContent, { data: fileItem })
content: () => h(ModalContent, { data: fileItem }),
})
}

View File

@@ -24,7 +24,7 @@ const props = withDefaults(defineProps<Props>(), {})
const formRef = ref<FormInstance>()
const form = reactive({
name: props.data?.name || ''
name: props.data?.name || '',
})
defineExpose({ formRef })

View File

@@ -15,7 +15,7 @@ export function openFileRenameModal(data: FileItem, callback?: () => void) {
data,
ref: (e) => {
ModalContentRef.value = e as any
}
},
}),
onBeforeOk: async () => {
const isInvalid = await ModalContentRef.value?.formRef?.validate()
@@ -27,6 +27,6 @@ export function openFileRenameModal(data: FileItem, callback?: () => void) {
callback()
}
return true
}
},
})
}

View File

@@ -18,7 +18,7 @@ onMounted(() => {
lang: 'zh-cn',
autoplay: true,
closeVideoClick: true,
videoInit: true
videoInit: true,
})
})
</script>

View File

@@ -8,6 +8,6 @@ export function previewFileVideoModal(data: FileItem) {
title: '视频播放',
width: 'auto',
modalStyle: {},
content: () => h(ModalContent, { data })
content: () => h(ModalContent, { data }),
})
}