Commit e1a44c9b95ec0a00480b77f86d14389b25c64429
1 parent
959b28bc
fix: 优化资源,注释无用打印
Showing
21 changed files
with
42 additions
and
59 deletions
.husky/pre-commit deleted
100755 → 0
apps/test-server/controller/FileController.ts
@@ -5,7 +5,7 @@ class FileController { | @@ -5,7 +5,7 @@ class FileController { | ||
5 | 5 | ||
6 | upload = async (ctx) => { | 6 | upload = async (ctx) => { |
7 | const files = ctx.request.files.file; | 7 | const files = ctx.request.files.file; |
8 | - console.log(files); | 8 | + // console.log(files); |
9 | 9 | ||
10 | if (files.length === undefined) { | 10 | if (files.length === undefined) { |
11 | this.service.upload(ctx, files, false); | 11 | this.service.upload(ctx, files, false); |
apps/test-server/index.ts
apps/test-server/service/FileService.ts
@@ -12,7 +12,7 @@ export default class UserService { | @@ -12,7 +12,7 @@ export default class UserService { | ||
12 | const fileFunc = function (file) { | 12 | const fileFunc = function (file) { |
13 | fileReader = fs.createReadStream(file.path); | 13 | fileReader = fs.createReadStream(file.path); |
14 | fileResource = filePath + `/${file.name}`; | 14 | fileResource = filePath + `/${file.name}`; |
15 | - console.log(fileResource); | 15 | + // console.log(fileResource); |
16 | 16 | ||
17 | writeStream = fs.createWriteStream(fileResource); | 17 | writeStream = fs.createWriteStream(fileResource); |
18 | fileReader.pipe(writeStream); | 18 | fileReader.pipe(writeStream); |
@@ -38,7 +38,7 @@ export default class UserService { | @@ -38,7 +38,7 @@ export default class UserService { | ||
38 | }; | 38 | }; |
39 | } | 39 | } |
40 | }; | 40 | }; |
41 | - console.log(isMultiple, files.length); | 41 | + // console.log(isMultiple, files.length); |
42 | 42 | ||
43 | if (isMultiple) { | 43 | if (isMultiple) { |
44 | for (let i = 0; i < files.length; i++) { | 44 | for (let i = 0; i < files.length; i++) { |
internal/vite-config/src/plugins/appConfig.ts
@@ -59,11 +59,11 @@ async function createAppConfigPlugin({ | @@ -59,11 +59,11 @@ async function createAppConfigPlugin({ | ||
59 | source, | 59 | source, |
60 | }); | 60 | }); |
61 | 61 | ||
62 | - console.log(colors.cyan(`✨configuration file is build successfully!`)); | 62 | + // console.log(colors.cyan(`✨configuration file is build successfully!`)); |
63 | } catch (error) { | 63 | } catch (error) { |
64 | - console.log( | ||
65 | - colors.red('configuration file configuration file failed to package:\n' + error), | ||
66 | - ); | 64 | + // console.log( |
65 | + // colors.red('configuration file configuration file failed to package:\n' + error), | ||
66 | + // ); | ||
67 | } | 67 | } |
68 | }, | 68 | }, |
69 | }; | 69 | }; |
src/components/Form/src/components/ApiTransfer.vue
@@ -87,8 +87,8 @@ | @@ -87,8 +87,8 @@ | ||
87 | 87 | ||
88 | function handleChange(keys: string[], direction: TransferDirection, moveKeys: string[]) { | 88 | function handleChange(keys: string[], direction: TransferDirection, moveKeys: string[]) { |
89 | _targetKeys.value = keys; | 89 | _targetKeys.value = keys; |
90 | - console.log(direction); | ||
91 | - console.log(moveKeys); | 90 | + // console.log(direction); |
91 | + // console.log(moveKeys); | ||
92 | emit('change', keys); | 92 | emit('change', keys); |
93 | } | 93 | } |
94 | 94 |
src/components/Table/src/hooks/useTableScroll.ts
@@ -138,7 +138,7 @@ export function useTableScroll( | @@ -138,7 +138,7 @@ export function useTableScroll( | ||
138 | const headerCellHeight = | 138 | const headerCellHeight = |
139 | (tableEl.querySelector('.ant-table-title') as HTMLElement)?.offsetHeight ?? 0; | 139 | (tableEl.querySelector('.ant-table-title') as HTMLElement)?.offsetHeight ?? 0; |
140 | 140 | ||
141 | - console.log(wrapHeight - formHeight - headerCellHeight - tablePadding - paginationMargin); | 141 | + // console.log(wrapHeight - formHeight - headerCellHeight - tablePadding - paginationMargin); |
142 | bottomIncludeBody = | 142 | bottomIncludeBody = |
143 | wrapHeight - formHeight - headerCellHeight - tablePadding - paginationMargin; | 143 | wrapHeight - formHeight - headerCellHeight - tablePadding - paginationMargin; |
144 | } else { | 144 | } else { |
src/components/Upload/src/FileList.vue
@@ -46,11 +46,11 @@ | @@ -46,11 +46,11 @@ | ||
46 | </thead> | 46 | </thead> |
47 | <tbody> | 47 | <tbody> |
48 | {dataSource.map((record = {}, index) => { | 48 | {dataSource.map((record = {}, index) => { |
49 | - console.log( | 49 | + {/* console.log( |
50 | '%c [ record ]-49', | 50 | '%c [ record ]-49', |
51 | 'font-size:13px; background:pink; color:#bf2c9f;', | 51 | 'font-size:13px; background:pink; color:#bf2c9f;', |
52 | record, | 52 | record, |
53 | - ); | 53 | + ); */} |
54 | 54 | ||
55 | return ( | 55 | return ( |
56 | <tr class="file-table-tr" key={`${index + record.name || ''}`}> | 56 | <tr class="file-table-tr" key={`${index + record.name || ''}`}> |
src/layouts/default/header/components/user-dropdown/index.vue
@@ -77,11 +77,11 @@ | @@ -77,11 +77,11 @@ | ||
77 | 77 | ||
78 | const getUserInfo = computed(() => { | 78 | const getUserInfo = computed(() => { |
79 | const { nickName = '', avatar, desc } = userStore.getUserInfo || {}; | 79 | const { nickName = '', avatar, desc } = userStore.getUserInfo || {}; |
80 | - console.log( | ||
81 | - '%c [ userStore.getUserInfo ]-80', | ||
82 | - 'font-size:13px; background:pink; color:#bf2c9f;', | ||
83 | - userStore.getUserInfo, | ||
84 | - ); | 80 | + // console.log( |
81 | + // '%c [ userStore.getUserInfo ]-80', | ||
82 | + // 'font-size:13px; background:pink; color:#bf2c9f;', | ||
83 | + // userStore.getUserInfo, | ||
84 | + // ); | ||
85 | return { nickName, avatar: avatar || headerImg, desc }; | 85 | return { nickName, avatar: avatar || headerImg, desc }; |
86 | }); | 86 | }); |
87 | 87 |
src/layouts/default/menu/index.vue
@@ -140,7 +140,7 @@ | @@ -140,7 +140,7 @@ | ||
140 | 140 | ||
141 | function renderMenu() { | 141 | function renderMenu() { |
142 | const { menus, ...menuProps } = unref(getCommonProps); | 142 | const { menus, ...menuProps } = unref(getCommonProps); |
143 | - console.log(menus); | 143 | + // console.log(menus); |
144 | if (!menus || !menus.length) return null; | 144 | if (!menus || !menus.length) return null; |
145 | return !props.isHorizontal ? ( | 145 | return !props.isHorizontal ? ( |
146 | <SimpleMenu {...menuProps} isSplitMenu={unref(getSplit)} items={menus} /> | 146 | <SimpleMenu {...menuProps} isSplitMenu={unref(getSplit)} items={menus} /> |
src/store/modules/app.ts
@@ -48,11 +48,11 @@ export const useAppStore = defineStore({ | @@ -48,11 +48,11 @@ export const useAppStore = defineStore({ | ||
48 | }, | 48 | }, |
49 | 49 | ||
50 | getProjectConfig(state): ProjectConfig { | 50 | getProjectConfig(state): ProjectConfig { |
51 | - console.log( | ||
52 | - '%c [ state.projectConfig ]-52', | ||
53 | - 'font-size:13px; background:pink; color:#bf2c9f;', | ||
54 | - state.projectConfig, | ||
55 | - ); | 51 | + // console.log( |
52 | + // '%c [ state.projectConfig ]-52', | ||
53 | + // 'font-size:13px; background:pink; color:#bf2c9f;', | ||
54 | + // state.projectConfig, | ||
55 | + // ); | ||
56 | return state.projectConfig || ({} as ProjectConfig); | 56 | return state.projectConfig || ({} as ProjectConfig); |
57 | }, | 57 | }, |
58 | 58 |
src/store/modules/permission.ts
@@ -112,11 +112,11 @@ export const usePermissionStore = defineStore({ | @@ -112,11 +112,11 @@ export const usePermissionStore = defineStore({ | ||
112 | async buildRoutesAction(): Promise<AppRouteRecordRaw[]> { | 112 | async buildRoutesAction(): Promise<AppRouteRecordRaw[]> { |
113 | const { t } = useI18n(); | 113 | const { t } = useI18n(); |
114 | const userStore = useUserStore(); | 114 | const userStore = useUserStore(); |
115 | - console.log( | ||
116 | - '%c [ userStore ]-115', | ||
117 | - 'font-size:13px; background:pink; color:#bf2c9f;', | ||
118 | - userStore, | ||
119 | - ); | 115 | + // console.log( |
116 | + // '%c [ userStore ]-115', | ||
117 | + // 'font-size:13px; background:pink; color:#bf2c9f;', | ||
118 | + // userStore, | ||
119 | + // ); | ||
120 | const appStore = useAppStoreWithOut(); | 120 | const appStore = useAppStoreWithOut(); |
121 | 121 | ||
122 | let routes: AppRouteRecordRaw[] = []; | 122 | let routes: AppRouteRecordRaw[] = []; |
src/views/demo/form/index.vue
@@ -160,8 +160,8 @@ | @@ -160,8 +160,8 @@ | ||
160 | // componentProps:{}, | 160 | // componentProps:{}, |
161 | // can func | 161 | // can func |
162 | componentProps: ({ schema, formModel }) => { | 162 | componentProps: ({ schema, formModel }) => { |
163 | - console.log('form:', schema); | ||
164 | - console.log('formModel:', formModel); | 163 | + // console.log('form:', schema); |
164 | + // console.log('formModel:', formModel); | ||
165 | return { | 165 | return { |
166 | placeholder: '自定义placeholder', | 166 | placeholder: '自定义placeholder', |
167 | onChange: (e: any) => { | 167 | onChange: (e: any) => { |
src/views/demo/page/form/high/index.vue
@@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
58 | } | 58 | } |
59 | 59 | ||
60 | const [values, taskValues] = await Promise.all([validate(), validateTaskForm()]); | 60 | const [values, taskValues] = await Promise.all([validate(), validateTaskForm()]); |
61 | - console.log('form data:', values, taskValues); | 61 | + // console.log('form data:', values, taskValues); |
62 | } catch (error) {} | 62 | } catch (error) {} |
63 | } | 63 | } |
64 | 64 |
src/views/demo/page/form/step/index.vue
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | function handleStep1Next(step1Values: any) { | 53 | function handleStep1Next(step1Values: any) { |
54 | current.value++; | 54 | current.value++; |
55 | state.initSetp2 = true; | 55 | state.initSetp2 = true; |
56 | - console.log(step1Values); | 56 | + // console.log(step1Values); |
57 | } | 57 | } |
58 | 58 | ||
59 | function handleStepPrev() { | 59 | function handleStepPrev() { |
@@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
63 | function handleStep2Next(step2Values: any) { | 63 | function handleStep2Next(step2Values: any) { |
64 | current.value++; | 64 | current.value++; |
65 | state.initSetp3 = true; | 65 | state.initSetp3 = true; |
66 | - console.log(step2Values); | 66 | + // console.log(step2Values); |
67 | } | 67 | } |
68 | 68 | ||
69 | function handleRedo() { | 69 | function handleRedo() { |
src/views/demo/system/dept/DeptModal.vue
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | const values = await validate(); | 49 | const values = await validate(); |
50 | setModalProps({ confirmLoading: true }); | 50 | setModalProps({ confirmLoading: true }); |
51 | // TODO custom api | 51 | // TODO custom api |
52 | - console.log(values); | 52 | + // console.log(values); |
53 | closeModal(); | 53 | closeModal(); |
54 | emit('success'); | 54 | emit('success'); |
55 | } finally { | 55 | } finally { |
src/views/demo/table/AuthColumn.vue
@@ -136,13 +136,13 @@ | @@ -136,13 +136,13 @@ | ||
136 | }, | 136 | }, |
137 | }); | 137 | }); |
138 | function handleEdit(record: Recordable) { | 138 | function handleEdit(record: Recordable) { |
139 | - console.log('点击了编辑', record); | 139 | + // console.log('点击了编辑', record); |
140 | } | 140 | } |
141 | function handleDelete(record: Recordable) { | 141 | function handleDelete(record: Recordable) { |
142 | - console.log('点击了删除', record); | 142 | + // console.log('点击了删除', record); |
143 | } | 143 | } |
144 | function handleOpen(record: Recordable) { | 144 | function handleOpen(record: Recordable) { |
145 | - console.log('点击了启用', record); | 145 | + // console.log('点击了启用', record); |
146 | } | 146 | } |
147 | return { | 147 | return { |
148 | registerTable, | 148 | registerTable, |
src/views/demo/table/EditCellTable.vue
@@ -224,7 +224,7 @@ | @@ -224,7 +224,7 @@ | ||
224 | const { createMessage } = useMessage(); | 224 | const { createMessage } = useMessage(); |
225 | 225 | ||
226 | function handleEditEnd({ record, index, key, value }: Recordable) { | 226 | function handleEditEnd({ record, index, key, value }: Recordable) { |
227 | - console.log(record, index, key, value); | 227 | + // console.log(record, index, key, value); |
228 | return false; | 228 | return false; |
229 | } | 229 | } |
230 | 230 |
src/views/project/config/EmailPanel.vue
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | } | 106 | } |
107 | //编辑 | 107 | //编辑 |
108 | function handleEdit(record) { | 108 | function handleEdit(record) { |
109 | - console.log('点击了编辑', record); | 109 | + // console.log('点击了编辑', record); |
110 | openDrawerEdit(true, { | 110 | openDrawerEdit(true, { |
111 | data: record, | 111 | data: record, |
112 | isUpdate: true, | 112 | isUpdate: true, |
src/views/project/config/ProduCostCreate.vue
@@ -110,7 +110,7 @@ | @@ -110,7 +110,7 @@ | ||
110 | emit('modal-success'); | 110 | emit('modal-success'); |
111 | closeModal(); | 111 | closeModal(); |
112 | } catch (error) { | 112 | } catch (error) { |
113 | - console.log('%c [ error ]-108', 'font-size:13px; background:pink; color:#bf2c9f;', error); | 113 | + // console.log('%c [ error ]-108', 'font-size:13px; background:pink; color:#bf2c9f;', error); |
114 | } | 114 | } |
115 | } | 115 | } |
116 | return { | 116 | return { |
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/index.vue
@@ -208,15 +208,10 @@ | @@ -208,15 +208,10 @@ | ||
208 | function handleFieldValueChange(field: string, value: any) { | 208 | function handleFieldValueChange(field: string, value: any) { |
209 | // 如果是项目号字段变化且处于全选状态,同步更新查询条件 | 209 | // 如果是项目号字段变化且处于全选状态,同步更新查询条件 |
210 | if (field === 'projectNo' && localStorage.getItem('isAllSelected') === 'true') { | 210 | if (field === 'projectNo' && localStorage.getItem('isAllSelected') === 'true') { |
211 | - console.log('=== handleFieldValueChange 开始 ==='); | ||
212 | - console.log('field:', field); | ||
213 | - console.log('value:', value); | ||
214 | 211 | ||
215 | // 确保value是数组格式,并去重 | 212 | // 确保value是数组格式,并去重 |
216 | const projectNoArray = Array.isArray(value) ? [...new Set(value)] : []; | 213 | const projectNoArray = Array.isArray(value) ? [...new Set(value)] : []; |
217 | - | ||
218 | - console.log('处理后的项目号数组:', projectNoArray); | ||
219 | - | 214 | + |
220 | // 强制重新加载表格,使用新的查询条件 | 215 | // 强制重新加载表格,使用新的查询条件 |
221 | reload({ | 216 | reload({ |
222 | searchInfo: { | 217 | searchInfo: { |
@@ -227,8 +222,6 @@ | @@ -227,8 +222,6 @@ | ||
227 | // 同时更新detailProjectNoKeys数组 | 222 | // 同时更新detailProjectNoKeys数组 |
228 | detailProjectNoKeys.value = projectNoArray; | 223 | detailProjectNoKeys.value = projectNoArray; |
229 | 224 | ||
230 | - console.log('更新后的查询条件:', projectNoArray); | ||
231 | - console.log('=== handleFieldValueChange 结束 ==='); | ||
232 | } | 225 | } |
233 | } | 226 | } |
234 | 227 |