refactor: 移除冗余的vant toast样式导入并更新按钮文案
移除多个组件中重复导入的vant toast样式,统一在App.vue中导入,提高代码整洁度。同时更新UploadVideoPopup.vue中的按钮文案,使其更符合用户操作习惯。
Showing
4 changed files
with
3 additions
and
4 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-03-20 19:53:12 | 2 | * @Date: 2025-03-20 19:53:12 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-03-24 09:55:15 | 4 | + * @LastEditTime: 2025-03-25 10:56:11 |
| 5 | * @FilePath: /mlaj/src/App.vue | 5 | * @FilePath: /mlaj/src/App.vue |
| 6 | * @Description: 入口文件 | 6 | * @Description: 入口文件 |
| 7 | --> | 7 | --> |
| ... | @@ -20,6 +20,7 @@ import { wxJsAPI } from "@/api/wx/config"; | ... | @@ -20,6 +20,7 @@ import { wxJsAPI } from "@/api/wx/config"; |
| 20 | import { apiList } from "@/api/wx/jsApiList.js"; | 20 | import { apiList } from "@/api/wx/jsApiList.js"; |
| 21 | import { wxInfo, getUrlParams, stringifyQuery } from "@/utils/tools"; | 21 | import { wxInfo, getUrlParams, stringifyQuery } from "@/utils/tools"; |
| 22 | 22 | ||
| 23 | +import 'vant/es/toast/style' | ||
| 23 | 24 | ||
| 24 | provideAuth(); // 提供全局认证状态 | 25 | provideAuth(); // 提供全局认证状态 |
| 25 | provideCart('single'); // 提供全局购物车状态,单一商品模式 | 26 | provideCart('single'); // 提供全局购物车状态,单一商品模式 | ... | ... |
| ... | @@ -83,7 +83,6 @@ | ... | @@ -83,7 +83,6 @@ |
| 83 | <script setup> | 83 | <script setup> |
| 84 | import { ref } from 'vue' | 84 | import { ref } from 'vue' |
| 85 | import { showToast } from 'vant' | 85 | import { showToast } from 'vant' |
| 86 | -import 'vant/lib/toast/style' | ||
| 87 | import { checkInTypes } from '@/utils/mockData' | 86 | import { checkInTypes } from '@/utils/mockData' |
| 88 | 87 | ||
| 89 | const props = defineProps({ | 88 | const props = defineProps({ | ... | ... |
| ... | @@ -22,7 +22,7 @@ | ... | @@ -22,7 +22,7 @@ |
| 22 | accept="video/*" | 22 | accept="video/*" |
| 23 | @oversize="onOversize" | 23 | @oversize="onOversize" |
| 24 | > | 24 | > |
| 25 | - <van-button icon="plus" type="primary">上传视频</van-button> | 25 | + <van-button type="default">请选择视频</van-button> |
| 26 | </van-uploader> | 26 | </van-uploader> |
| 27 | 27 | ||
| 28 | <div v-if="uploadProgress > 0 && uploadProgress < 100" class="progress"> | 28 | <div v-if="uploadProgress > 0 && uploadProgress < 100" class="progress"> | ... | ... |
| ... | @@ -528,7 +528,6 @@ import { courses, liveStreams, activities, checkInTypes, userRecommendations } f | ... | @@ -528,7 +528,6 @@ import { courses, liveStreams, activities, checkInTypes, userRecommendations } f |
| 528 | import { useTitle } from '@vueuse/core' | 528 | import { useTitle } from '@vueuse/core' |
| 529 | import { useAuth } from '@/contexts/auth' | 529 | import { useAuth } from '@/contexts/auth' |
| 530 | import { showToast } from 'vant' | 530 | import { showToast } from 'vant' |
| 531 | -import 'vant/lib/toast/style' | ||
| 532 | 531 | ||
| 533 | // 视频播放状态管理 | 532 | // 视频播放状态管理 |
| 534 | const activeVideoIndex = ref(null); // 当前播放的视频索引 | 533 | const activeVideoIndex = ref(null); // 当前播放的视频索引 | ... | ... |
-
Please register or login to post a comment