提交 ee4829c1 作者: Vben

fix(server): grammatical errors

上级 c030567b
...@@ -3,6 +3,6 @@ module.exports = { ...@@ -3,6 +3,6 @@ module.exports = {
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --write--parser json'], '{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --write--parser json'],
'package.json': ['prettier --write'], 'package.json': ['prettier --write'],
'*.vue': ['eslint --fix', 'prettier --write', 'stylelint --fix'], '*.vue': ['eslint --fix', 'prettier --write', 'stylelint --fix'],
'*.{scss,less,styl,css,html}': ['stylelint --fix', 'prettier --write'], '*.{scss,less,styl,html}': ['stylelint --fix', 'prettier --write'],
'*.md': ['prettier --write'], '*.md': ['prettier --write'],
}; };
...@@ -12,7 +12,7 @@ import { GLOB_CONFIG_FILE_NAME } from '../../constant'; ...@@ -12,7 +12,7 @@ import { GLOB_CONFIG_FILE_NAME } from '../../constant';
export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) { export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
const { VITE_GLOB_APP_TITLE, VITE_PUBLIC_PATH } = env; const { VITE_GLOB_APP_TITLE, VITE_PUBLIC_PATH } = env;
const path = VITE_PUBLIC_PATH?.endsWith('/') ? VITE_PUBLIC_PATH : `${VITE_PUBLIC_PATH}/`; const path = VITE_PUBLIC_PATH.endsWith('/') ? VITE_PUBLIC_PATH : `${VITE_PUBLIC_PATH}/`;
const getAppConfigSrc = () => { const getAppConfigSrc = () => {
return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`; return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`;
......
...@@ -9,9 +9,7 @@ export function configVisualizerConfig() { ...@@ -9,9 +9,7 @@ export function configVisualizerConfig() {
return visualizer({ return visualizer({
filename: './node_modules/.cache/visualizer/stats.html', filename: './node_modules/.cache/visualizer/stats.html',
open: true, open: true,
// @ts-ignore
gzipSize: true, gzipSize: true,
// @ts-ignore
brotliSize: true, brotliSize: true,
}) as Plugin; }) as Plugin;
} }
......
...@@ -70,13 +70,12 @@ ...@@ -70,13 +70,12 @@
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.4.0", "@types/qrcode": "^1.4.0",
"@types/qs": "^6.9.6", "@types/qs": "^6.9.6",
"@types/rollup-plugin-visualizer": "^2.6.0",
"@types/sortablejs": "^1.10.6", "@types/sortablejs": "^1.10.6",
"@typescript-eslint/eslint-plugin": "^4.20.0", "@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.20.0", "@typescript-eslint/parser": "^4.20.0",
"@vitejs/plugin-legacy": "^1.3.2", "@vitejs/plugin-legacy": "^1.3.2",
"@vitejs/plugin-vue": "^1.2.1", "@vitejs/plugin-vue": "^1.2.1",
"@vitejs/plugin-vue-jsx": "^1.1.2", "@vitejs/plugin-vue-jsx": "^1.1.3",
"@vue/compiler-sfc": "3.0.10", "@vue/compiler-sfc": "3.0.10",
"autoprefixer": "^10.2.5", "autoprefixer": "^10.2.5",
"commitizen": "^4.2.3", "commitizen": "^4.2.3",
...@@ -100,7 +99,7 @@ ...@@ -100,7 +99,7 @@
"prettier": "^2.2.1", "prettier": "^2.2.1",
"pretty-quick": "^3.1.0", "pretty-quick": "^3.1.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup-plugin-visualizer": "4.2.2", "rollup-plugin-visualizer": "5.0.4",
"stylelint": "^13.12.0", "stylelint": "^13.12.0",
"stylelint-config-prettier": "^8.0.2", "stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^21.0.0", "stylelint-config-standard": "^21.0.0",
...@@ -111,18 +110,19 @@ ...@@ -111,18 +110,19 @@
"vite-plugin-compression": "^0.2.3", "vite-plugin-compression": "^0.2.3",
"vite-plugin-html": "^2.0.3", "vite-plugin-html": "^2.0.3",
"vite-plugin-imagemin": "^0.2.9", "vite-plugin-imagemin": "^0.2.9",
"vite-plugin-mock": "^2.4.1", "vite-plugin-mock": "^2.4.2",
"vite-plugin-purge-icons": "^0.7.0", "vite-plugin-purge-icons": "^0.7.0",
"vite-plugin-pwa": "^0.6.4", "vite-plugin-pwa": "^0.6.4",
"vite-plugin-style-import": "^0.9.1", "vite-plugin-style-import": "^0.9.1",
"vite-plugin-svg-icons": "^0.4.0", "vite-plugin-svg-icons": "^0.4.0",
"vite-plugin-theme": "^0.5.0", "vite-plugin-theme": "^0.5.0",
"vite-plugin-windicss": "0.10.4", "vite-plugin-windicss": "0.11.4",
"vue-eslint-parser": "^7.6.0" "vue-eslint-parser": "^7.6.0"
}, },
"resolutions": { "resolutions": {
"//": "Used to install imagemin dependencies, because imagemin may not be installed in China.If it is abroad, you can delete it", "//": "Used to install imagemin dependencies, because imagemin may not be installed in China.If it is abroad, you can delete it",
"bin-wrapper": "npm:bin-wrapper-china" "bin-wrapper": "npm:bin-wrapper-china",
"rollup": "^2.44.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
import '/@/design/index.less'; import '/@/design/index.less';
import '@virtual/windi.css'; import '@virtual/windi.css';
// Do not introduce` on-demand in local development?
// In the local development for on-demand introduction, the number of browser requests will increase by about 20%.
// Which may slow down the browser refresh.
// Therefore, all are introduced in local development, and only introduced on demand in the production environment
if (import.meta.env.DEV) {
import('ant-design-vue/dist/antd.less');
}
import { createApp } from 'vue'; import { createApp } from 'vue';
import App from './App.vue'; import App from './App.vue';
...@@ -25,6 +17,14 @@ import '/@/router/guard'; ...@@ -25,6 +17,14 @@ import '/@/router/guard';
// Register icon Sprite // Register icon Sprite
import 'vite-plugin-svg-icons/register'; import 'vite-plugin-svg-icons/register';
// Do not introduce` on-demand in local development?
// In the local development for on-demand introduction, the number of browser requests will increase by about 20%.
// Which may slow down the browser refresh.
// Therefore, all are introduced in local development, and only introduced on demand in the production environment
if (import.meta.env.DEV) {
import('ant-design-vue/dist/antd.less');
}
(async () => { (async () => {
const app = createApp(App); const app = createApp(App);
// Register global components // Register global components
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
size="small" size="small"
:loading="$attrs.loading" :loading="$attrs.loading"
:title="item.title" :title="item.title"
class="md:w-1/4 w-full md:mt-0 !mt-4" class="md:w-1/4 w-full !md:mt-0 !mt-4"
:class="[index + 1 < 4 && '!md:mr-4']" :class="[index + 1 < 4 && '!md:mr-4']"
:canExpan="false" :canExpan="false"
> >
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
</span> </span>
</div> </div>
</template> </template>
<Description @register="infoRegister" /> <Description @register="infoRegister" class="enter-y" />
<Description @register="register" class="my-4" /> <Description @register="register" class="my-4 enter-y" />
<Description @register="registerDev" /> <Description @register="registerDev" class="enter-y" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -32,8 +32,10 @@ ...@@ -32,8 +32,10 @@
const schema: DescItem[] = []; const schema: DescItem[] = [];
const devSchema: DescItem[] = []; const devSchema: DescItem[] = [];
const commonTagRender = (color: string) => (curVal) => h(Tag, { color }, () => curVal); const commonTagRender = (color: string) => (curVal) => h(Tag, { color }, () => curVal);
const commonLinkRender = (text: string) => (href) => h('a', { href, target: '_blank' }, text); const commonLinkRender = (text: string) => (href) => h('a', { href, target: '_blank' }, text);
const infoSchema: DescItem[] = [ const infoSchema: DescItem[] = [
{ {
label: '版本', label: '版本',
...@@ -77,18 +79,21 @@ ...@@ -77,18 +79,21 @@
Object.keys(devDependencies).forEach((key) => { Object.keys(devDependencies).forEach((key) => {
devSchema.push({ field: key, label: key }); devSchema.push({ field: key, label: key });
}); });
const [register] = useDescription({ const [register] = useDescription({
title: '生产环境依赖', title: '生产环境依赖',
data: dependencies, data: dependencies,
schema: schema, schema: schema,
column: 3, column: 3,
}); });
const [registerDev] = useDescription({ const [registerDev] = useDescription({
title: '开发环境依赖', title: '开发环境依赖',
data: devDependencies, data: devDependencies,
schema: devSchema, schema: devSchema,
column: 3, column: 3,
}); });
const [infoRegister] = useDescription({ const [infoRegister] = useDescription({
title: '项目信息', title: '项目信息',
data: infoData, data: infoData,
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, unref } from 'vue'; import { defineComponent, unref } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
export default defineComponent({ export default defineComponent({
name: 'Redirect', name: 'Redirect',
setup() { setup() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论