hookehuyr

refactor(组件): 移除未使用的vue导入以优化代码

移除多个组件中未使用的`defineProps`和`defineEmits`导入,减少冗余代码并提高代码简洁性。同时更新部分文件的注释信息以保持一致性。
......@@ -14,7 +14,6 @@
</template>
<script setup>
import { defineProps } from 'vue'
import BottomNav from './BottomNav.vue'
import GradientHeader from '../ui/GradientHeader.vue'
......
<!--
* @Date: 2025-03-20 20:36:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-21 15:37:21
* @FilePath: /mlaj/src/components/ui/ActivityCard.vue
* @Description: 文件描述
-->
<template>
<router-link :to="`/activities/${activity.id}`">
<FrostedGlass class="flex overflow-hidden rounded-xl shadow-sm">
......@@ -68,7 +75,6 @@
</template>
<script setup>
import { defineProps } from 'vue'
import FrostedGlass from './FrostedGlass.vue'
defineProps({
......
......@@ -31,7 +31,6 @@
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
import FrostedGlass from './FrostedGlass.vue'
const props = defineProps({
......
......@@ -26,8 +26,6 @@
</template>
<script setup>
import { defineProps } from 'vue'
defineProps({
course: {
type: Object,
......
<!--
* @Date: 2025-03-20 20:36:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-21 15:37:45
* @FilePath: /mlaj/src/components/ui/FrostedGlass.vue
* @Description: 文件描述
-->
<template>
<div
:class="[
......@@ -10,8 +17,6 @@
</template>
<script setup>
import { defineProps } from 'vue'
defineProps({
className: {
type: String,
......
......@@ -23,8 +23,6 @@
</template>
<script setup>
import { defineProps } from 'vue'
defineProps({
title: {
type: String,
......
<!--
* @Date: 2025-03-20 15:33:07
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-21 11:11:19
* @LastEditTime: 2025-03-21 15:38:03
* @FilePath: /mlaj/src/components/ui/LiveStreamCard.vue
* @Description: 文件描述
-->
......@@ -43,8 +43,6 @@
</template>
<script setup>
import { defineProps } from 'vue'
defineProps({
stream: {
type: Object,
......
......@@ -15,7 +15,7 @@
</template>
<script setup>
import { defineProps, defineEmits, watch, ref } from 'vue'
import { watch, ref } from 'vue'
import { useRouter } from 'vue-router'
import FrostedGlass from './FrostedGlass.vue'
......
......@@ -51,7 +51,7 @@
</template>
<script setup>
import { defineProps, onMounted, ref } from "vue";
import { onMounted, ref } from "vue";
import Swiper from "swiper";
import { Pagination, EffectCards } from "swiper/modules";
import "swiper/css";
......
......@@ -125,7 +125,7 @@ const routes = [
]
const router = createRouter({
history: createWebHistory(import.meta.env.VITE_BASE),
history: createWebHistory(import.meta.env.VITE_BASE || '/'),
routes,
scrollBehavior(to, from, savedPosition) {
// 每次路由切换后,页面滚动到顶部
......