lint:fix all
This commit is contained in:
@@ -8,14 +8,16 @@
|
||||
leave-from-class="translate-x-0"
|
||||
leave-to-class="translate-x-full"
|
||||
>
|
||||
<div
|
||||
<div
|
||||
v-if="isOpen"
|
||||
class="fixed right-0 top-16 h-[calc(100vh-4rem)] w-full sm:w-96 bg-white dark:bg-gray-900 shadow-2xl z-40 overflow-y-auto border-l border-gray-200 dark:border-gray-700 custom-scrollbar"
|
||||
>
|
||||
<!-- 头部 -->
|
||||
<div class="sticky top-0 bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 px-6 py-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">页面设置</h2>
|
||||
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">
|
||||
页面设置
|
||||
</h2>
|
||||
<UButton
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
@@ -30,7 +32,9 @@
|
||||
<div class="p-6 space-y-8">
|
||||
<!-- 主题 -->
|
||||
<div>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">主题</h3>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">
|
||||
主题
|
||||
</h3>
|
||||
<div class="grid grid-cols-3 gap-3">
|
||||
<UButton
|
||||
v-for="theme in themes"
|
||||
@@ -47,7 +51,9 @@
|
||||
|
||||
<!-- 字体 -->
|
||||
<div>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">字体</h3>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">
|
||||
字体
|
||||
</h3>
|
||||
<div class="grid grid-cols-3 gap-3">
|
||||
<UButton
|
||||
v-for="font in fonts"
|
||||
@@ -64,7 +70,9 @@
|
||||
|
||||
<!-- 字号 -->
|
||||
<div>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">字号</h3>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">
|
||||
字号
|
||||
</h3>
|
||||
<div class="grid grid-cols-5 gap-2">
|
||||
<UButton
|
||||
v-for="size in fontSizes"
|
||||
@@ -81,7 +89,9 @@
|
||||
|
||||
<!-- 主题色 -->
|
||||
<div>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">主题色</h3>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">
|
||||
主题色
|
||||
</h3>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<UButton
|
||||
v-for="color in themeColors"
|
||||
@@ -93,7 +103,7 @@
|
||||
@click="selectedThemeColor = color.value"
|
||||
>
|
||||
<template #leading>
|
||||
<div
|
||||
<div
|
||||
class="w-4 h-4 rounded-full border border-gray-300 dark:border-gray-600"
|
||||
:style="{ backgroundColor: color.color }"
|
||||
/>
|
||||
@@ -105,7 +115,9 @@
|
||||
|
||||
<!-- 自定义主题色 -->
|
||||
<div>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">自定义主题色</h3>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">
|
||||
自定义主题色
|
||||
</h3>
|
||||
<div class="flex items-center space-x-3">
|
||||
<input
|
||||
v-model="customColor"
|
||||
@@ -124,7 +136,9 @@
|
||||
|
||||
<!-- 代码块主题 -->
|
||||
<div>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">代码块主题</h3>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">
|
||||
代码块主题
|
||||
</h3>
|
||||
<USelect
|
||||
v-model="selectedCodeTheme"
|
||||
:options="codeThemes"
|
||||
@@ -136,7 +150,9 @@
|
||||
|
||||
<!-- 图注格式 -->
|
||||
<div>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">图注格式</h3>
|
||||
<h3 class="text-base font-medium text-gray-900 dark:text-white mb-4">
|
||||
图注格式
|
||||
</h3>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<UButton
|
||||
v-for="format in captionFormats"
|
||||
@@ -204,7 +220,7 @@ const {
|
||||
selectedCaptionFormat,
|
||||
applyCustomColor,
|
||||
resetSettings
|
||||
} = useTheme();
|
||||
} = useTheme()
|
||||
|
||||
// 监听键盘事件(只监听 ESC 键)
|
||||
onMounted(() => {
|
||||
@@ -213,11 +229,11 @@ onMounted(() => {
|
||||
emit('close')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('keydown', handleKeydown)
|
||||
|
||||
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('keydown', handleKeydown)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user