Skip to content

Commit

Permalink
perf: 🚀 去除冗余的默认导出以降低生产包大小
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Aug 29, 2023
1 parent 93091ee commit 88a529a
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/components/dict-picker/dict-picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</template>

<script>
import dicts from '@/configs/dict/index.js'
import * as dicts from '@/configs/dict/index.js'
export default {
components: {},
Expand Down
20 changes: 0 additions & 20 deletions src/configs/devServer.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
import {
appBasePath,
proxyPath,
proxyPort,
requestURL as proxyURL,
requestFilePath,
requestPath,
useProxy,
} from './index'

export {
useProxy,
requestURL as proxyURL,
Expand All @@ -17,13 +7,3 @@ export {
requestPath,
requestFilePath,
} from './index'

export default {
useProxy,
proxyURL,
proxyPath,
proxyPort,
appBasePath,
requestPath,
requestFilePath,
}
4 changes: 0 additions & 4 deletions src/configs/dict/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ export const approveStatus = [
dictValue: 3,
},
]

export default {
approveStatus,
}
12 changes: 0 additions & 12 deletions src/configs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,3 @@ export const enterpriseInfo = {

// 主页面路径
export const homePage = 'pages/index/home/index'

export default {
appName,
appBasePath,
requestURL,
requestPath,
requestFilePath,
useProxy,
proxyPath,
proxyPort,
useEncrypt,
}
10 changes: 0 additions & 10 deletions src/configs/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
requestFilePath,
requestPath,
requestURL,
useEncrypt,
useProxy,
} from './index'

Expand Down Expand Up @@ -43,12 +42,3 @@ export const responseSuccessCode = '20000'
export const timeout = 60 * 1000
// 是否开启加密
export { useEncrypt } from './index'

export default {
getBaseURL,
getFileBaseURL,
baseURL,
responseSuccessCode,
timeout,
useEncrypt,
}
2 changes: 1 addition & 1 deletion src/store/dict/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineStore } from 'pinia'
import { getDictList } from '@/api/base/index'
import staticDict from '@/configs/dict/index'
import * as staticDict from '@/configs/dict/index'

export const useDictStore = defineStore({
id: 'app-dict',
Expand Down
2 changes: 1 addition & 1 deletion src/utils/showDictLabel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isString } from 'lodash-es'
import dictData from '@/configs/dict/index.js'
import * as dictData from '@/configs/dict/index.js'

/**
* @description 回显数据字典
Expand Down

0 comments on commit 88a529a

Please sign in to comment.