hookehuyr

启动配置修改

// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'
export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
'图形验证码': typeof import('./src/components/图形验证码.vue')['default']
Agreement: typeof import('./src/components/DonateFlower/agreement.vue')['default']
AuditVideoCard: typeof import('./src/components/AuditVideoCard/index.vue')['default']
Banner: typeof import('./src/components/MuiVideo/banner.vue')['default']
BookCard: typeof import('./src/components/BookCard/index.vue')['default']
BVideoCard: typeof import('./src/components/BVideoCard/index.vue')['default']
CommentBox: typeof import('./src/components/CommentBox/index.vue')['default']
CommentList: typeof import('./src/components/CommentList/index.vue')['default']
DonateBar: typeof import('./src/components/DonateBar/index.vue')['default']
DonateBook: typeof import('./src/components/DonateBook/index.vue')['default']
DonateCert: typeof import('./src/components/DonateCert/index.vue')['default']
DonateFlower: typeof import('./src/components/DonateFlower/index.vue')['default']
FlowerIcon: typeof import('./src/components/FlowerIcon/index.vue')['default']
ImageSliderVerify: typeof import('./src/components/ImageSliderVerify/index.vue')['default']
LocalismBox: typeof import('./src/components/LocalismBox/index.vue')['default']
LoginBox: typeof import('./src/components/LoginBox/index.vue')['default']
MuiVideo: typeof import('./src/components/MuiVideo/index.vue')['default']
MyButton: typeof import('./src/components/MyButton/index.vue')['default']
NoticeOverlay: typeof import('./src/components/NoticeOverlay/index.vue')['default']
NoticeOverlayModule: typeof import('./src/components/NoticeOverlayModule/index.vue')['default']
RankingItem: typeof import('./src/components/RankingItem/index.vue')['default']
RightSideList: typeof import('./src/components/RightSideList/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
ShortcutFixed: typeof import('./src/components/ShortcutFixed/index.vue')['default']
Status: typeof import('./src/components/MuiVideo/status.vue')['default']
Template: typeof import('./src/components/template/index.vue')['default']
Test: typeof import('./src/components/LoginBox/test.vue')['default']
VanCheckbox: typeof import('vant/es')['Checkbox']
VanCol: typeof import('vant/es')['Col']
VanEmpty: typeof import('vant/es')['Empty']
VanField: typeof import('vant/es')['Field']
VanIcon: typeof import('vant/es')['Icon']
VanImage: typeof import('vant/es')['Image']
VanList: typeof import('vant/es')['List']
VanLoading: typeof import('vant/es')['Loading']
VanOverlay: typeof import('vant/es')['Overlay']
VanPicker: typeof import('vant/es')['Picker']
VanPopup: typeof import('vant/es')['Popup']
VanRow: typeof import('vant/es')['Row']
VanStepper: typeof import('vant/es')['Stepper']
VanSticky: typeof import('vant/es')['Sticky']
VideoBar: typeof import('./src/components/MuiVideo/videoBar.vue')['default']
VideoCard: typeof import('./src/components/VideoCard/index.vue')['default']
VideoDetail: typeof import('./src/components/VideoDetail/index.vue')['default']
}
}
......@@ -2,9 +2,9 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-25 00:47:11
* @LastEditTime: 2023-01-30 18:03:28
* @FilePath: /tswj/src/App.vue
* @Description:
* @Description:
-->
<template>
<!-- 页面缓存 -->
......@@ -39,10 +39,10 @@ watchEffect(
)
// TAG: 全局配置Toast
Toast.setDefaultOptions({
duration: 2000,
className: 'zIndex'
});
// Toast.setDefaultOptions({
// duration: 2000,
// className: 'zIndex'
// });
onMounted(async () => {
const { data } = await wxJsAPI();
......@@ -87,8 +87,8 @@ body {
}
.global-center {
position: relative;
top: 50%;
position: relative;
top: 50%;
transform: translateY(-50%);
}
......
import vue from '@vitejs/plugin-vue';
import dynamicImport from 'vite-plugin-dynamic-import';
// import legacy from '@vitejs/plugin-legacy';
import styleImport, { VantResolve } from 'vite-plugin-style-import';
// import styleImport, { VantResolve } from 'vite-plugin-style-import';
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from 'unplugin-vue-components/resolvers';
import { defineConfig, loadEnv } from 'vite';
import { createProxy } from './build/proxy'
import DefineOptions from 'unplugin-vue-define-options/vite';
......@@ -25,8 +27,11 @@ export default ({ command, mode }) => {
// define: '', // 定义全局常量替换方式。其中每项在开发环境下会被定义在全局,而在构建时被静态替换。
plugins: [ // 将要用到的插件数组。Falsy 虚值的插件将被忽略,插件数组将被扁平化(flatten)。查看 插件 API 获取 Vite 插件的更多细节。
vue(),
styleImport({
resolves: [VantResolve()],
Components({
resolvers: [VantResolver()],
}),
// styleImport({
// resolves: [VantResolve()],
// libs: [
// {
// libraryName: 'vant',
......@@ -34,7 +39,7 @@ export default ({ command, mode }) => {
// resolveStyle: name => `../es/${name}/style`
// }
// ]
}), // 按需引入 vant 位置报错问题
// }), // 按需引入 vant 位置报错问题
dynamicImport(), // 增强 Vite 内置的 dynamic import, 支持在 import() 中使用别名
// legacy({
// targets: ['defaults', 'not IE 11']
......@@ -100,7 +105,7 @@ export default ({ command, mode }) => {
// namedExports: true, // 是否支持从 .json 文件中进行按名导入。
// stringify: false, // 若设置为 true,导入的 JSON 会被转换为 export default JSON.parse("...") 会比转译成对象字面量性能更好,尤其是当 JSON 文件较大的时候。 开启此项,则会禁用按名导入。
// },
// esbuild: false, //
// esbuild: false, //
// assetsInclude: '', // 指定其他文件类型作为静态资源处理
logLevel: 'info', // 调整控制台输出的级别,默认为 'info'。
// clearScreen: true, // 设为 false 可以避免 Vite 清屏而错过在终端中打印某些关键信息。命令行模式下请通过 --clearScreen false 设置。
......