zyf-model-engine 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +293 -0
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.mjs +21645 -0
- package/package.json +29 -99
- package/style.css +1 -0
- package/types/components/CSvgIcon/components/SvgPathIcon.vue.d.ts +9 -0
- package/types/components/CSvgIcon/defaultIcons.d.ts +23 -0
- package/types/components/CSvgIcon/index.vue.d.ts +30 -0
- package/types/components/Empty/index.vue.d.ts +16 -0
- package/types/components/Overflow/index.vue.d.ts +11 -0
- package/types/components/UtilsMenu/components/BaseInfo/index.vue.d.ts +122 -0
- package/types/components/UtilsMenu/components/Card/index.vue.d.ts +42 -0
- package/types/components/UtilsMenu/components/ComInfo/index.vue.d.ts +128 -0
- package/types/components/UtilsMenu/components/Config/index.vue.d.ts +8 -0
- package/types/components/UtilsMenu/components/Cutting/clipping.d.ts +56 -0
- package/types/components/UtilsMenu/components/Cutting/index.vue.d.ts +128 -0
- package/types/components/UtilsMenu/components/Measure/index.vue.d.ts +122 -0
- package/types/components/UtilsMenu/components/Measure/interface/index.d.ts +5 -0
- package/types/components/UtilsMenu/components/Measure/measure.d.ts +106 -0
- package/types/components/UtilsMenu/components/ModelTree/index.vue.d.ts +875 -0
- package/types/components/UtilsMenu/components/ModelTree/interface/index.d.ts +19 -0
- package/types/components/UtilsMenu/components/ModelTree/utils/index.d.ts +13 -0
- package/types/components/UtilsMenu/components/Roam/index.vue.d.ts +125 -0
- package/types/components/UtilsMenu/components/SubMenu/index.vue.d.ts +18 -0
- package/types/components/UtilsMenu/index.vue.d.ts +15 -0
- package/types/components/UtilsMenu/interface/index.d.ts +129 -0
- package/types/index-dxf.vue.d.ts +15 -0
- package/types/index.d.ts +209 -0
- package/types/index.vue.d.ts +18 -0
- package/types/libs/CFace.d.ts +16 -0
- package/types/libs/CLabel.d.ts +13 -0
- package/types/libs/CLine.d.ts +49 -0
- package/types/libs/CText.d.ts +17 -0
- package/types/libs/MathUtils.d.ts +26 -0
- package/types/libs/ViewCube.d.ts +21 -0
- package/types/libs/materials.d.ts +4 -0
- package/types/libs/svg.d.ts +26 -0
- package/types/libs/types.d.ts +177 -0
- package/types/main.d.ts +22 -0
- package/types/manager/highLightMeshManager.d.ts +31 -0
- package/types/manager/lightManager.d.ts +35 -0
- package/types/manager/rayCasterManager.d.ts +18 -0
- package/types/tools/Events.d.ts +15 -0
- package/types/tools/math.d.ts +13 -0
- package/types/vendor/DXFPaser/BatchingKey.d.ts +25 -0
- package/types/vendor/DXFPaser/DxfFetcher.d.ts +6 -0
- package/types/vendor/DXFPaser/DxfScene.d.ts +95 -0
- package/types/vendor/DXFPaser/DxfWorker.d.ts +44 -0
- package/types/vendor/DXFPaser/DynamicBuffer.d.ts +30 -0
- package/types/vendor/DXFPaser/Entity.d.ts +18 -0
- package/types/vendor/DXFPaser/MTextFormatParser.d.ts +15 -0
- package/types/vendor/DXFPaser/MaterialKey.d.ts +8 -0
- package/types/vendor/DXFPaser/RBTree.d.ts +5 -0
- package/types/vendor/DXFPaser/TextRenderer.d.ts +43 -0
- package/types/vendor/DXFPaser/index.d.ts +26 -0
- package/types/vendor/controls/BaseArrow.d.ts +20 -0
- package/types/vendor/controls/FirstPersonControls.d.ts +32 -0
- package/types/vendor/controls/FlyControls.d.ts +18 -0
- package/types/vendor/controls/OrbitControls.d.ts +75 -0
- package/types/vendor/controls/TransformControls.d.ts +41 -0
- package/types/vendor/controls/directionControls.d.ts +26 -0
- package/types/vendor/loaders/GLTFLoader.d.ts +71 -0
- package/types/workbench/DxfViewer.d.ts +16 -0
- package/types/workbench/clickInfo.d.ts +24 -0
- package/types/workbench/clipping.d.ts +62 -0
- package/types/workbench/dxfMeasure.d.ts +92 -0
- package/types/workbench/dxfTools.d.ts +78 -0
- package/types/workbench/functionalComponent.d.ts +127 -0
- package/types/workbench/modelTree.d.ts +89 -0
- package/.editorconfig +0 -15
- package/.env +0 -13
- package/.env.development +0 -20
- package/.env.production +0 -25
- package/.env.test +0 -25
- package/.eslintignore +0 -15
- package/.eslintrc-auto-import.json +0 -65
- package/.eslintrc.cjs +0 -66
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -5
- package/.prettierignore +0 -9
- package/.prettierrc.cjs +0 -41
- package/.stylelintignore +0 -4
- package/.stylelintrc.cjs +0 -40
- package/.vscode/extensions.json +0 -14
- package/.vscode/settings.json +0 -92
- package/CHANGELOG.md +0 -246
- package/LICENSE +0 -21
- package/README.md +0 -205
- package/auto-imports.d.ts +0 -132
- package/build/getEnv.ts +0 -46
- package/build/plugins.ts +0 -138
- package/build/proxy.ts +0 -28
- package/commitlint.config.cjs +0 -84
- package/components.d.ts +0 -28
- package/index.html +0 -105
- package/lint-staged.config.cjs +0 -8
- package/postcss.config.cjs +0 -5
- package/public/logo.png +0 -0
- package/src/App.vue +0 -16
- package/src/api/config/servicePort.ts +0 -3
- package/src/api/enums/httpEnum.ts +0 -35
- package/src/api/helper/axiosCancel.ts +0 -50
- package/src/api/helper/axiosFileCancel.ts +0 -62
- package/src/api/helper/checkStatus.ts +0 -97
- package/src/api/index.ts +0 -142
- package/src/api/interface/index.ts +0 -27
- package/src/assets/global-icons/icon-demo.svg +0 -1
- package/src/assets/iconfont/iconfont.scss +0 -44
- package/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/assets/images/empty-img.png +0 -0
- package/src/assets/option-icons/add.svg +0 -1
- package/src/assets/option-icons/check.svg +0 -1
- package/src/assets/option-icons/config.svg +0 -1
- package/src/assets/option-icons/del.svg +0 -1
- package/src/assets/option-icons/detail.svg +0 -1
- package/src/assets/option-icons/edit.svg +0 -2
- package/src/assets/option-icons/export.svg +0 -1
- package/src/assets/option-icons/folder.svg +0 -1
- package/src/assets/option-icons/full-screen.svg +0 -1
- package/src/assets/option-icons/more.svg +0 -1
- package/src/assets/option-icons/return.svg +0 -1
- package/src/assets/option-icons/search.svg +0 -1
- package/src/components/CSvgIcon/index.scss +0 -23
- package/src/components/CSvgIcon/index.vue +0 -74
- package/src/components/CTree/index.scss +0 -48
- package/src/components/CTree/index.vue +0 -176
- package/src/components/CTree/interface/index.ts +0 -6
- package/src/components/Dialog/index.scss +0 -74
- package/src/components/Dialog/index.vue +0 -87
- package/src/components/Empty/index.scss +0 -16
- package/src/components/Empty/index.vue +0 -43
- package/src/components/Grid/components/GridItem.vue +0 -68
- package/src/components/Grid/index.vue +0 -167
- package/src/components/Grid/interface/index.ts +0 -6
- package/src/components/Loading/index.scss +0 -67
- package/src/components/Loading/index.vue +0 -13
- package/src/components/Overflow/index.vue +0 -76
- package/src/components/ProTable/components/ColSetting.vue +0 -45
- package/src/components/ProTable/components/Pagination.vue +0 -29
- package/src/components/ProTable/components/SearchForm/components/SearchFormItem.vue +0 -93
- package/src/components/ProTable/components/SearchForm/index.scss +0 -12
- package/src/components/ProTable/components/SearchForm/index.vue +0 -91
- package/src/components/ProTable/components/TableColumn.vue +0 -56
- package/src/components/ProTable/index.scss +0 -14
- package/src/components/ProTable/index.vue +0 -274
- package/src/components/ProTable/interface/index.ts +0 -86
- package/src/components/ScrollBox/index.vue +0 -44
- package/src/components/SvgIcon/index.vue +0 -20
- package/src/components/Tabs/index.vue +0 -142
- package/src/config/index.ts +0 -12
- package/src/config/nprogress.ts +0 -12
- package/src/config/piniaPersist.ts +0 -19
- package/src/config/serviceLoading.ts +0 -45
- package/src/enums/httpEnum.ts +0 -24
- package/src/hooks/interface/index.ts +0 -32
- package/src/hooks/useOnline.ts +0 -27
- package/src/hooks/useTable.ts +0 -167
- package/src/main.ts +0 -35
- package/src/plugins/button/button.vue +0 -56
- package/src/plugins/index.js +0 -26
- package/src/plugins/index.vue +0 -24
- package/src/plugins/msg/msg.vue +0 -56
- package/src/stores/commonStore.ts +0 -9
- package/src/stores/index.ts +0 -8
- package/src/stores/interface/index.ts +0 -1
- package/src/styles/common.scss +0 -87
- package/src/styles/element.scss +0 -233
- package/src/styles/reset.scss +0 -20
- package/src/styles/var.scss +0 -2
- package/src/typings/global.d.ts +0 -37
- package/src/typings/window.d.ts +0 -8
- package/src/utils/color.ts +0 -59
- package/src/utils/commonUtils.ts +0 -175
- package/src/utils/errorHandler.ts +0 -28
- package/src/utils/is.ts +0 -147
- package/src/utils/layoutUtils.ts +0 -83
- package/src/utils/localUtils.ts +0 -42
- package/src/utils/serviceDict.ts +0 -9
- package/src/vite-env.d.ts +0 -6
- package/tsconfig.json +0 -50
- package/vite.config.ts +0 -76
package/auto-imports.d.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// Generated by 'unplugin-auto-import'
|
|
2
|
-
export {}
|
|
3
|
-
declare global {
|
|
4
|
-
const EffectScope: typeof import('vue')['EffectScope']
|
|
5
|
-
const ElMessage: typeof import('element-plus')['ElMessage']
|
|
6
|
-
const ElMessageBox: typeof import('element-plus')['ElMessageBox']
|
|
7
|
-
const ElNotification: typeof import('element-plus')['ElNotification']
|
|
8
|
-
const axiosController: typeof import('@/api/index')['axiosController']
|
|
9
|
-
const axiosFileController: typeof import('@/api/index')['axiosFileController']
|
|
10
|
-
const computed: typeof import('vue')['computed']
|
|
11
|
-
const createApp: typeof import('vue')['createApp']
|
|
12
|
-
const customRef: typeof import('vue')['customRef']
|
|
13
|
-
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
|
14
|
-
const defineComponent: typeof import('vue')['defineComponent']
|
|
15
|
-
const effectScope: typeof import('vue')['effectScope']
|
|
16
|
-
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
|
17
|
-
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
|
18
|
-
const h: typeof import('vue')['h']
|
|
19
|
-
const http: typeof import('@/api/index')['http']
|
|
20
|
-
const inject: typeof import('vue')['inject']
|
|
21
|
-
const is: typeof import('@/utils/is/index.ts')
|
|
22
|
-
const isProxy: typeof import('vue')['isProxy']
|
|
23
|
-
const isReactive: typeof import('vue')['isReactive']
|
|
24
|
-
const isReadonly: typeof import('vue')['isReadonly']
|
|
25
|
-
const isRef: typeof import('vue')['isRef']
|
|
26
|
-
const markRaw: typeof import('vue')['markRaw']
|
|
27
|
-
const nextTick: typeof import('vue')['nextTick']
|
|
28
|
-
const onActivated: typeof import('vue')['onActivated']
|
|
29
|
-
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
|
30
|
-
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
|
31
|
-
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
|
32
|
-
const onDeactivated: typeof import('vue')['onDeactivated']
|
|
33
|
-
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
|
34
|
-
const onMounted: typeof import('vue')['onMounted']
|
|
35
|
-
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
|
36
|
-
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
|
37
|
-
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
|
38
|
-
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
|
39
|
-
const onUnmounted: typeof import('vue')['onUnmounted']
|
|
40
|
-
const onUpdated: typeof import('vue')['onUpdated']
|
|
41
|
-
const provide: typeof import('vue')['provide']
|
|
42
|
-
const reactive: typeof import('vue')['reactive']
|
|
43
|
-
const readonly: typeof import('vue')['readonly']
|
|
44
|
-
const ref: typeof import('vue')['ref']
|
|
45
|
-
const resolveComponent: typeof import('vue')['resolveComponent']
|
|
46
|
-
const resolveDirective: typeof import('vue')['resolveDirective']
|
|
47
|
-
const serviceDict: typeof import('@/utils/serviceDict')
|
|
48
|
-
const shallowReactive: typeof import('vue')['shallowReactive']
|
|
49
|
-
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
|
50
|
-
const shallowRef: typeof import('vue')['shallowRef']
|
|
51
|
-
const toRaw: typeof import('vue')['toRaw']
|
|
52
|
-
const toRef: typeof import('vue')['toRef']
|
|
53
|
-
const toRefs: typeof import('vue')['toRefs']
|
|
54
|
-
const triggerRef: typeof import('vue')['triggerRef']
|
|
55
|
-
const unref: typeof import('vue')['unref']
|
|
56
|
-
const useAttrs: typeof import('vue')['useAttrs']
|
|
57
|
-
const useCssModule: typeof import('vue')['useCssModule']
|
|
58
|
-
const useCssVars: typeof import('vue')['useCssVars']
|
|
59
|
-
const useSlots: typeof import('vue')['useSlots']
|
|
60
|
-
const validate: typeof import('@/utils/validate.ts')
|
|
61
|
-
const watch: typeof import('vue')['watch']
|
|
62
|
-
const watchEffect: typeof import('vue')['watchEffect']
|
|
63
|
-
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
|
64
|
-
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
|
65
|
-
}
|
|
66
|
-
// for vue template auto import
|
|
67
|
-
import { UnwrapRef } from 'vue'
|
|
68
|
-
declare module 'vue' {
|
|
69
|
-
interface ComponentCustomProperties {
|
|
70
|
-
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
|
71
|
-
readonly ElMessage: UnwrapRef<typeof import('element-plus')['ElMessage']>
|
|
72
|
-
readonly ElMessageBox: UnwrapRef<typeof import('element-plus')['ElMessageBox']>
|
|
73
|
-
readonly ElNotification: UnwrapRef<typeof import('element-plus')['ElNotification']>
|
|
74
|
-
readonly axiosController: UnwrapRef<typeof import('@/api/index')['axiosController']>
|
|
75
|
-
readonly axiosFileController: UnwrapRef<typeof import('@/api/index')['axiosFileController']>
|
|
76
|
-
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
|
77
|
-
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
|
|
78
|
-
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
|
|
79
|
-
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
|
|
80
|
-
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
|
|
81
|
-
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
|
|
82
|
-
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
|
|
83
|
-
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
|
|
84
|
-
readonly h: UnwrapRef<typeof import('vue')['h']>
|
|
85
|
-
readonly http: UnwrapRef<typeof import('@/api/index')['http']>
|
|
86
|
-
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
|
87
|
-
readonly is: UnwrapRef<typeof import('@/utils/is/index.ts')>
|
|
88
|
-
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
|
|
89
|
-
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
|
|
90
|
-
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
|
|
91
|
-
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
|
|
92
|
-
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
|
|
93
|
-
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
|
|
94
|
-
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
|
|
95
|
-
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
|
|
96
|
-
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
|
|
97
|
-
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
|
|
98
|
-
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
|
|
99
|
-
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
|
|
100
|
-
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
|
|
101
|
-
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
|
|
102
|
-
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
|
|
103
|
-
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
|
|
104
|
-
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
|
|
105
|
-
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
|
|
106
|
-
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
|
|
107
|
-
readonly provide: UnwrapRef<typeof import('vue')['provide']>
|
|
108
|
-
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
|
|
109
|
-
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
|
|
110
|
-
readonly ref: UnwrapRef<typeof import('vue')['ref']>
|
|
111
|
-
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
|
112
|
-
readonly resolveDirective: UnwrapRef<typeof import('vue')['resolveDirective']>
|
|
113
|
-
readonly serviceDict: UnwrapRef<typeof import('@/utils/serviceDict')>
|
|
114
|
-
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
|
|
115
|
-
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
|
|
116
|
-
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
|
|
117
|
-
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
|
|
118
|
-
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
|
|
119
|
-
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
|
|
120
|
-
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
|
|
121
|
-
readonly unref: UnwrapRef<typeof import('vue')['unref']>
|
|
122
|
-
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
|
|
123
|
-
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
|
|
124
|
-
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
|
|
125
|
-
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
|
|
126
|
-
readonly validate: UnwrapRef<typeof import('@/utils/validate.ts')>
|
|
127
|
-
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
|
128
|
-
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
|
|
129
|
-
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
|
|
130
|
-
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
|
|
131
|
-
}
|
|
132
|
-
}
|
package/build/getEnv.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
|
|
3
|
-
export function isDevFn(mode: string): boolean {
|
|
4
|
-
return mode === "development";
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function isProdFn(mode: string): boolean {
|
|
8
|
-
return mode === "production";
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function isTestFn(mode: string): boolean {
|
|
12
|
-
return mode === "test";
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 是否生成包预览
|
|
17
|
-
*/
|
|
18
|
-
export function isReportMode(): boolean {
|
|
19
|
-
return process.env.VITE_REPORT === "true";
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Read all environment variable configuration files to process.env
|
|
23
|
-
export function wrapperEnv(envConf: Recordable): ViteEnv {
|
|
24
|
-
const ret: any = {};
|
|
25
|
-
|
|
26
|
-
for (const envName of Object.keys(envConf)) {
|
|
27
|
-
let realName = envConf[envName].replace(/\\n/g, "\n");
|
|
28
|
-
realName = realName === "true" ? true : realName === "false" ? false : realName;
|
|
29
|
-
if (envName === "VITE_PORT") realName = Number(realName);
|
|
30
|
-
if (envName === "VITE_PROXY") {
|
|
31
|
-
try {
|
|
32
|
-
realName = JSON.parse(realName);
|
|
33
|
-
} catch (error) {}
|
|
34
|
-
}
|
|
35
|
-
ret[envName] = realName;
|
|
36
|
-
}
|
|
37
|
-
return ret;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* 获取用户根目录
|
|
42
|
-
* @param dir file path
|
|
43
|
-
*/
|
|
44
|
-
export function getRootPath(...dir: string[]) {
|
|
45
|
-
return path.resolve(process.cwd(), ...dir);
|
|
46
|
-
}
|
package/build/plugins.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { resolve } from "path";
|
|
2
|
-
import { PluginOption } from "vite";
|
|
3
|
-
import { VitePWA } from "vite-plugin-pwa";
|
|
4
|
-
import { visualizer } from "rollup-plugin-visualizer";
|
|
5
|
-
import { createHtmlPlugin } from "vite-plugin-html";
|
|
6
|
-
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
|
|
7
|
-
import AutoImport from "unplugin-auto-import/vite";
|
|
8
|
-
import Components from "unplugin-vue-components/vite";
|
|
9
|
-
// import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
|
10
|
-
import vue from "@vitejs/plugin-vue";
|
|
11
|
-
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
12
|
-
import eslintPlugin from "vite-plugin-eslint";
|
|
13
|
-
import dts from "vite-plugin-dts";
|
|
14
|
-
/**
|
|
15
|
-
* 创建 vite 插件
|
|
16
|
-
* @param viteEnv
|
|
17
|
-
*/
|
|
18
|
-
export const createVitePlugins = (viteEnv: ViteEnv): (PluginOption | PluginOption[])[] => {
|
|
19
|
-
const { VITE_GLOB_APP_TITLE, VITE_REPORT, VITE_PWA, VITE_USER_NODE_ENV } = viteEnv;
|
|
20
|
-
return [
|
|
21
|
-
vue(),
|
|
22
|
-
dts(),
|
|
23
|
-
// vue 可以使用 jsx/tsx 语法
|
|
24
|
-
vueJsx(),
|
|
25
|
-
AutoImport({
|
|
26
|
-
// 在哪些文件里可以直接引入
|
|
27
|
-
include: [
|
|
28
|
-
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
|
|
29
|
-
/\.vue$/,
|
|
30
|
-
/\.md$/ // .md
|
|
31
|
-
],
|
|
32
|
-
// 自动引入哪些包
|
|
33
|
-
imports: [
|
|
34
|
-
// 自动引入整个模块
|
|
35
|
-
"vue",
|
|
36
|
-
{
|
|
37
|
-
"element-plus": ["ElMessage", "ElMessageBox", "ElNotification"], //消息提示/通知
|
|
38
|
-
"@/api/index": ["http", "axiosController", "axiosFileController"], // axios请求api
|
|
39
|
-
"@/utils/validate.ts": [["*", "validate"]], //文本校验函数
|
|
40
|
-
"@/utils/is/index.ts": [["*", "is"]], //判断值类型
|
|
41
|
-
"@/utils/serviceDict": [["*", "serviceDict"]] //字典库
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
// 声明文件
|
|
45
|
-
// resolvers: [ElementPlusResolver()],
|
|
46
|
-
// Auto import inside Vue template
|
|
47
|
-
vueTemplate: true,
|
|
48
|
-
dirs: ["@/utils"],
|
|
49
|
-
dts: true,
|
|
50
|
-
eslintrc: {
|
|
51
|
-
enabled: true,
|
|
52
|
-
filepath: "./.eslintrc-auto-import.json", // Default `./.eslintrc-auto-import.json`
|
|
53
|
-
globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
|
|
54
|
-
} //auto generation auto-imports.d.ts file
|
|
55
|
-
}),
|
|
56
|
-
// 自动注册组件 无需再手动引入
|
|
57
|
-
//https://github.com/antfu/unplugin-auto-import/blob/HEAD/src/types.ts
|
|
58
|
-
Components(
|
|
59
|
-
VITE_USER_NODE_ENV === "development"
|
|
60
|
-
? {
|
|
61
|
-
dts: true, //默认生成的文件位置
|
|
62
|
-
dirs: ["src/components"], // 要搜索组件的目录的相对路径
|
|
63
|
-
extensions: ["vue", "jsx", "tsx"], // 文件类型
|
|
64
|
-
// deep: false, // 搜索子目录
|
|
65
|
-
// ui库解析器,也可以自定义,需要安装相关UI库
|
|
66
|
-
// resolvers: [],
|
|
67
|
-
include: [/.vue$/, /.vue?vue/],
|
|
68
|
-
exclude: [/[\/]node_modules[\/]/, /[\/].git[\/]/, /[\/].nuxt[\/]/]
|
|
69
|
-
}
|
|
70
|
-
: {}
|
|
71
|
-
),
|
|
72
|
-
// esLint 报错信息显示在浏览器界面上
|
|
73
|
-
eslintPlugin(),
|
|
74
|
-
// 注入变量到 html 文件
|
|
75
|
-
createHtmlPlugin({
|
|
76
|
-
minify: true,
|
|
77
|
-
pages: [
|
|
78
|
-
{
|
|
79
|
-
entry: "/src/main.ts",
|
|
80
|
-
filename: "index.html",
|
|
81
|
-
template: "index.html",
|
|
82
|
-
injectOptions: {
|
|
83
|
-
data: { title: VITE_GLOB_APP_TITLE }
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
}),
|
|
88
|
-
// 使用 svg 图标
|
|
89
|
-
// <SvgIcon name="xianxingdaoyu" />
|
|
90
|
-
createSvgIconsPlugin({
|
|
91
|
-
iconDirs: [
|
|
92
|
-
resolve(process.cwd(), "src/assets/global-icons"),
|
|
93
|
-
resolve(process.cwd(), "src/assets/option-icons"),
|
|
94
|
-
resolve(process.cwd(), "src/assets/route-icons")
|
|
95
|
-
]
|
|
96
|
-
// appoint svg icon using mode
|
|
97
|
-
// symbolId: "icon-[dir]-[name]"
|
|
98
|
-
}),
|
|
99
|
-
// vitePWA
|
|
100
|
-
VITE_PWA && createVitePwa(viteEnv),
|
|
101
|
-
// 是否生成包预览,分析依赖包大小做优化处理
|
|
102
|
-
VITE_REPORT && (visualizer({ filename: "stats.html", gzipSize: true, brotliSize: true }) as Plugin)
|
|
103
|
-
];
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @description VitePwa
|
|
108
|
-
* @param viteEnv
|
|
109
|
-
*/
|
|
110
|
-
const createVitePwa = (viteEnv: ViteEnv): PluginOption | PluginOption[] => {
|
|
111
|
-
const { VITE_GLOB_APP_TITLE } = viteEnv;
|
|
112
|
-
return VitePWA({
|
|
113
|
-
registerType: "autoUpdate",
|
|
114
|
-
manifest: {
|
|
115
|
-
name: VITE_GLOB_APP_TITLE,
|
|
116
|
-
short_name: VITE_GLOB_APP_TITLE,
|
|
117
|
-
theme_color: "#ffffff",
|
|
118
|
-
icons: [
|
|
119
|
-
{
|
|
120
|
-
src: "/logo.png",
|
|
121
|
-
sizes: "192x192",
|
|
122
|
-
type: "image/png"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
src: "/logo.png",
|
|
126
|
-
sizes: "512x512",
|
|
127
|
-
type: "image/png"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
src: "/logo.png",
|
|
131
|
-
sizes: "512x512",
|
|
132
|
-
type: "image/png",
|
|
133
|
-
purpose: "any maskable"
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
};
|
package/build/proxy.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ProxyOptions } from "vite";
|
|
2
|
-
|
|
3
|
-
type ProxyItem = [string, string];
|
|
4
|
-
|
|
5
|
-
type ProxyList = ProxyItem[];
|
|
6
|
-
|
|
7
|
-
type ProxyTargetList = Record<string, ProxyOptions>;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 创建代理,用于解析 .env.development 代理配置
|
|
11
|
-
* @param list
|
|
12
|
-
*/
|
|
13
|
-
export function createProxy(list: ProxyList = []) {
|
|
14
|
-
const ret: ProxyTargetList = {};
|
|
15
|
-
for (const [prefix, target] of list) {
|
|
16
|
-
const isHttps = /^https:\/\//.test(target);
|
|
17
|
-
// https://github.com/http-party/node-http-proxy#options
|
|
18
|
-
ret[prefix] = {
|
|
19
|
-
target: target,
|
|
20
|
-
changeOrigin: true,
|
|
21
|
-
ws: true,
|
|
22
|
-
rewrite: path => path.replace(new RegExp(`^${prefix}`), ""),
|
|
23
|
-
// https is require secure=false
|
|
24
|
-
...(isHttps ? { secure: false } : {})
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
return ret;
|
|
28
|
-
}
|
package/commitlint.config.cjs
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// @see: https://cz-git.qbenben.com/zh/guide
|
|
2
|
-
const fs = require("fs");
|
|
3
|
-
const path = require("path");
|
|
4
|
-
|
|
5
|
-
const scopes = fs
|
|
6
|
-
.readdirSync(path.resolve(__dirname, "src"), { withFileTypes: true })
|
|
7
|
-
.filter(dirent => dirent.isDirectory())
|
|
8
|
-
.map(dirent => dirent.name.replace(/s$/, ""));
|
|
9
|
-
|
|
10
|
-
/** @type {import('cz-git').UserConfig} */
|
|
11
|
-
module.exports = {
|
|
12
|
-
ignores: [commit => commit.includes("init")],
|
|
13
|
-
extends: ["@commitlint/config-conventional"],
|
|
14
|
-
rules: {
|
|
15
|
-
// @see: https://commitlint.js.org/#/reference-rules
|
|
16
|
-
"body-leading-blank": [2, "always"],
|
|
17
|
-
"footer-leading-blank": [1, "always"],
|
|
18
|
-
"header-max-length": [2, "always", 108],
|
|
19
|
-
"subject-empty": [2, "never"],
|
|
20
|
-
"type-empty": [2, "never"],
|
|
21
|
-
"subject-case": [0],
|
|
22
|
-
"type-enum": [
|
|
23
|
-
2,
|
|
24
|
-
"always",
|
|
25
|
-
[
|
|
26
|
-
"feat",
|
|
27
|
-
"fix",
|
|
28
|
-
"docs",
|
|
29
|
-
"style",
|
|
30
|
-
"refactor",
|
|
31
|
-
"perf",
|
|
32
|
-
"test",
|
|
33
|
-
"build",
|
|
34
|
-
"ci",
|
|
35
|
-
"chore",
|
|
36
|
-
"revert",
|
|
37
|
-
"wip",
|
|
38
|
-
"workflow",
|
|
39
|
-
"types",
|
|
40
|
-
"release"
|
|
41
|
-
]
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
prompt: {
|
|
45
|
-
messages: {
|
|
46
|
-
type: "选择你要提交的类型 :",
|
|
47
|
-
scope: "选择一个提交范围(可选):",
|
|
48
|
-
customScope: "请输入自定义的提交范围 :",
|
|
49
|
-
subject: "填写简短精炼的变更描述 :\n",
|
|
50
|
-
body: '填写更加详细的变更描述(可选)。使用 "|" 换行 :\n',
|
|
51
|
-
breaking: '列举非兼容性重大的变更(可选)。使用 "|" 换行 :\n',
|
|
52
|
-
footerPrefixsSelect: "选择关联issue前缀(可选):",
|
|
53
|
-
customFooterPrefixs: "输入自定义issue前缀 :",
|
|
54
|
-
footer: "列举关联issue (可选) 例如: #31, #I3244 :\n",
|
|
55
|
-
confirmCommit: "是否提交或修改commit ?"
|
|
56
|
-
},
|
|
57
|
-
types: [
|
|
58
|
-
{ value: "feat", name: "特性: 🚀 新增功能", emoji: "🚀" },
|
|
59
|
-
{ value: "fix", name: "修复: 🧩 修复缺陷", emoji: "🧩" },
|
|
60
|
-
{ value: "docs", name: "文档: 📚 文档变更", emoji: "📚" },
|
|
61
|
-
{ value: "style", name: "格式: 🎨 代码格式(不影响功能,例如空格、分号等格式修正)", emoji: "🎨" },
|
|
62
|
-
{ value: "refactor", name: "重构: ♻️ 代码重构(不包括 bug 修复、功能新增)", emoji: "♻️" },
|
|
63
|
-
{ value: "perf", name: "性能: ⚡️ 性能优化", emoji: "⚡️" },
|
|
64
|
-
{ value: "test", name: "测试: ✅ 添加疏漏测试或已有测试改动", emoji: "✅" },
|
|
65
|
-
{
|
|
66
|
-
value: "build",
|
|
67
|
-
name: "构建: 📦️ 构建流程、外部依赖变更(如升级 npm 包、修改 webpack 配置等)",
|
|
68
|
-
emoji: "📦️"
|
|
69
|
-
},
|
|
70
|
-
{ value: "ci", name: "集成: 🎡 修改 CI 配置、脚本", emoji: "🎡" },
|
|
71
|
-
{ value: "revert", name: "回退: ⏪️ 回滚 commit", emoji: "⏪️" },
|
|
72
|
-
{ value: "chore", name: "其他: 🔨 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)", emoji: "🔨" },
|
|
73
|
-
{ value: "wip", name: "开发: 🕔 正在开发中", emoji: "🕔" },
|
|
74
|
-
{ value: "workflow", name: "工作流: 📋 工作流程改进", emoji: "📋" },
|
|
75
|
-
{ value: "types", name: "类型: 🔰 类型定义文件修改", emoji: "🔰" }
|
|
76
|
-
],
|
|
77
|
-
useEmoji: true,
|
|
78
|
-
scopes: [...scopes],
|
|
79
|
-
customScopesAlign: "bottom",
|
|
80
|
-
emptyScopesAlias: "empty",
|
|
81
|
-
customScopesAlias: "custom",
|
|
82
|
-
allowBreakingChanges: ["feat", "fix"]
|
|
83
|
-
}
|
|
84
|
-
};
|
package/components.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// generated by unplugin-vue-components
|
|
2
|
-
// We suggest you to commit this file into source control
|
|
3
|
-
// Read more: https://github.com/vuejs/core/pull/3399
|
|
4
|
-
import '@vue/runtime-core'
|
|
5
|
-
|
|
6
|
-
export {}
|
|
7
|
-
|
|
8
|
-
declare module '@vue/runtime-core' {
|
|
9
|
-
export interface GlobalComponents {
|
|
10
|
-
ColSetting: typeof import('./src/components/ProTable/components/ColSetting.vue')['default']
|
|
11
|
-
CSvgIcon: typeof import('./src/components/CSvgIcon/index.vue')['default']
|
|
12
|
-
CTree: typeof import('./src/components/CTree/index.vue')['default']
|
|
13
|
-
Dialog: typeof import('./src/components/Dialog/index.vue')['default']
|
|
14
|
-
Empty: typeof import('./src/components/Empty/index.vue')['default']
|
|
15
|
-
Grid: typeof import('./src/components/Grid/index.vue')['default']
|
|
16
|
-
GridItem: typeof import('./src/components/Grid/components/GridItem.vue')['default']
|
|
17
|
-
Loading: typeof import('./src/components/Loading/index.vue')['default']
|
|
18
|
-
Overflow: typeof import('./src/components/Overflow/index.vue')['default']
|
|
19
|
-
Pagination: typeof import('./src/components/ProTable/components/Pagination.vue')['default']
|
|
20
|
-
ProTable: typeof import('./src/components/ProTable/index.vue')['default']
|
|
21
|
-
ScrollBox: typeof import('./src/components/ScrollBox/index.vue')['default']
|
|
22
|
-
SearchForm: typeof import('./src/components/ProTable/components/SearchForm/index.vue')['default']
|
|
23
|
-
SearchFormItem: typeof import('./src/components/ProTable/components/SearchForm/components/SearchFormItem.vue')['default']
|
|
24
|
-
SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default']
|
|
25
|
-
TableColumn: typeof import('./src/components/ProTable/components/TableColumn.vue')['default']
|
|
26
|
-
Tabs: typeof import('./src/components/Tabs/index.vue')['default']
|
|
27
|
-
}
|
|
28
|
-
}
|
package/index.html
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/logo.png" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title><%- title %></title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app">
|
|
11
|
-
<style>
|
|
12
|
-
html,
|
|
13
|
-
body,
|
|
14
|
-
#app {
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 100%;
|
|
17
|
-
padding: 0;
|
|
18
|
-
margin: 0;
|
|
19
|
-
}
|
|
20
|
-
.loading-box {
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
width: 100%;
|
|
26
|
-
height: 100%;
|
|
27
|
-
}
|
|
28
|
-
.loading-box .loading-wrap {
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
padding: 98px;
|
|
33
|
-
}
|
|
34
|
-
.dot {
|
|
35
|
-
position: relative;
|
|
36
|
-
box-sizing: border-box;
|
|
37
|
-
display: inline-block;
|
|
38
|
-
width: 32px;
|
|
39
|
-
height: 32px;
|
|
40
|
-
font-size: 32px;
|
|
41
|
-
transform: rotate(45deg);
|
|
42
|
-
animation: ant-rotate 1.2s infinite linear;
|
|
43
|
-
}
|
|
44
|
-
.dot i {
|
|
45
|
-
position: absolute;
|
|
46
|
-
display: block;
|
|
47
|
-
width: 14px;
|
|
48
|
-
height: 14px;
|
|
49
|
-
background-color: #409eff;
|
|
50
|
-
border-radius: 100%;
|
|
51
|
-
opacity: 0.3;
|
|
52
|
-
transform: scale(0.75);
|
|
53
|
-
transform-origin: 50% 50%;
|
|
54
|
-
animation: ant-spin-move 1s infinite linear alternate;
|
|
55
|
-
}
|
|
56
|
-
.dot i:nth-child(1) {
|
|
57
|
-
top: 0;
|
|
58
|
-
left: 0;
|
|
59
|
-
}
|
|
60
|
-
.dot i:nth-child(2) {
|
|
61
|
-
top: 0;
|
|
62
|
-
right: 0;
|
|
63
|
-
animation-delay: 0.4s;
|
|
64
|
-
}
|
|
65
|
-
.dot i:nth-child(3) {
|
|
66
|
-
right: 0;
|
|
67
|
-
bottom: 0;
|
|
68
|
-
animation-delay: 0.8s;
|
|
69
|
-
}
|
|
70
|
-
.dot i:nth-child(4) {
|
|
71
|
-
bottom: 0;
|
|
72
|
-
left: 0;
|
|
73
|
-
animation-delay: 1.2s;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@keyframes ant-rotate {
|
|
77
|
-
to {
|
|
78
|
-
transform: rotate(405deg);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@keyframes ant-spin-move {
|
|
83
|
-
to {
|
|
84
|
-
opacity: 1;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
</style>
|
|
88
|
-
<div class="loading-box">
|
|
89
|
-
<div class="loading-wrap">
|
|
90
|
-
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
<script>
|
|
95
|
-
const globalState = JSON.parse(window.localStorage.getItem("%VITE_GLOB_DEMO_KEY%" + "global"));
|
|
96
|
-
if (globalState) {
|
|
97
|
-
const dot = document.querySelectorAll(".dot i");
|
|
98
|
-
const html = document.querySelector("html");
|
|
99
|
-
dot.forEach(item => (item.style.background = globalState.primary));
|
|
100
|
-
if (globalState.isDark) html.style.background = "#141414";
|
|
101
|
-
}
|
|
102
|
-
</script>
|
|
103
|
-
<script type="module" src="/src/main.ts"></script>
|
|
104
|
-
</body>
|
|
105
|
-
</html>
|
package/lint-staged.config.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
"*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
|
|
3
|
-
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": ["prettier --write--parser json"],
|
|
4
|
-
"package.json": ["prettier --write"],
|
|
5
|
-
"*.vue": ["eslint --fix", "prettier --write", "stylelint --fix"],
|
|
6
|
-
"*.{scss,less,styl,html}": ["stylelint --fix", "prettier --write"],
|
|
7
|
-
"*.md": ["prettier --write"]
|
|
8
|
-
};
|
package/postcss.config.cjs
DELETED
package/public/logo.png
DELETED
|
Binary file
|
package/src/App.vue
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-config-provider :locale="zhCn" :size="size[1]" :button="buttonConfig">
|
|
3
|
-
<test></test>
|
|
4
|
-
</el-config-provider>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup lang="ts">
|
|
8
|
-
import { ElConfigProvider } from "element-plus";
|
|
9
|
-
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
|
10
|
-
import { AssemblySizeType } from "@/stores/interface/index";
|
|
11
|
-
import test from "@/plugins/index.vue";
|
|
12
|
-
const size: AssemblySizeType[] = ["large", "default", "small"];
|
|
13
|
-
|
|
14
|
-
// element button config
|
|
15
|
-
const buttonConfig = reactive({ autoInsertSpace: false });
|
|
16
|
-
</script>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description:请求配置
|
|
3
|
-
*/
|
|
4
|
-
export enum ResultEnum {
|
|
5
|
-
SUCCESS = 200,
|
|
6
|
-
ERROR = 500,
|
|
7
|
-
OVERDUE = 401,
|
|
8
|
-
TIMEOUT = 30000,
|
|
9
|
-
TYPE = "success"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description:请求方法
|
|
14
|
-
*/
|
|
15
|
-
export enum RequestEnum {
|
|
16
|
-
GET = "GET",
|
|
17
|
-
POST = "POST",
|
|
18
|
-
PATCH = "PATCH",
|
|
19
|
-
PUT = "PUT",
|
|
20
|
-
DELETE = "DELETE"
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @description:常用的 contentTyp 类型
|
|
25
|
-
*/
|
|
26
|
-
export enum ContentTypeEnum {
|
|
27
|
-
// json
|
|
28
|
-
JSON = "application/json;charset=UTF-8",
|
|
29
|
-
// text
|
|
30
|
-
TEXT = "text/plain;charset=UTF-8",
|
|
31
|
-
// form-data 一般配合qs
|
|
32
|
-
FORM_URLENCODED = "application/x-www-form-urlencoded;charset=UTF-8",
|
|
33
|
-
// form-data 上传
|
|
34
|
-
FORM_DATA = "multipart/form-data;charset=UTF-8"
|
|
35
|
-
}
|