Skip to content

Commit

Permalink
fix(server): grammatical errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Apr 1, 2021
1 parent c030567 commit ee4829c
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 276 deletions.
2 changes: 1 addition & 1 deletion .husky/lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module.exports = {
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --write--parser json'],
'package.json': ['prettier --write'],
'*.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'],
};
2 changes: 1 addition & 1 deletion build/vite/plugin/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { GLOB_CONFIG_FILE_NAME } from '../../constant';
export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
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 = () => {
return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`;
Expand Down
2 changes: 0 additions & 2 deletions build/vite/plugin/visualizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ export function configVisualizerConfig() {
return visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
// @ts-ignore
gzipSize: true,
// @ts-ignore
brotliSize: true,
}) as Plugin;
}
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,12 @@
"@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.4.0",
"@types/qs": "^6.9.6",
"@types/rollup-plugin-visualizer": "^2.6.0",
"@types/sortablejs": "^1.10.6",
"@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.20.0",
"@vitejs/plugin-legacy": "^1.3.2",
"@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",
"autoprefixer": "^10.2.5",
"commitizen": "^4.2.3",
Expand All @@ -100,7 +99,7 @@
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"rimraf": "^3.0.2",
"rollup-plugin-visualizer": "4.2.2",
"rollup-plugin-visualizer": "5.0.4",
"stylelint": "^13.12.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^21.0.0",
Expand All @@ -111,18 +110,19 @@
"vite-plugin-compression": "^0.2.3",
"vite-plugin-html": "^2.0.3",
"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-pwa": "^0.6.4",
"vite-plugin-style-import": "^0.9.1",
"vite-plugin-svg-icons": "^0.4.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"
},
"resolutions": {
"//": "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": {
"type": "git",
Expand Down
16 changes: 8 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import '/@/design/index.less';
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 App from './App.vue';

Expand All @@ -25,6 +17,14 @@ import '/@/router/guard';
// Register icon Sprite
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 () => {
const app = createApp(App);
// Register global components
Expand Down
2 changes: 1 addition & 1 deletion src/views/dashboard/analysis/components/GrowCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
size="small"
:loading="$attrs.loading"
: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']"
:canExpan="false"
>
Expand Down
11 changes: 8 additions & 3 deletions src/views/sys/about/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</span>
</div>
</template>
<Description @register="infoRegister" />
<Description @register="register" class="my-4" />
<Description @register="registerDev" />
<Description @register="infoRegister" class="enter-y" />
<Description @register="register" class="my-4 enter-y" />
<Description @register="registerDev" class="enter-y" />
</PageWrapper>
</template>
<script lang="ts">
Expand All @@ -32,8 +32,10 @@
const schema: DescItem[] = [];
const devSchema: DescItem[] = [];
const commonTagRender = (color: string) => (curVal) => h(Tag, { color }, () => curVal);
const commonLinkRender = (text: string) => (href) => h('a', { href, target: '_blank' }, text);
const infoSchema: DescItem[] = [
{
label: '版本',
Expand Down Expand Up @@ -77,18 +79,21 @@
Object.keys(devDependencies).forEach((key) => {
devSchema.push({ field: key, label: key });
});
const [register] = useDescription({
title: '生产环境依赖',
data: dependencies,
schema: schema,
column: 3,
});
const [registerDev] = useDescription({
title: '开发环境依赖',
data: devDependencies,
schema: devSchema,
column: 3,
});
const [infoRegister] = useDescription({
title: '项目信息',
data: infoData,
Expand Down
2 changes: 1 addition & 1 deletion src/views/sys/redirect/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</template>
<script lang="ts">
import { defineComponent, unref } from 'vue';
import { useRouter } from 'vue-router';
export default defineComponent({
name: 'Redirect',
setup() {
Expand Down
Loading

0 comments on commit ee4829c

Please sign in to comment.