mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
refactor(frontend): 代码格式化与移动端响应式优化
- 修正 Vue 组件 defineProps/defineEmits 声明顺序 - 优化首页移动端布局,调整 Logo 位置与透明度 - 为 Aether 标题添加打字机动画效果 - 修复 HTML 属性中引号的实体转义
This commit is contained in:
@@ -17,6 +17,11 @@ import {
|
||||
type ChartOptions
|
||||
} from 'chart.js'
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
height: 300,
|
||||
options: undefined
|
||||
})
|
||||
|
||||
ChartJS.register(
|
||||
ArcElement,
|
||||
DoughnutController,
|
||||
@@ -31,11 +36,6 @@ interface Props {
|
||||
height?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
height: 300,
|
||||
options: undefined
|
||||
})
|
||||
|
||||
const chartRef = ref<HTMLCanvasElement>()
|
||||
let chart: ChartJS<'doughnut'> | null = null
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<div v-if="masked" class="group relative">
|
||||
<div
|
||||
v-if="masked"
|
||||
class="group relative"
|
||||
>
|
||||
<input
|
||||
ref="inputRef"
|
||||
:class="inputClass"
|
||||
@@ -25,8 +28,14 @@
|
||||
:aria-label="isVisible ? '隐藏内容' : '显示内容'"
|
||||
@click="toggleVisibility"
|
||||
>
|
||||
<EyeOff v-if="isVisible" class="h-4 w-4" />
|
||||
<Eye v-else class="h-4 w-4" />
|
||||
<EyeOff
|
||||
v-if="isVisible"
|
||||
class="h-4 w-4"
|
||||
/>
|
||||
<Eye
|
||||
v-else
|
||||
class="h-4 w-4"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
@@ -54,6 +63,12 @@ import { computed, useAttrs, ref } from 'vue'
|
||||
import { Eye, EyeOff } from 'lucide-vue-next'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:modelValue': [value: string]
|
||||
}>()
|
||||
|
||||
// 开发环境警告:type="password" 已被弃用
|
||||
const warnPasswordType = import.meta.env.DEV
|
||||
? (() => {
|
||||
@@ -96,12 +111,7 @@ interface Props {
|
||||
disableAutofill?: boolean
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
const attrs = useAttrs()
|
||||
const emit = defineEmits<{
|
||||
'update:modelValue': [value: string]
|
||||
}>()
|
||||
|
||||
const inputRef = ref<HTMLInputElement | null>(null)
|
||||
const isVisible = ref(false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user