fix: resolve all ESLint errors in Vue components

Fixed 22 ESLint errors across 26 Vue component files:
- Removed TypeScript type annotations from ReadingProgress.vue (converted to JS)
- Removed unused variables, imports, and duplicate function declarations
- Fixed HTML parsing errors (invalid attribute names, unclosed tags)
- Added missing :key directives to v-for loops
- Fixed duplicate object keys (backgroundImage)
- Replaced special characters in comments to avoid parsing issues
- Fixed malformed HTML tags (v-else", 003e attributes)

All warnings were left unchanged as requested. Build now passes with 0 errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
sanbuphy
2026-02-20 01:03:38 +08:00
parent 8078ee201c
commit 66b2ba6e45
26 changed files with 29 additions and 124 deletions
@@ -35,21 +35,21 @@
</Transition>
</template>
<script setup lang="ts">
<script setup>
import { ref, onMounted, onUnmounted } from 'vue'
const progress = ref(0)
const showProgress = ref(false)
const showArrow = ref(false)
// 圆周长 = 2 * PI * r, r=24
// Circle circumference = 2 * PI * r, where r=24
const circumference = 2 * Math.PI * 24
let scrollTimer: number | null = null
let scrollTimer = null
// 拖拽相关状态
const isDragging = ref(false)
const startY = ref(0)
const startProgress = ref(0)
let dragRafId: number | null = null
let dragRafId = null
const updateProgress = () => {
// 拖拽时不更新进度,避免冲突
@@ -79,7 +79,7 @@ const updateProgress = () => {
}
// 开始拖拽
const startDrag = (e: MouseEvent | TouchEvent) => {
const startDrag = (e) => {
e.preventDefault()
isDragging.value = true
@@ -94,7 +94,7 @@ const startDrag = (e: MouseEvent | TouchEvent) => {
}
// 拖拽中
const onDrag = (e: MouseEvent | TouchEvent) => {
const onDrag = (e) => {
if (!isDragging.value) return
e.preventDefault()
@@ -150,7 +150,7 @@ const endDrag = () => {
}
// 点击回到顶部
const handleClick = (e: MouseEvent) => {
const handleClick = (e) => {
// 如果是拖拽结束后的点击,不触发回到顶部
if (isDragging.value) return