Skip to content

Commit

Permalink
perf: performance enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Jul 9, 2023
1 parent 61db58b commit 75cc197
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 21 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.css" rel="stylesheet">

<script src="https://cdn.jsdelivr.net/npm/vue@3.2.37"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@^3.2"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@4.0.11"></script>
<script src="https://cdn.jsdelivr.net/npm/vuex@^4.0.0-0"></script>

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crawlab-ui",
"version": "0.6.2-8",
"version": "0.6.2-9",
"private": false,
"author": {
"name": "Marvin Zhang",
Expand Down Expand Up @@ -101,7 +101,7 @@
"showdown": "^1.9.1",
"simplemde": "^1.11.2",
"url-join": "^4.0.1",
"vue": "^3.2.0",
"vue": "^3.2.45",
"vue-clipboard3": "^2.0.0",
"vue-debounce": "^4.0.0",
"vue-i18n": "9.1.9",
Expand Down Expand Up @@ -130,12 +130,13 @@
"klaw-sync": "^6.0.0",
"node-sass": "^8.0.0",
"rd": "^2.0.1",
"rollup-plugin-external-globals": "^0.8.0",
"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.56.1",
"serve": "^14.1.2",
"ts-morph": "^12.0.0",
"typescript": "^4.6.4",
"vite": "4.0.0",
"vite": "^4.0.0",
"vite-aliases": "^0.9.7",
"vite-plugin-dynamic-import": "^1.2.4",
"vue-tsc": "^1.0.9"
Expand Down
82 changes: 75 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions src/components/project/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {isDuplicated} from '@/utils/array';
import useForm from '@/components/form/useForm';
import useProjectService from '@/services/project/projectService';
import {getDefaultFormComponentData} from '@/utils/form';
import {FORM_FIELD_TYPE_INPUT, FORM_FIELD_TYPE_INPUT_TEXTAREA, FORM_FIELD_TYPE_TAG_INPUT} from '@/constants/form';
import {FORM_FIELD_TYPE_INPUT, FORM_FIELD_TYPE_INPUT_TEXTAREA} from '@/constants/form';
import {translate} from '@/utils/i18n';

// form component data
Expand All @@ -28,13 +28,13 @@ const useProject = (store: Store<RootStoreState>) => {
placeholder: t('components.project.form.name'),
required: true,
},
{
prop: 'tags',
label: t('components.project.form.tags'),
width: '200',
placeholder: t('components.project.form.tags'),
fieldType: FORM_FIELD_TYPE_TAG_INPUT,
},
// {
// prop: 'tags',
// label: t('components.project.form.tags'),
// width: '200',
// placeholder: t('components.project.form.tags'),
// fieldType: FORM_FIELD_TYPE_TAG_INPUT,
// },
{
prop: 'description',
label: t('components.project.form.description'),
Expand Down
6 changes: 4 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {resolve} from 'path';
import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
import dynamicImport from 'vite-plugin-dynamic-import';
import externalGlobals from 'rollup-plugin-external-globals';
import {visualizer} from 'rollup-plugin-visualizer';

export default defineConfig({
Expand All @@ -17,7 +18,7 @@ export default defineConfig({
external: [
'vue',
'vue-router',
// 'vue-i18n',
'vue-i18n',
'vuex',
'axios',
'element-plus',
Expand Down Expand Up @@ -57,6 +58,7 @@ export default defineConfig({
},
},
resolve: {
dedupe: ['vue'],
alias: [
{find: '@', replacement: resolve(__dirname, 'src')},
],
Expand All @@ -73,7 +75,7 @@ export default defineConfig({
plugins: [
vue(),
dynamicImport(),
// visualizer({open: true}),
visualizer({open: true}),
],
server: {
cors: true,
Expand Down

0 comments on commit 75cc197

Please sign in to comment.