This commit is contained in:
Huang 2022-09-19 16:45:15 +08:00
parent 890233e854
commit 8b7c9068de
2 changed files with 5 additions and 10 deletions

View File

@ -1,24 +1,20 @@
<script lang="ts" setup> <script lang="ts" setup>
import BasicButton from '@/components/BasicButton/index.vue'; import BasicButton from '@/components/BasicButton/index.vue';
import AppProvider from '@/components/AppProvider/inedx.vue'; import AppProvider from '@/components/AppProvider/inedx.vue';
import { useRoute, useRouter } from '@/hooks/router'; import { useRouter } from '@/hooks/router';
const router = useRouter(); const router = useRouter();
const jumpList1 = () => { const jumpList1 = () => {
router.push('/pagesA/list/test1/index?key=words&page=1&limit=15'); router.push('/pagesA/list/test1/index?key=words&page=1&limit=15');
}; };
const route = useRoute();
</script> </script>
<template> <template>
<AppProvider> <AppProvider>
<view class="container"> 页面构建中...54264536 </view> <view class="container"> 页面构建中... </view>
<view class="flex-row"> <view class="flex-row justify-center">
<view>item1</view> <BasicButton @click="jumpList1">List1 </BasicButton>
<view>item2</view>
</view> </view>
<BasicButton @click="jumpList1">List1 </BasicButton>
</AppProvider> </AppProvider>
</template> </template>

View File

@ -3,7 +3,6 @@ import uni from '@dcloudio/vite-plugin-uni';
import eslintPlugin from 'vite-plugin-eslint'; import eslintPlugin from 'vite-plugin-eslint';
import { resolve } from 'path'; import { resolve } from 'path';
import { loadEnv } from 'vite'; import { loadEnv } from 'vite';
import { isProdMode } from './src/utils/env';
// https://vitejs.cn/config/ // https://vitejs.cn/config/
export default ({ mode }: ConfigEnv): UserConfig => { export default ({ mode }: ConfigEnv): UserConfig => {
@ -24,7 +23,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
terserOptions: { terserOptions: {
compress: { compress: {
// 发布时删除 console // 发布时删除 console
drop_console: isProdMode(), // drop_console: env.VITE_PROD as any,
}, },
}, },
}, },