hookehuyr

启动配置修改

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