提交 40deac07 作者: 方治民

style: 代码格式化

上级 3990a58a
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
* Get the configuration file variable name * Get the configuration file variable name
* @param env * @param env
*/ */
export const getConfigFileName = (env: Record<string, any>) => { export function getConfigFileName(env: Record<string, any>) {
return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, '') return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, '')
} }
...@@ -4,6 +4,7 @@ import prettier from 'prettier' ...@@ -4,6 +4,7 @@ import prettier from 'prettier'
// uni-app // uni-app
import uni from '@dcloudio/vite-plugin-uni' import uni from '@dcloudio/vite-plugin-uni'
// @dcloudio/uni-helper-json // @dcloudio/uni-helper-json
import tags from '@dcloudio/uni-helper-json/dist/tags.json' import tags from '@dcloudio/uni-helper-json/dist/tags.json'
...@@ -33,6 +34,7 @@ function generateUniComponentsTypes() { ...@@ -33,6 +34,7 @@ function generateUniComponentsTypes() {
const formatted = prettier.format(content, { const formatted = prettier.format(content, {
parser: 'typescript', parser: 'typescript',
// eslint-disable-next-line @typescript-eslint/no-require-imports
...require('../../prettier.config'), ...require('../../prettier.config'),
}) })
fs.writeFileSync('./types/uni.d.ts', formatted, 'utf8') fs.writeFileSync('./types/uni.d.ts', formatted, 'utf8')
......
...@@ -3,6 +3,7 @@ import type { Plugin } from 'vite' ...@@ -3,6 +3,7 @@ import type { Plugin } from 'vite'
// https://github.com/antfu/unplugin-auto-import // https://github.com/antfu/unplugin-auto-import
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from 'unplugin-auto-import/vite'
// https://github.com/antfu/unplugin-vue-components // https://github.com/antfu/unplugin-vue-components
import Components from 'unplugin-vue-components/vite' import Components from 'unplugin-vue-components/vite'
......
<script setup lang="ts"> <script setup lang="ts">
import { checkUpgrade } from '@/utils/upgrade' import { checkUpgrade } from '@/utils/upgrade'
// import * as Push from '@/utils/push' // import * as Push from '@/utils/push'
onLaunch(() => { onLaunch(() => {
......
import type { AxiosError, AxiosInstance } from 'axios' import type { AxiosError, AxiosInstance } from 'axios'
/** /**
* 请求重试机制 * 请求重试机制
*/ */
......
// #ifdef APP-PLUS // #ifdef APP-PLUS
import checkVersion from '@/uni_modules/uni-upgrade-center-app/utils/check-update' import checkVersion from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif // #endif
export function checkUpgrade(toast = false) { export function checkUpgrade(toast = false) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论