Commit 56a966cfbf8db5b29a42185f0f25a0e800c30dbb
1 parent
2884e863
chore: format code
Showing
100 changed files
with
188 additions
and
184 deletions
Too many changes to show.
To preserve performance only 100 of 148 files are displayed.
.vscode/launch.json
README.zh-CN.md
@@ -150,7 +150,7 @@ yarn build | @@ -150,7 +150,7 @@ yarn build | ||
150 | ## 后台整合示例 | 150 | ## 后台整合示例 |
151 | 151 | ||
152 | - [lamp-cloud](https://github.com/zuihou/lamp-cloud) - 基于 SpringCloud Alibaba 的微服务中后台快速开发平台 | 152 | - [lamp-cloud](https://github.com/zuihou/lamp-cloud) - 基于 SpringCloud Alibaba 的微服务中后台快速开发平台 |
153 | -- [matecloud](https://github.com/matevip/matecloud) - MateCloud微服务脚手架,基于Spring Cloud 2020.0.3、SpringBoot 2.5.3的全开源平台 | 153 | +- [matecloud](https://github.com/matevip/matecloud) - MateCloud 微服务脚手架,基于 Spring Cloud 2020.0.3、SpringBoot 2.5.3 的全开源平台 |
154 | 154 | ||
155 | ## 维护者 | 155 | ## 维护者 |
156 | 156 |
build/generate/icon/index.ts
@@ -52,19 +52,19 @@ async function generateIcon() { | @@ -52,19 +52,19 @@ async function generateIcon() { | ||
52 | const { prefix } = data; | 52 | const { prefix } = data; |
53 | const isLocal = useType === 'local'; | 53 | const isLocal = useType === 'local'; |
54 | const icons = Object.keys(data.icons).map( | 54 | const icons = Object.keys(data.icons).map( |
55 | - (item) => `${isLocal ? prefix + ':' : ''}${item}` | 55 | + (item) => `${isLocal ? prefix + ':' : ''}${item}`, |
56 | ); | 56 | ); |
57 | 57 | ||
58 | await fs.writeFileSync( | 58 | await fs.writeFileSync( |
59 | path.join(output, `icons.data.ts`), | 59 | path.join(output, `icons.data.ts`), |
60 | - `export default ${isLocal ? JSON.stringify(icons) : JSON.stringify({ prefix, icons })}` | 60 | + `export default ${isLocal ? JSON.stringify(icons) : JSON.stringify({ prefix, icons })}`, |
61 | ); | 61 | ); |
62 | prefixSet.push(prefix); | 62 | prefixSet.push(prefix); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite')); | 65 | fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite')); |
66 | console.log( | 66 | console.log( |
67 | - `✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]` | 67 | + `✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`, |
68 | ); | 68 | ); |
69 | }); | 69 | }); |
70 | } | 70 | } |
build/script/buildConf.ts
@@ -15,7 +15,7 @@ function createConfig( | @@ -15,7 +15,7 @@ function createConfig( | ||
15 | configName, | 15 | configName, |
16 | config, | 16 | config, |
17 | configFileName = GLOB_CONFIG_FILE_NAME, | 17 | configFileName = GLOB_CONFIG_FILE_NAME, |
18 | - }: { configName: string; config: any; configFileName?: string } = { configName: '', config: {} } | 18 | + }: { configName: string; config: any; configFileName?: string } = { configName: '', config: {} }, |
19 | ) { | 19 | ) { |
20 | try { | 20 | try { |
21 | const windowConf = `window.${configName}`; | 21 | const windowConf = `window.${configName}`; |
build/vite/plugin/compress.ts
@@ -7,7 +7,7 @@ import compressPlugin from 'vite-plugin-compression'; | @@ -7,7 +7,7 @@ import compressPlugin from 'vite-plugin-compression'; | ||
7 | 7 | ||
8 | export function configCompressPlugin( | 8 | export function configCompressPlugin( |
9 | compress: 'gzip' | 'brotli' | 'none', | 9 | compress: 'gzip' | 'brotli' | 'none', |
10 | - deleteOriginFile = false | 10 | + deleteOriginFile = false, |
11 | ): Plugin | Plugin[] { | 11 | ): Plugin | Plugin[] { |
12 | const compressList = compress.split(','); | 12 | const compressList = compress.split(','); |
13 | 13 | ||
@@ -18,7 +18,7 @@ export function configCompressPlugin( | @@ -18,7 +18,7 @@ export function configCompressPlugin( | ||
18 | compressPlugin({ | 18 | compressPlugin({ |
19 | ext: '.gz', | 19 | ext: '.gz', |
20 | deleteOriginFile, | 20 | deleteOriginFile, |
21 | - }) | 21 | + }), |
22 | ); | 22 | ); |
23 | } | 23 | } |
24 | 24 | ||
@@ -28,7 +28,7 @@ export function configCompressPlugin( | @@ -28,7 +28,7 @@ export function configCompressPlugin( | ||
28 | ext: '.br', | 28 | ext: '.br', |
29 | algorithm: 'brotliCompress', | 29 | algorithm: 'brotliCompress', |
30 | deleteOriginFile, | 30 | deleteOriginFile, |
31 | - }) | 31 | + }), |
32 | ); | 32 | ); |
33 | } | 33 | } |
34 | return plugins; | 34 | return plugins; |
build/vite/plugin/index.ts
@@ -68,7 +68,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | @@ -68,7 +68,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | ||
68 | 68 | ||
69 | // rollup-plugin-gzip | 69 | // rollup-plugin-gzip |
70 | vitePlugins.push( | 70 | vitePlugins.push( |
71 | - configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE) | 71 | + configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE), |
72 | ); | 72 | ); |
73 | 73 | ||
74 | // vite-plugin-pwa | 74 | // vite-plugin-pwa |
mock/_util.ts
@@ -13,7 +13,7 @@ export function resultPageSuccess<T = any>( | @@ -13,7 +13,7 @@ export function resultPageSuccess<T = any>( | ||
13 | page: number, | 13 | page: number, |
14 | pageSize: number, | 14 | pageSize: number, |
15 | list: T[], | 15 | list: T[], |
16 | - { message = 'ok' } = {} | 16 | + { message = 'ok' } = {}, |
17 | ) { | 17 | ) { |
18 | const pageData = pagination(page, pageSize, list); | 18 | const pageData = pagination(page, pageSize, list); |
19 | 19 |
mock/sys/user.ts
@@ -52,7 +52,7 @@ export default [ | @@ -52,7 +52,7 @@ export default [ | ||
52 | response: ({ body }) => { | 52 | response: ({ body }) => { |
53 | const { username, password } = body; | 53 | const { username, password } = body; |
54 | const checkUser = createFakeUserList().find( | 54 | const checkUser = createFakeUserList().find( |
55 | - (item) => item.username === username && password === item.password | 55 | + (item) => item.username === username && password === item.password, |
56 | ); | 56 | ); |
57 | if (!checkUser) { | 57 | if (!checkUser) { |
58 | return resultError('Incorrect account or password!'); | 58 | return resultError('Incorrect account or password!'); |
prettier.config.js
@@ -7,7 +7,7 @@ module.exports = { | @@ -7,7 +7,7 @@ module.exports = { | ||
7 | singleQuote: true, | 7 | singleQuote: true, |
8 | quoteProps: 'as-needed', | 8 | quoteProps: 'as-needed', |
9 | bracketSpacing: true, | 9 | bracketSpacing: true, |
10 | - trailingComma: 'es5', | 10 | + trailingComma: 'all', |
11 | jsxBracketSameLine: false, | 11 | jsxBracketSameLine: false, |
12 | jsxSingleQuote: false, | 12 | jsxSingleQuote: false, |
13 | arrowParens: 'always', | 13 | arrowParens: 'always', |
@@ -16,5 +16,4 @@ module.exports = { | @@ -16,5 +16,4 @@ module.exports = { | ||
16 | proseWrap: 'never', | 16 | proseWrap: 'never', |
17 | htmlWhitespaceSensitivity: 'strict', | 17 | htmlWhitespaceSensitivity: 'strict', |
18 | endOfLine: 'auto', | 18 | endOfLine: 'auto', |
19 | - rangeStart: 0, | ||
20 | }; | 19 | }; |
src/App.vue
@@ -15,5 +15,6 @@ | @@ -15,5 +15,6 @@ | ||
15 | // support Multi-language | 15 | // support Multi-language |
16 | const { getAntdLocale } = useLocale(); | 16 | const { getAntdLocale } = useLocale(); |
17 | 17 | ||
18 | + // Listening to page changes and dynamically changing site titles | ||
18 | useTitle(); | 19 | useTitle(); |
19 | </script> | 20 | </script> |
src/api/sys/upload.ts
@@ -10,13 +10,13 @@ const { uploadUrl = '' } = useGlobSetting(); | @@ -10,13 +10,13 @@ const { uploadUrl = '' } = useGlobSetting(); | ||
10 | */ | 10 | */ |
11 | export function uploadApi( | 11 | export function uploadApi( |
12 | params: UploadFileParams, | 12 | params: UploadFileParams, |
13 | - onUploadProgress: (progressEvent: ProgressEvent) => void | 13 | + onUploadProgress: (progressEvent: ProgressEvent) => void, |
14 | ) { | 14 | ) { |
15 | return defHttp.uploadFile<UploadApiResult>( | 15 | return defHttp.uploadFile<UploadApiResult>( |
16 | { | 16 | { |
17 | url: uploadUrl, | 17 | url: uploadUrl, |
18 | onUploadProgress, | 18 | onUploadProgress, |
19 | }, | 19 | }, |
20 | - params | 20 | + params, |
21 | ); | 21 | ); |
22 | } | 22 | } |
src/api/sys/user.ts
@@ -21,7 +21,7 @@ export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal') | @@ -21,7 +21,7 @@ export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal') | ||
21 | }, | 21 | }, |
22 | { | 22 | { |
23 | errorMessageMode: mode, | 23 | errorMessageMode: mode, |
24 | - } | 24 | + }, |
25 | ); | 25 | ); |
26 | } | 26 | } |
27 | 27 |
src/components/Application/src/AppDarkModeToggle.vue
1 | <template> | 1 | <template> |
2 | <div v-if="getShowDarkModeToggle" :class="getClass" @click="toggleDarkMode"> | 2 | <div v-if="getShowDarkModeToggle" :class="getClass" @click="toggleDarkMode"> |
3 | - <div :class="`${prefixCls}-inner`"> </div> | 3 | + <div :class="`${prefixCls}-inner`"></div> |
4 | <SvgIcon size="14" name="sun" /> | 4 | <SvgIcon size="14" name="sun" /> |
5 | <SvgIcon size="14" name="moon" /> | 5 | <SvgIcon size="14" name="moon" /> |
6 | </div> | 6 | </div> |
src/components/Application/src/search/AppSearchModal.vue
src/components/Basic/src/BasicHelp.vue
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | const { prefixCls } = useDesign('basic-help'); | 47 | const { prefixCls } = useDesign('basic-help'); |
48 | 48 | ||
49 | const getTooltipStyle = computed( | 49 | const getTooltipStyle = computed( |
50 | - (): CSSProperties => ({ color: props.color, fontSize: props.fontSize }) | 50 | + (): CSSProperties => ({ color: props.color, fontSize: props.fontSize }), |
51 | ); | 51 | ); |
52 | 52 | ||
53 | const getOverlayStyle = computed((): CSSProperties => ({ maxWidth: props.maxWidth })); | 53 | const getOverlayStyle = computed((): CSSProperties => ({ maxWidth: props.maxWidth })); |
src/components/Button/src/PopConfirmButton.vue
src/components/CodeEditor/src/codemirror/CodeMirror.vue
1 | <template> | 1 | <template> |
2 | - <div class="relative !h-full w-full overflow-hidden" ref="el"> </div> | 2 | + <div class="relative !h-full w-full overflow-hidden" ref="el"></div> |
3 | </template> | 3 | </template> |
4 | 4 | ||
5 | <script lang="ts" setup> | 5 | <script lang="ts" setup> |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | editor?.setValue(value ? value : ''); | 40 | editor?.setValue(value ? value : ''); |
41 | } | 41 | } |
42 | }, | 42 | }, |
43 | - { flush: 'post' } | 43 | + { flush: 'post' }, |
44 | ); | 44 | ); |
45 | 45 | ||
46 | watchEffect(() => { | 46 | watchEffect(() => { |
@@ -54,13 +54,13 @@ | @@ -54,13 +54,13 @@ | ||
54 | }, | 54 | }, |
55 | { | 55 | { |
56 | immediate: true, | 56 | immediate: true, |
57 | - } | 57 | + }, |
58 | ); | 58 | ); |
59 | 59 | ||
60 | function setTheme() { | 60 | function setTheme() { |
61 | unref(editor)?.setOption( | 61 | unref(editor)?.setOption( |
62 | 'theme', | 62 | 'theme', |
63 | - appStore.getDarkMode === 'light' ? 'idea' : 'material-palenight' | 63 | + appStore.getDarkMode === 'light' ? 'idea' : 'material-palenight', |
64 | ); | 64 | ); |
65 | } | 65 | } |
66 | 66 |
src/components/Cropper/src/CropperAvatar.vue
@@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
77 | const getStyle = computed((): CSSProperties => ({ width: unref(getWidth) })); | 77 | const getStyle = computed((): CSSProperties => ({ width: unref(getWidth) })); |
78 | 78 | ||
79 | const getImageWrapperStyle = computed( | 79 | const getImageWrapperStyle = computed( |
80 | - (): CSSProperties => ({ width: unref(getWidth), height: unref(getWidth) }) | 80 | + (): CSSProperties => ({ width: unref(getWidth), height: unref(getWidth) }), |
81 | ); | 81 | ); |
82 | 82 | ||
83 | watchEffect(() => { | 83 | watchEffect(() => { |
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | () => sourceValue.value, | 88 | () => sourceValue.value, |
89 | (v: string) => { | 89 | (v: string) => { |
90 | emit('update:value', v); | 90 | emit('update:value', v); |
91 | - } | 91 | + }, |
92 | ); | 92 | ); |
93 | 93 | ||
94 | function handleUploadSuccess({ source }) { | 94 | function handleUploadSuccess({ source }) { |
src/components/Description/src/typing.ts
@@ -14,7 +14,7 @@ export interface DescItem { | @@ -14,7 +14,7 @@ export interface DescItem { | ||
14 | // render | 14 | // render |
15 | render?: ( | 15 | render?: ( |
16 | val: any, | 16 | val: any, |
17 | - data: Recordable | 17 | + data: Recordable, |
18 | ) => VNode | undefined | JSX.Element | Element | string | number; | 18 | ) => VNode | undefined | JSX.Element | Element | string | number; |
19 | } | 19 | } |
20 | 20 |
src/components/Drawer/src/BasicDrawer.vue
@@ -139,7 +139,7 @@ | @@ -139,7 +139,7 @@ | ||
139 | (newVal, oldVal) => { | 139 | (newVal, oldVal) => { |
140 | if (newVal !== oldVal) visibleRef.value = newVal; | 140 | if (newVal !== oldVal) visibleRef.value = newVal; |
141 | }, | 141 | }, |
142 | - { deep: true } | 142 | + { deep: true }, |
143 | ); | 143 | ); |
144 | 144 | ||
145 | watch( | 145 | watch( |
@@ -149,7 +149,7 @@ | @@ -149,7 +149,7 @@ | ||
149 | emit('visible-change', visible); | 149 | emit('visible-change', visible); |
150 | instance && drawerInstance.emitVisible?.(visible, instance.uid); | 150 | instance && drawerInstance.emitVisible?.(visible, instance.uid); |
151 | }); | 151 | }); |
152 | - } | 152 | + }, |
153 | ); | 153 | ); |
154 | 154 | ||
155 | // Cancel event | 155 | // Cancel event |
src/components/FlowChart/src/FlowChart.vue
@@ -79,7 +79,7 @@ | @@ -79,7 +79,7 @@ | ||
79 | () => props.data, | 79 | () => props.data, |
80 | () => { | 80 | () => { |
81 | onRender(); | 81 | onRender(); |
82 | - } | 82 | + }, |
83 | ); | 83 | ); |
84 | 84 | ||
85 | // TODO | 85 | // TODO |
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | () => unref(getFlowOptions), | 94 | () => unref(getFlowOptions), |
95 | (options) => { | 95 | (options) => { |
96 | unref(lfInstance)?.updateEditConfig(options); | 96 | unref(lfInstance)?.updateEditConfig(options); |
97 | - } | 97 | + }, |
98 | ); | 98 | ); |
99 | 99 | ||
100 | // init logicFlow | 100 | // init logicFlow |
src/components/Form/src/BasicForm.vue
@@ -110,7 +110,7 @@ | @@ -110,7 +110,7 @@ | ||
110 | }); | 110 | }); |
111 | 111 | ||
112 | const getBindValue = computed( | 112 | const getBindValue = computed( |
113 | - () => ({ ...attrs, ...props, ...unref(getProps) } as Recordable) | 113 | + () => ({ ...attrs, ...props, ...unref(getProps) } as Recordable), |
114 | ); | 114 | ); |
115 | 115 | ||
116 | const getSchema = computed((): FormSchema[] => { | 116 | const getSchema = computed((): FormSchema[] => { |
@@ -198,14 +198,14 @@ | @@ -198,14 +198,14 @@ | ||
198 | }, | 198 | }, |
199 | { | 199 | { |
200 | immediate: true, | 200 | immediate: true, |
201 | - } | 201 | + }, |
202 | ); | 202 | ); |
203 | 203 | ||
204 | watch( | 204 | watch( |
205 | () => unref(getProps).schemas, | 205 | () => unref(getProps).schemas, |
206 | (schemas) => { | 206 | (schemas) => { |
207 | resetSchema(schemas ?? []); | 207 | resetSchema(schemas ?? []); |
208 | - } | 208 | + }, |
209 | ); | 209 | ); |
210 | 210 | ||
211 | watch( | 211 | watch( |
@@ -222,7 +222,7 @@ | @@ -222,7 +222,7 @@ | ||
222 | initDefault(); | 222 | initDefault(); |
223 | isInitedDefaultRef.value = true; | 223 | isInitedDefaultRef.value = true; |
224 | } | 224 | } |
225 | - } | 225 | + }, |
226 | ); | 226 | ); |
227 | 227 | ||
228 | async function setProps(formProps: Partial<FormProps>): Promise<void> { | 228 | async function setProps(formProps: Partial<FormProps>): Promise<void> { |
@@ -284,7 +284,7 @@ | @@ -284,7 +284,7 @@ | ||
284 | setFormModel, | 284 | setFormModel, |
285 | getFormClass, | 285 | getFormClass, |
286 | getFormActionBindProps: computed( | 286 | getFormActionBindProps: computed( |
287 | - (): Recordable => ({ ...getProps.value, ...advanceState }) | 287 | + (): Recordable => ({ ...getProps.value, ...advanceState }), |
288 | ), | 288 | ), |
289 | ...formActionType, | 289 | ...formActionType, |
290 | }; | 290 | }; |
src/components/Form/src/components/ApiSelect.vue
src/components/Form/src/components/ApiTreeSelect.vue
@@ -46,14 +46,14 @@ | @@ -46,14 +46,14 @@ | ||
46 | () => { | 46 | () => { |
47 | isFirstLoaded.value && fetch(); | 47 | isFirstLoaded.value && fetch(); |
48 | }, | 48 | }, |
49 | - { deep: true } | 49 | + { deep: true }, |
50 | ); | 50 | ); |
51 | 51 | ||
52 | watch( | 52 | watch( |
53 | () => props.immediate, | 53 | () => props.immediate, |
54 | (v) => { | 54 | (v) => { |
55 | v && !isFirstLoaded.value && fetch(); | 55 | v && !isFirstLoaded.value && fetch(); |
56 | - } | 56 | + }, |
57 | ); | 57 | ); |
58 | 58 | ||
59 | onMounted(() => { | 59 | onMounted(() => { |
src/components/Form/src/components/FormAction.vue
@@ -105,7 +105,7 @@ | @@ -105,7 +105,7 @@ | ||
105 | { | 105 | { |
106 | text: t('common.resetText'), | 106 | text: t('common.resetText'), |
107 | }, | 107 | }, |
108 | - props.resetButtonOptions | 108 | + props.resetButtonOptions, |
109 | ); | 109 | ); |
110 | }); | 110 | }); |
111 | 111 | ||
@@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
114 | { | 114 | { |
115 | text: t('common.queryText'), | 115 | text: t('common.queryText'), |
116 | }, | 116 | }, |
117 | - props.submitButtonOptions | 117 | + props.submitButtonOptions, |
118 | ); | 118 | ); |
119 | }); | 119 | }); |
120 | 120 |
src/components/Form/src/components/FormItem.vue
@@ -183,7 +183,7 @@ | @@ -183,7 +183,7 @@ | ||
183 | } | 183 | } |
184 | 184 | ||
185 | const requiredRuleIndex: number = rules.findIndex( | 185 | const requiredRuleIndex: number = rules.findIndex( |
186 | - (rule) => Reflect.has(rule, 'required') && !Reflect.has(rule, 'validator') | 186 | + (rule) => Reflect.has(rule, 'required') && !Reflect.has(rule, 'validator'), |
187 | ); | 187 | ); |
188 | 188 | ||
189 | if (requiredRuleIndex !== -1) { | 189 | if (requiredRuleIndex !== -1) { |
src/components/Form/src/helper.ts
@@ -38,7 +38,7 @@ function genType() { | @@ -38,7 +38,7 @@ function genType() { | ||
38 | export function setComponentRuleType( | 38 | export function setComponentRuleType( |
39 | rule: ValidationRule, | 39 | rule: ValidationRule, |
40 | component: ComponentType, | 40 | component: ComponentType, |
41 | - valueFormat: string | 41 | + valueFormat: string, |
42 | ) { | 42 | ) { |
43 | if (['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker'].includes(component)) { | 43 | if (['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker'].includes(component)) { |
44 | rule.type = valueFormat ? 'string' : 'object'; | 44 | rule.type = valueFormat ? 'string' : 'object'; |
src/components/Form/src/hooks/useAdvanced.ts
@@ -58,7 +58,7 @@ export default function ({ | @@ -58,7 +58,7 @@ export default function ({ | ||
58 | debounceUpdateAdvanced(); | 58 | debounceUpdateAdvanced(); |
59 | } | 59 | } |
60 | }, | 60 | }, |
61 | - { immediate: true } | 61 | + { immediate: true }, |
62 | ); | 62 | ); |
63 | 63 | ||
64 | function getAdvanced(itemCol: Partial<ColEx>, itemColSum = 0, isLastAction = false) { | 64 | function getAdvanced(itemCol: Partial<ColEx>, itemColSum = 0, isLastAction = false) { |
@@ -139,7 +139,7 @@ export default function ({ | @@ -139,7 +139,7 @@ export default function ({ | ||
139 | if (isShow && (colProps || baseColProps)) { | 139 | if (isShow && (colProps || baseColProps)) { |
140 | const { itemColSum: sum, isAdvanced } = getAdvanced( | 140 | const { itemColSum: sum, isAdvanced } = getAdvanced( |
141 | { ...baseColProps, ...colProps }, | 141 | { ...baseColProps, ...colProps }, |
142 | - itemColSum | 142 | + itemColSum, |
143 | ); | 143 | ); |
144 | 144 | ||
145 | itemColSum = sum || 0; | 145 | itemColSum = sum || 0; |
src/components/Form/src/hooks/useForm.ts
@@ -18,7 +18,7 @@ export function useForm(props?: Props): UseFormReturnType { | @@ -18,7 +18,7 @@ export function useForm(props?: Props): UseFormReturnType { | ||
18 | const form = unref(formRef); | 18 | const form = unref(formRef); |
19 | if (!form) { | 19 | if (!form) { |
20 | error( | 20 | error( |
21 | - 'The form instance has not been obtained, please make sure that the form has been rendered when performing the form operation!' | 21 | + 'The form instance has not been obtained, please make sure that the form has been rendered when performing the form operation!', |
22 | ); | 22 | ); |
23 | } | 23 | } |
24 | await nextTick(); | 24 | await nextTick(); |
@@ -44,7 +44,7 @@ export function useForm(props?: Props): UseFormReturnType { | @@ -44,7 +44,7 @@ export function useForm(props?: Props): UseFormReturnType { | ||
44 | { | 44 | { |
45 | immediate: true, | 45 | immediate: true, |
46 | deep: true, | 46 | deep: true, |
47 | - } | 47 | + }, |
48 | ); | 48 | ); |
49 | } | 49 | } |
50 | 50 | ||
@@ -96,7 +96,7 @@ export function useForm(props?: Props): UseFormReturnType { | @@ -96,7 +96,7 @@ export function useForm(props?: Props): UseFormReturnType { | ||
96 | appendSchemaByField: async ( | 96 | appendSchemaByField: async ( |
97 | schema: FormSchema, | 97 | schema: FormSchema, |
98 | prefixField: string | undefined, | 98 | prefixField: string | undefined, |
99 | - first: boolean | 99 | + first: boolean, |
100 | ) => { | 100 | ) => { |
101 | const form = await getForm(); | 101 | const form = await getForm(); |
102 | form.appendSchemaByField(schema, prefixField, first); | 102 | form.appendSchemaByField(schema, prefixField, first); |
src/components/Form/src/hooks/useFormEvents.ts
@@ -150,12 +150,12 @@ export function useFormEvents({ | @@ -150,12 +150,12 @@ export function useFormEvents({ | ||
150 | } | 150 | } |
151 | 151 | ||
152 | const hasField = updateData.every( | 152 | const hasField = updateData.every( |
153 | - (item) => item.component === 'Divider' || (Reflect.has(item, 'field') && item.field) | 153 | + (item) => item.component === 'Divider' || (Reflect.has(item, 'field') && item.field), |
154 | ); | 154 | ); |
155 | 155 | ||
156 | if (!hasField) { | 156 | if (!hasField) { |
157 | error( | 157 | error( |
158 | - 'All children of the form Schema array that need to be updated must contain the `field` field' | 158 | + 'All children of the form Schema array that need to be updated must contain the `field` field', |
159 | ); | 159 | ); |
160 | return; | 160 | return; |
161 | } | 161 | } |
@@ -172,12 +172,12 @@ export function useFormEvents({ | @@ -172,12 +172,12 @@ export function useFormEvents({ | ||
172 | } | 172 | } |
173 | 173 | ||
174 | const hasField = updateData.every( | 174 | const hasField = updateData.every( |
175 | - (item) => item.component === 'Divider' || (Reflect.has(item, 'field') && item.field) | 175 | + (item) => item.component === 'Divider' || (Reflect.has(item, 'field') && item.field), |
176 | ); | 176 | ); |
177 | 177 | ||
178 | if (!hasField) { | 178 | if (!hasField) { |
179 | error( | 179 | error( |
180 | - 'All children of the form Schema array that need to be updated must contain the `field` field' | 180 | + 'All children of the form Schema array that need to be updated must contain the `field` field', |
181 | ); | 181 | ); |
182 | return; | 182 | return; |
183 | } | 183 | } |
src/components/Form/src/types/form.ts
@@ -37,7 +37,7 @@ export interface FormActionType { | @@ -37,7 +37,7 @@ export interface FormActionType { | ||
37 | appendSchemaByField: ( | 37 | appendSchemaByField: ( |
38 | schema: FormSchema, | 38 | schema: FormSchema, |
39 | prefixField: string | undefined, | 39 | prefixField: string | undefined, |
40 | - first?: boolean | undefined | 40 | + first?: boolean | undefined, |
41 | ) => Promise<void>; | 41 | ) => Promise<void>; |
42 | validateFields: (nameList?: NamePath[]) => Promise<any>; | 42 | validateFields: (nameList?: NamePath[]) => Promise<any>; |
43 | validate: (nameList?: NamePath[]) => Promise<any>; | 43 | validate: (nameList?: NamePath[]) => Promise<any>; |
src/components/Icon/src/IconPicker.vue
@@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
63 | </div> | 63 | </div> |
64 | </div> | 64 | </div> |
65 | <template v-else | 65 | <template v-else |
66 | - ><div class="p-5"> <Empty /></div> | 66 | + ><div class="p-5"><Empty /></div> |
67 | </template> | 67 | </template> |
68 | </template> | 68 | </template> |
69 | 69 | ||
@@ -139,7 +139,7 @@ | @@ -139,7 +139,7 @@ | ||
139 | 139 | ||
140 | const { getPaginationList, getTotal, setCurrentPage } = usePagination( | 140 | const { getPaginationList, getTotal, setCurrentPage } = usePagination( |
141 | currentList, | 141 | currentList, |
142 | - props.pageSize | 142 | + props.pageSize, |
143 | ); | 143 | ); |
144 | 144 | ||
145 | watchEffect(() => { | 145 | watchEffect(() => { |
@@ -151,7 +151,7 @@ | @@ -151,7 +151,7 @@ | ||
151 | (v) => { | 151 | (v) => { |
152 | emit('update:value', v); | 152 | emit('update:value', v); |
153 | return emit('change', v); | 153 | return emit('change', v); |
154 | - } | 154 | + }, |
155 | ); | 155 | ); |
156 | 156 | ||
157 | function handlePageChange(page: number) { | 157 | function handlePageChange(page: number) { |
src/components/Loading/src/useLoading.ts
@@ -16,7 +16,7 @@ export function useLoading(props: Partial<LoadingProps>): [Fn, Fn, (string) => v | @@ -16,7 +16,7 @@ export function useLoading(props: Partial<LoadingProps>): [Fn, Fn, (string) => v | ||
16 | export function useLoading(opt: Partial<UseLoadingOptions>): [Fn, Fn, (string) => void]; | 16 | export function useLoading(opt: Partial<UseLoadingOptions>): [Fn, Fn, (string) => void]; |
17 | 17 | ||
18 | export function useLoading( | 18 | export function useLoading( |
19 | - opt: Partial<LoadingProps> | Partial<UseLoadingOptions> | 19 | + opt: Partial<LoadingProps> | Partial<UseLoadingOptions>, |
20 | ): [Fn, Fn, (string) => void] { | 20 | ): [Fn, Fn, (string) => void] { |
21 | let props: Partial<LoadingProps>; | 21 | let props: Partial<LoadingProps>; |
22 | let target: HTMLElement | Ref<ElRef> = document.body; | 22 | let target: HTMLElement | Ref<ElRef> = document.body; |
src/components/Markdown/src/Markdown.vue
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | { | 52 | { |
53 | immediate: true, | 53 | immediate: true, |
54 | flush: 'post', | 54 | flush: 'post', |
55 | - } | 55 | + }, |
56 | ); | 56 | ); |
57 | 57 | ||
58 | watch( | 58 | watch( |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | instance.getVditor()?.setValue(v); | 62 | instance.getVditor()?.setValue(v); |
63 | } | 63 | } |
64 | valueRef.value = v; | 64 | valueRef.value = v; |
65 | - } | 65 | + }, |
66 | ); | 66 | ); |
67 | 67 | ||
68 | const getCurrentLang = computed((): 'zh_CN' | 'en_US' | 'ja_JP' | 'ko_KR' => { | 68 | const getCurrentLang = computed((): 'zh_CN' | 'en_US' | 'ja_JP' | 'ko_KR' => { |
src/components/Menu/src/BasicMenu.vue
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | menuState, | 64 | menuState, |
65 | items, | 65 | items, |
66 | mode as any, | 66 | mode as any, |
67 | - accordion | 67 | + accordion, |
68 | ); | 68 | ); |
69 | 69 | ||
70 | const getIsTopMenu = computed(() => { | 70 | const getIsTopMenu = computed(() => { |
@@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
114 | () => props.items, | 114 | () => props.items, |
115 | () => { | 115 | () => { |
116 | handleMenuChange(); | 116 | handleMenuChange(); |
117 | - } | 117 | + }, |
118 | ); | 118 | ); |
119 | 119 | ||
120 | async function handleMenuClick({ key }: { key: string; keyPath: string[] }) { | 120 | async function handleMenuClick({ key }: { key: string; keyPath: string[] }) { |
src/components/Menu/src/useOpenKeys.ts
@@ -14,7 +14,7 @@ export function useOpenKeys( | @@ -14,7 +14,7 @@ export function useOpenKeys( | ||
14 | menuState: MenuState, | 14 | menuState: MenuState, |
15 | menus: Ref<MenuType[]>, | 15 | menus: Ref<MenuType[]>, |
16 | mode: Ref<MenuModeEnum>, | 16 | mode: Ref<MenuModeEnum>, |
17 | - accordion: Ref<boolean> | 17 | + accordion: Ref<boolean>, |
18 | ) { | 18 | ) { |
19 | const { getCollapsed, getIsMixSidebar } = useMenuSetting(); | 19 | const { getCollapsed, getIsMixSidebar } = useMenuSetting(); |
20 | 20 | ||
@@ -37,7 +37,7 @@ export function useOpenKeys( | @@ -37,7 +37,7 @@ export function useOpenKeys( | ||
37 | } | 37 | } |
38 | }, | 38 | }, |
39 | 16, | 39 | 16, |
40 | - !native | 40 | + !native, |
41 | ); | 41 | ); |
42 | } | 42 | } |
43 | 43 |
src/components/Modal/src/BasicModal.vue
src/components/Modal/src/components/ModalWrapper.vue
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | { | 62 | { |
63 | attributes: true, | 63 | attributes: true, |
64 | subtree: true, | 64 | subtree: true, |
65 | - } | 65 | + }, |
66 | ); | 66 | ); |
67 | 67 | ||
68 | createModalContext({ | 68 | createModalContext({ |
@@ -89,7 +89,7 @@ | @@ -89,7 +89,7 @@ | ||
89 | } else { | 89 | } else { |
90 | minRealHeightRef.value = realHeightRef.value; | 90 | minRealHeightRef.value = realHeightRef.value; |
91 | } | 91 | } |
92 | - } | 92 | + }, |
93 | ); | 93 | ); |
94 | 94 | ||
95 | onMounted(() => { | 95 | onMounted(() => { |
src/components/Page/src/PageWrapper.vue
@@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
71 | 71 | ||
72 | provide( | 72 | provide( |
73 | PageWrapperFixedHeightKey, | 73 | PageWrapperFixedHeightKey, |
74 | - computed(() => props.fixedHeight) | 74 | + computed(() => props.fixedHeight), |
75 | ); | 75 | ); |
76 | 76 | ||
77 | const getIsContentFullHeight = computed(() => { | 77 | const getIsContentFullHeight = computed(() => { |
@@ -82,7 +82,7 @@ | @@ -82,7 +82,7 @@ | ||
82 | getIsContentFullHeight, | 82 | getIsContentFullHeight, |
83 | wrapperRef, | 83 | wrapperRef, |
84 | [headerRef, footerRef], | 84 | [headerRef, footerRef], |
85 | - [contentRef] | 85 | + [contentRef], |
86 | ); | 86 | ); |
87 | setCompensation({ useLayoutFooter: true, elements: [footerRef] }); | 87 | setCompensation({ useLayoutFooter: true, elements: [footerRef] }); |
88 | 88 | ||
@@ -135,7 +135,7 @@ | @@ -135,7 +135,7 @@ | ||
135 | { | 135 | { |
136 | flush: 'post', | 136 | flush: 'post', |
137 | immediate: true, | 137 | immediate: true, |
138 | - } | 138 | + }, |
139 | ); | 139 | ); |
140 | 140 | ||
141 | return { | 141 | return { |
src/components/Qrcode/src/Qrcode.vue
src/components/Qrcode/src/drawCanvas.ts
@@ -7,9 +7,9 @@ export const renderQrCode = ({ | @@ -7,9 +7,9 @@ export const renderQrCode = ({ | ||
7 | canvas, | 7 | canvas, |
8 | content, | 8 | content, |
9 | width = 0, | 9 | width = 0, |
10 | - options: params = {} | 10 | + options: params = {}, |
11 | }: RenderQrCodeParams) => { | 11 | }: RenderQrCodeParams) => { |
12 | - const options = cloneDeep(params) | 12 | + const options = cloneDeep(params); |
13 | // 容错率,默认对内容少的二维码采用高容错率,内容多的二维码采用低容错率 | 13 | // 容错率,默认对内容少的二维码采用高容错率,内容多的二维码采用低容错率 |
14 | options.errorCorrectionLevel = options.errorCorrectionLevel || getErrorCorrectionLevel(content); | 14 | options.errorCorrectionLevel = options.errorCorrectionLevel || getErrorCorrectionLevel(content); |
15 | 15 |
src/components/Scrollbar/src/bar.ts
@@ -44,7 +44,7 @@ export default defineComponent({ | @@ -44,7 +44,7 @@ export default defineComponent({ | ||
44 | 44 | ||
45 | const clickTrackHandler = (e: any) => { | 45 | const clickTrackHandler = (e: any) => { |
46 | const offset = Math.abs( | 46 | const offset = Math.abs( |
47 | - e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client] | 47 | + e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client], |
48 | ); | 48 | ); |
49 | const thumbHalf = thumb.value[bar.value.offset] / 2; | 49 | const thumbHalf = thumb.value[bar.value.offset] / 2; |
50 | const thumbPositionPercentage = | 50 | const thumbPositionPercentage = |
@@ -104,7 +104,7 @@ export default defineComponent({ | @@ -104,7 +104,7 @@ export default defineComponent({ | ||
104 | move: props.move, | 104 | move: props.move, |
105 | bar: bar.value, | 105 | bar: bar.value, |
106 | }), | 106 | }), |
107 | - }) | 107 | + }), |
108 | ); | 108 | ); |
109 | }, | 109 | }, |
110 | }); | 110 | }); |
src/components/SimpleMenu/src/SimpleMenu.vue
@@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
75 | items, | 75 | items, |
76 | accordion, | 76 | accordion, |
77 | mixSider, | 77 | mixSider, |
78 | - collapse | 78 | + collapse, |
79 | ); | 79 | ); |
80 | 80 | ||
81 | const getBindValues = computed(() => ({ ...attrs, ...props })); | 81 | const getBindValues = computed(() => ({ ...attrs, ...props })); |
@@ -89,7 +89,7 @@ | @@ -89,7 +89,7 @@ | ||
89 | setOpenKeys(currentRoute.value.path); | 89 | setOpenKeys(currentRoute.value.path); |
90 | } | 90 | } |
91 | }, | 91 | }, |
92 | - { immediate: true } | 92 | + { immediate: true }, |
93 | ); | 93 | ); |
94 | 94 | ||
95 | watch( | 95 | watch( |
@@ -100,7 +100,7 @@ | @@ -100,7 +100,7 @@ | ||
100 | } | 100 | } |
101 | setOpenKeys(currentRoute.value.path); | 101 | setOpenKeys(currentRoute.value.path); |
102 | }, | 102 | }, |
103 | - { flush: 'post' } | 103 | + { flush: 'post' }, |
104 | ); | 104 | ); |
105 | 105 | ||
106 | listenerRouteChange((route) => { | 106 | listenerRouteChange((route) => { |
src/components/SimpleMenu/src/components/Menu.vue
src/components/SimpleMenu/src/components/MenuItem.vue
@@ -98,7 +98,7 @@ | @@ -98,7 +98,7 @@ | ||
98 | active.value = false; | 98 | active.value = false; |
99 | } | 99 | } |
100 | }, | 100 | }, |
101 | - { immediate: true } | 101 | + { immediate: true }, |
102 | ); | 102 | ); |
103 | 103 | ||
104 | return { getClass, prefixCls, getItemStyle, getCollapse, handleClickItem, showTooptip }; | 104 | return { getClass, prefixCls, getItemStyle, getCollapse, handleClickItem, showTooptip }; |
src/components/SimpleMenu/src/components/SubMenuItem.vue
@@ -286,7 +286,7 @@ | @@ -286,7 +286,7 @@ | ||
286 | if (props.name && Array.isArray(data)) { | 286 | if (props.name && Array.isArray(data)) { |
287 | state.opened = (data as (string | number)[]).includes(props.name); | 287 | state.opened = (data as (string | number)[]).includes(props.name); |
288 | } | 288 | } |
289 | - } | 289 | + }, |
290 | ); | 290 | ); |
291 | 291 | ||
292 | rootMenuEmitter.on('on-update-active-name:submenu', (data: number[]) => { | 292 | rootMenuEmitter.on('on-update-active-name:submenu', (data: number[]) => { |
src/components/SimpleMenu/src/useOpenKeys.ts
@@ -15,7 +15,7 @@ export function useOpenKeys( | @@ -15,7 +15,7 @@ export function useOpenKeys( | ||
15 | menus: Ref<MenuType[]>, | 15 | menus: Ref<MenuType[]>, |
16 | accordion: Ref<boolean>, | 16 | accordion: Ref<boolean>, |
17 | mixSider: Ref<boolean>, | 17 | mixSider: Ref<boolean>, |
18 | - collapse: Ref<boolean> | 18 | + collapse: Ref<boolean>, |
19 | ) { | 19 | ) { |
20 | const debounceSetOpenKeys = useDebounceFn(setOpenKeys, 50); | 20 | const debounceSetOpenKeys = useDebounceFn(setOpenKeys, 50); |
21 | async function setOpenKeys(path: string) { | 21 | async function setOpenKeys(path: string) { |
@@ -38,7 +38,7 @@ export function useOpenKeys( | @@ -38,7 +38,7 @@ export function useOpenKeys( | ||
38 | menuState.activeSubMenuNames = menuState.openNames; | 38 | menuState.activeSubMenuNames = menuState.openNames; |
39 | }, | 39 | }, |
40 | 30, | 40 | 30, |
41 | - native | 41 | + native, |
42 | ); | 42 | ); |
43 | } | 43 | } |
44 | 44 |
src/components/StrengthMeter/src/StrengthMeter.vue
src/components/Table/src/BasicTable.vue
@@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
111 | unref(isFixedHeightPage) && | 111 | unref(isFixedHeightPage) && |
112 | props.canResize && | 112 | props.canResize && |
113 | warn( | 113 | warn( |
114 | - "'canResize' of BasicTable may not work in PageWrapper with 'fixedHeight' (especially in hot updates)" | 114 | + "'canResize' of BasicTable may not work in PageWrapper with 'fixedHeight' (especially in hot updates)", |
115 | ); | 115 | ); |
116 | }); | 116 | }); |
117 | 117 | ||
@@ -157,7 +157,7 @@ | @@ -157,7 +157,7 @@ | ||
157 | getFieldsValue: formActions.getFieldsValue, | 157 | getFieldsValue: formActions.getFieldsValue, |
158 | clearSelectedRowKeys, | 158 | clearSelectedRowKeys, |
159 | }, | 159 | }, |
160 | - emit | 160 | + emit, |
161 | ); | 161 | ); |
162 | 162 | ||
163 | function handleTableChange(...args) { | 163 | function handleTableChange(...args) { |
@@ -182,7 +182,7 @@ | @@ -182,7 +182,7 @@ | ||
182 | tableElRef, | 182 | tableElRef, |
183 | getColumnsRef, | 183 | getColumnsRef, |
184 | getRowSelectionRef, | 184 | getRowSelectionRef, |
185 | - getDataSourceRef | 185 | + getDataSourceRef, |
186 | ); | 186 | ); |
187 | 187 | ||
188 | const { customRow } = useCustomRow(getProps, { | 188 | const { customRow } = useCustomRow(getProps, { |
@@ -211,7 +211,7 @@ | @@ -211,7 +211,7 @@ | ||
211 | getProps, | 211 | getProps, |
212 | getScrollRef, | 212 | getScrollRef, |
213 | tableElRef, | 213 | tableElRef, |
214 | - getDataSourceRef | 214 | + getDataSourceRef, |
215 | ); | 215 | ); |
216 | 216 | ||
217 | const { getFormProps, replaceFormSlotKey, getFormSlotKeys, handleSearchInfoChange } = | 217 | const { getFormProps, replaceFormSlotKey, getFormSlotKeys, handleSearchInfoChange } = |
src/components/Table/src/components/editable/CellComponent.ts
@@ -21,7 +21,7 @@ export const CellComponent: FunctionalComponent = ( | @@ -21,7 +21,7 @@ export const CellComponent: FunctionalComponent = ( | ||
21 | popoverVisible, | 21 | popoverVisible, |
22 | getPopupContainer, | 22 | getPopupContainer, |
23 | }: ComponentProps, | 23 | }: ComponentProps, |
24 | - { attrs } | 24 | + { attrs }, |
25 | ) => { | 25 | ) => { |
26 | const Comp = componentMap.get(component) as typeof defineComponent; | 26 | const Comp = componentMap.get(component) as typeof defineComponent; |
27 | 27 | ||
@@ -39,6 +39,6 @@ export const CellComponent: FunctionalComponent = ( | @@ -39,6 +39,6 @@ export const CellComponent: FunctionalComponent = ( | ||
39 | { | 39 | { |
40 | default: () => DefaultComp, | 40 | default: () => DefaultComp, |
41 | content: () => ruleMessage, | 41 | content: () => ruleMessage, |
42 | - } | 42 | + }, |
43 | ); | 43 | ); |
44 | }; | 44 | }; |
src/components/Table/src/components/editable/EditableCell.vue
@@ -5,9 +5,9 @@ | @@ -5,9 +5,9 @@ | ||
5 | :class="{ [`${prefixCls}__normal`]: true, 'ellipsis-cell': column.ellipsis }" | 5 | :class="{ [`${prefixCls}__normal`]: true, 'ellipsis-cell': column.ellipsis }" |
6 | @click="handleEdit" | 6 | @click="handleEdit" |
7 | > | 7 | > |
8 | - <div class="cell-content" :title="column.ellipsis ? getValues ?? '' : ''">{{ | ||
9 | - getValues ? getValues : ' ' | ||
10 | - }}</div> | 8 | + <div class="cell-content" :title="column.ellipsis ? getValues ?? '' : ''"> |
9 | + {{ getValues ? getValues : ' ' }} | ||
10 | + </div> | ||
11 | <FormOutlined :class="`${prefixCls}__normal-icon`" v-if="!column.editRow" /> | 11 | <FormOutlined :class="`${prefixCls}__normal-icon`" v-if="!column.editRow" /> |
12 | </div> | 12 | </div> |
13 | 13 |
src/components/Table/src/components/settings/ColumnSetting.vue
@@ -351,7 +351,7 @@ | @@ -351,7 +351,7 @@ | ||
351 | const visible = | 351 | const visible = |
352 | columns.findIndex( | 352 | columns.findIndex( |
353 | (c: BasicColumn | string) => | 353 | (c: BasicColumn | string) => |
354 | - c === col.value || (typeof c !== 'string' && c.dataIndex === col.value) | 354 | + c === col.value || (typeof c !== 'string' && c.dataIndex === col.value), |
355 | ) !== -1; | 355 | ) !== -1; |
356 | return { dataIndex: col.value, fixed: col.fixed, visible }; | 356 | return { dataIndex: col.value, fixed: col.fixed, visible }; |
357 | }); | 357 | }); |
src/components/Table/src/hooks/useColumns.ts
@@ -40,7 +40,7 @@ function handleChildren(children: BasicColumn[] | undefined, ellipsis: boolean) | @@ -40,7 +40,7 @@ function handleChildren(children: BasicColumn[] | undefined, ellipsis: boolean) | ||
40 | function handleIndexColumn( | 40 | function handleIndexColumn( |
41 | propsRef: ComputedRef<BasicTableProps>, | 41 | propsRef: ComputedRef<BasicTableProps>, |
42 | getPaginationRef: ComputedRef<boolean | PaginationProps>, | 42 | getPaginationRef: ComputedRef<boolean | PaginationProps>, |
43 | - columns: BasicColumn[] | 43 | + columns: BasicColumn[], |
44 | ) { | 44 | ) { |
45 | const { t } = useI18n(); | 45 | const { t } = useI18n(); |
46 | 46 | ||
@@ -102,7 +102,7 @@ function handleActionColumn(propsRef: ComputedRef<BasicTableProps>, columns: Bas | @@ -102,7 +102,7 @@ function handleActionColumn(propsRef: ComputedRef<BasicTableProps>, columns: Bas | ||
102 | 102 | ||
103 | export function useColumns( | 103 | export function useColumns( |
104 | propsRef: ComputedRef<BasicTableProps>, | 104 | propsRef: ComputedRef<BasicTableProps>, |
105 | - getPaginationRef: ComputedRef<boolean | PaginationProps> | 105 | + getPaginationRef: ComputedRef<boolean | PaginationProps>, |
106 | ) { | 106 | ) { |
107 | const columnsRef = ref(unref(propsRef).columns) as unknown as Ref<BasicColumn[]>; | 107 | const columnsRef = ref(unref(propsRef).columns) as unknown as Ref<BasicColumn[]>; |
108 | let cacheColumns = unref(propsRef).columns; | 108 | let cacheColumns = unref(propsRef).columns; |
@@ -122,7 +122,7 @@ export function useColumns( | @@ -122,7 +122,7 @@ export function useColumns( | ||
122 | 122 | ||
123 | handleItem( | 123 | handleItem( |
124 | item, | 124 | item, |
125 | - Reflect.has(item, 'ellipsis') ? !!item.ellipsis : !!ellipsis && !customRender && !slots | 125 | + Reflect.has(item, 'ellipsis') ? !!item.ellipsis : !!ellipsis && !customRender && !slots, |
126 | ); | 126 | ); |
127 | }); | 127 | }); |
128 | return columns; | 128 | return columns; |
@@ -179,7 +179,7 @@ export function useColumns( | @@ -179,7 +179,7 @@ export function useColumns( | ||
179 | (columns) => { | 179 | (columns) => { |
180 | columnsRef.value = columns; | 180 | columnsRef.value = columns; |
181 | cacheColumns = columns?.filter((item) => !item.flag) ?? []; | 181 | cacheColumns = columns?.filter((item) => !item.flag) ?? []; |
182 | - } | 182 | + }, |
183 | ); | 183 | ); |
184 | 184 | ||
185 | function setCacheColumnsByField(dataIndex: string | undefined, value: Partial<BasicColumn>) { | 185 | function setCacheColumnsByField(dataIndex: string | undefined, value: Partial<BasicColumn>) { |
@@ -288,7 +288,7 @@ function sortFixedColumn(columns: BasicColumn[]) { | @@ -288,7 +288,7 @@ function sortFixedColumn(columns: BasicColumn[]) { | ||
288 | defColumns.push(column); | 288 | defColumns.push(column); |
289 | } | 289 | } |
290 | return [...fixedLeftColumns, ...defColumns, ...fixedRightColumns].filter( | 290 | return [...fixedLeftColumns, ...defColumns, ...fixedRightColumns].filter( |
291 | - (item) => !item.defaultHidden | 291 | + (item) => !item.defaultHidden, |
292 | ); | 292 | ); |
293 | } | 293 | } |
294 | 294 |
src/components/Table/src/hooks/useCustomRow.ts
@@ -15,7 +15,7 @@ interface Options { | @@ -15,7 +15,7 @@ interface Options { | ||
15 | function getKey( | 15 | function getKey( |
16 | record: Recordable, | 16 | record: Recordable, |
17 | rowKey: string | ((record: Record<string, any>) => string) | undefined, | 17 | rowKey: string | ((record: Record<string, any>) => string) | undefined, |
18 | - autoCreateKey?: boolean | 18 | + autoCreateKey?: boolean, |
19 | ) { | 19 | ) { |
20 | if (!rowKey || autoCreateKey) { | 20 | if (!rowKey || autoCreateKey) { |
21 | return record[ROW_KEY]; | 21 | return record[ROW_KEY]; |
@@ -31,7 +31,7 @@ function getKey( | @@ -31,7 +31,7 @@ function getKey( | ||
31 | 31 | ||
32 | export function useCustomRow( | 32 | export function useCustomRow( |
33 | propsRef: ComputedRef<BasicTableProps>, | 33 | propsRef: ComputedRef<BasicTableProps>, |
34 | - { setSelectedRowKeys, getSelectRowKeys, getAutoCreateKey, clearSelectedRowKeys, emit }: Options | 34 | + { setSelectedRowKeys, getSelectRowKeys, getAutoCreateKey, clearSelectedRowKeys, emit }: Options, |
35 | ) { | 35 | ) { |
36 | const customRow = (record: Recordable, index: number) => { | 36 | const customRow = (record: Recordable, index: number) => { |
37 | return { | 37 | return { |
src/components/Table/src/hooks/useDataSource.ts
@@ -40,7 +40,7 @@ export function useDataSource( | @@ -40,7 +40,7 @@ export function useDataSource( | ||
40 | clearSelectedRowKeys, | 40 | clearSelectedRowKeys, |
41 | tableData, | 41 | tableData, |
42 | }: ActionType, | 42 | }: ActionType, |
43 | - emit: EmitType | 43 | + emit: EmitType, |
44 | ) { | 44 | ) { |
45 | const searchState = reactive<SearchState>({ | 45 | const searchState = reactive<SearchState>({ |
46 | sortInfo: {}, | 46 | sortInfo: {}, |
@@ -61,13 +61,13 @@ export function useDataSource( | @@ -61,13 +61,13 @@ export function useDataSource( | ||
61 | }, | 61 | }, |
62 | { | 62 | { |
63 | immediate: true, | 63 | immediate: true, |
64 | - } | 64 | + }, |
65 | ); | 65 | ); |
66 | 66 | ||
67 | function handleTableChange( | 67 | function handleTableChange( |
68 | pagination: PaginationProps, | 68 | pagination: PaginationProps, |
69 | filters: Partial<Recordable<string[]>>, | 69 | filters: Partial<Recordable<string[]>>, |
70 | - sorter: SorterResult | 70 | + sorter: SorterResult, |
71 | ) { | 71 | ) { |
72 | const { clearSelectOnPageChange, sortFn, filterFn } = unref(propsRef); | 72 | const { clearSelectOnPageChange, sortFn, filterFn } = unref(propsRef); |
73 | if (clearSelectOnPageChange) { | 73 | if (clearSelectOnPageChange) { |
@@ -148,7 +148,7 @@ export function useDataSource( | @@ -148,7 +148,7 @@ export function useDataSource( | ||
148 | 148 | ||
149 | function updateTableDataRecord( | 149 | function updateTableDataRecord( |
150 | rowKey: string | number, | 150 | rowKey: string | number, |
151 | - record: Recordable | 151 | + record: Recordable, |
152 | ): Recordable | undefined { | 152 | ): Recordable | undefined { |
153 | const row = findTableDataRecord(rowKey); | 153 | const row = findTableDataRecord(rowKey); |
154 | 154 | ||
@@ -206,7 +206,7 @@ export function useDataSource( | @@ -206,7 +206,7 @@ export function useDataSource( | ||
206 | const { pageField, sizeField, listField, totalField } = Object.assign( | 206 | const { pageField, sizeField, listField, totalField } = Object.assign( |
207 | {}, | 207 | {}, |
208 | FETCH_SETTING, | 208 | FETCH_SETTING, |
209 | - fetchSetting | 209 | + fetchSetting, |
210 | ); | 210 | ); |
211 | let pageParams: Recordable = {}; | 211 | let pageParams: Recordable = {}; |
212 | 212 |
src/components/Table/src/hooks/useLoading.ts
@@ -8,7 +8,7 @@ export function useLoading(props: ComputedRef<BasicTableProps>) { | @@ -8,7 +8,7 @@ export function useLoading(props: ComputedRef<BasicTableProps>) { | ||
8 | () => unref(props).loading, | 8 | () => unref(props).loading, |
9 | (loading) => { | 9 | (loading) => { |
10 | loadingRef.value = loading; | 10 | loadingRef.value = loading; |
11 | - } | 11 | + }, |
12 | ); | 12 | ); |
13 | 13 | ||
14 | const getLoading = computed(() => unref(loadingRef)); | 14 | const getLoading = computed(() => unref(loadingRef)); |
src/components/Table/src/hooks/useRowSelection.ts
@@ -8,7 +8,7 @@ import { findNodeAll } from '/@/utils/helper/treeHelper'; | @@ -8,7 +8,7 @@ import { findNodeAll } from '/@/utils/helper/treeHelper'; | ||
8 | export function useRowSelection( | 8 | export function useRowSelection( |
9 | propsRef: ComputedRef<BasicTableProps>, | 9 | propsRef: ComputedRef<BasicTableProps>, |
10 | tableData: Ref<Recordable[]>, | 10 | tableData: Ref<Recordable[]>, |
11 | - emit: EmitType | 11 | + emit: EmitType, |
12 | ) { | 12 | ) { |
13 | const selectedRowKeysRef = ref<string[]>([]); | 13 | const selectedRowKeysRef = ref<string[]>([]); |
14 | const selectedRowRef = ref<Recordable[]>([]); | 14 | const selectedRowRef = ref<Recordable[]>([]); |
@@ -35,7 +35,7 @@ export function useRowSelection( | @@ -35,7 +35,7 @@ export function useRowSelection( | ||
35 | () => unref(propsRef).rowSelection?.selectedRowKeys, | 35 | () => unref(propsRef).rowSelection?.selectedRowKeys, |
36 | (v: string[]) => { | 36 | (v: string[]) => { |
37 | setSelectedRowKeys(v); | 37 | setSelectedRowKeys(v); |
38 | - } | 38 | + }, |
39 | ); | 39 | ); |
40 | 40 | ||
41 | watch( | 41 | watch( |
@@ -53,7 +53,7 @@ export function useRowSelection( | @@ -53,7 +53,7 @@ export function useRowSelection( | ||
53 | }); | 53 | }); |
54 | }); | 54 | }); |
55 | }, | 55 | }, |
56 | - { deep: true } | 56 | + { deep: true }, |
57 | ); | 57 | ); |
58 | 58 | ||
59 | const getAutoCreateKey = computed(() => { | 59 | const getAutoCreateKey = computed(() => { |
@@ -72,7 +72,7 @@ export function useRowSelection( | @@ -72,7 +72,7 @@ export function useRowSelection( | ||
72 | (item) => rowKeys.includes(item[unref(getRowKey) as string]), | 72 | (item) => rowKeys.includes(item[unref(getRowKey) as string]), |
73 | { | 73 | { |
74 | children: propsRef.value.childrenColumnName ?? 'children', | 74 | children: propsRef.value.childrenColumnName ?? 'children', |
75 | - } | 75 | + }, |
76 | ); | 76 | ); |
77 | const trueSelectedRows: any[] = []; | 77 | const trueSelectedRows: any[] = []; |
78 | rowKeys.forEach((key: string) => { | 78 | rowKeys.forEach((key: string) => { |
src/components/Table/src/hooks/useTable.ts
@@ -18,7 +18,7 @@ export function useTable(tableProps?: Props): [ | @@ -18,7 +18,7 @@ export function useTable(tableProps?: Props): [ | ||
18 | (instance: TableActionType, formInstance: UseTableMethod) => void, | 18 | (instance: TableActionType, formInstance: UseTableMethod) => void, |
19 | TableActionType & { | 19 | TableActionType & { |
20 | getForm: () => FormActionType; | 20 | getForm: () => FormActionType; |
21 | - } | 21 | + }, |
22 | ] { | 22 | ] { |
23 | const tableRef = ref<Nullable<TableActionType>>(null); | 23 | const tableRef = ref<Nullable<TableActionType>>(null); |
24 | const loadedRef = ref<Nullable<boolean>>(false); | 24 | const loadedRef = ref<Nullable<boolean>>(false); |
@@ -50,7 +50,7 @@ export function useTable(tableProps?: Props): [ | @@ -50,7 +50,7 @@ export function useTable(tableProps?: Props): [ | ||
50 | { | 50 | { |
51 | immediate: true, | 51 | immediate: true, |
52 | deep: true, | 52 | deep: true, |
53 | - } | 53 | + }, |
54 | ); | 54 | ); |
55 | } | 55 | } |
56 | 56 | ||
@@ -58,7 +58,7 @@ export function useTable(tableProps?: Props): [ | @@ -58,7 +58,7 @@ export function useTable(tableProps?: Props): [ | ||
58 | const table = unref(tableRef); | 58 | const table = unref(tableRef); |
59 | if (!table) { | 59 | if (!table) { |
60 | error( | 60 | error( |
61 | - 'The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!' | 61 | + 'The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!', |
62 | ); | 62 | ); |
63 | } | 63 | } |
64 | return table as TableActionType; | 64 | return table as TableActionType; |
src/components/Table/src/hooks/useTableExpand.ts
@@ -6,7 +6,7 @@ import { ROW_KEY } from '../const'; | @@ -6,7 +6,7 @@ import { ROW_KEY } from '../const'; | ||
6 | export function useTableExpand( | 6 | export function useTableExpand( |
7 | propsRef: ComputedRef<BasicTableProps>, | 7 | propsRef: ComputedRef<BasicTableProps>, |
8 | tableData: Ref<Recordable[]>, | 8 | tableData: Ref<Recordable[]>, |
9 | - emit: EmitType | 9 | + emit: EmitType, |
10 | ) { | 10 | ) { |
11 | const expandedRowKeys = ref<string[]>([]); | 11 | const expandedRowKeys = ref<string[]>([]); |
12 | 12 |
src/components/Table/src/hooks/useTableFooter.ts
@@ -12,7 +12,7 @@ export function useTableFooter( | @@ -12,7 +12,7 @@ export function useTableFooter( | ||
12 | scrollToFirstRowOnChange: boolean; | 12 | scrollToFirstRowOnChange: boolean; |
13 | }>, | 13 | }>, |
14 | tableElRef: Ref<ComponentRef>, | 14 | tableElRef: Ref<ComponentRef>, |
15 | - getDataSourceRef: ComputedRef<Recordable> | 15 | + getDataSourceRef: ComputedRef<Recordable>, |
16 | ) { | 16 | ) { |
17 | const getIsEmptyData = computed(() => { | 17 | const getIsEmptyData = computed(() => { |
18 | return (unref(getDataSourceRef) || []).length === 0; | 18 | return (unref(getDataSourceRef) || []).length === 0; |
@@ -43,7 +43,7 @@ export function useTableFooter( | @@ -43,7 +43,7 @@ export function useTableFooter( | ||
43 | name: 'scroll', | 43 | name: 'scroll', |
44 | listener: () => { | 44 | listener: () => { |
45 | const footerBodyDom = tableEl.$el.querySelector( | 45 | const footerBodyDom = tableEl.$el.querySelector( |
46 | - '.ant-table-footer .ant-table-body' | 46 | + '.ant-table-footer .ant-table-body', |
47 | ) as HTMLDivElement; | 47 | ) as HTMLDivElement; |
48 | if (!footerBodyDom || !bodyDom) return; | 48 | if (!footerBodyDom || !bodyDom) return; |
49 | footerBodyDom.scrollLeft = bodyDom.scrollLeft; | 49 | footerBodyDom.scrollLeft = bodyDom.scrollLeft; |
src/components/Table/src/hooks/useTableForm.ts
@@ -8,7 +8,7 @@ export function useTableForm( | @@ -8,7 +8,7 @@ export function useTableForm( | ||
8 | propsRef: ComputedRef<BasicTableProps>, | 8 | propsRef: ComputedRef<BasicTableProps>, |
9 | slots: Slots, | 9 | slots: Slots, |
10 | fetch: (opt?: FetchParams | undefined) => Promise<void>, | 10 | fetch: (opt?: FetchParams | undefined) => Promise<void>, |
11 | - getLoading: ComputedRef<boolean | undefined> | 11 | + getLoading: ComputedRef<boolean | undefined>, |
12 | ) { | 12 | ) { |
13 | const getFormProps = computed((): Partial<FormProps> => { | 13 | const getFormProps = computed((): Partial<FormProps> => { |
14 | const { formConfig } = unref(propsRef); | 14 | const { formConfig } = unref(propsRef); |
src/components/Table/src/hooks/useTableHeader.ts
@@ -8,7 +8,7 @@ import { getSlot } from '/@/utils/helper/tsxHelper'; | @@ -8,7 +8,7 @@ import { getSlot } from '/@/utils/helper/tsxHelper'; | ||
8 | export function useTableHeader( | 8 | export function useTableHeader( |
9 | propsRef: ComputedRef<BasicTableProps>, | 9 | propsRef: ComputedRef<BasicTableProps>, |
10 | slots: Slots, | 10 | slots: Slots, |
11 | - handlers: InnerHandlers | 11 | + handlers: InnerHandlers, |
12 | ) { | 12 | ) { |
13 | const getHeaderProps = computed((): Recordable => { | 13 | const getHeaderProps = computed((): Recordable => { |
14 | const { title, showTableSetting, titleHelpMessage, tableSetting } = unref(propsRef); | 14 | const { title, showTableSetting, titleHelpMessage, tableSetting } = unref(propsRef); |
@@ -46,7 +46,7 @@ export function useTableHeader( | @@ -46,7 +46,7 @@ export function useTableHeader( | ||
46 | headerTop: () => getSlot(slots, 'headerTop'), | 46 | headerTop: () => getSlot(slots, 'headerTop'), |
47 | } | 47 | } |
48 | : {}), | 48 | : {}), |
49 | - } | 49 | + }, |
50 | ), | 50 | ), |
51 | }; | 51 | }; |
52 | }); | 52 | }); |
src/components/Table/src/hooks/useTableScroll.ts
@@ -13,7 +13,7 @@ export function useTableScroll( | @@ -13,7 +13,7 @@ export function useTableScroll( | ||
13 | tableElRef: Ref<ComponentRef>, | 13 | tableElRef: Ref<ComponentRef>, |
14 | columnsRef: ComputedRef<BasicColumn[]>, | 14 | columnsRef: ComputedRef<BasicColumn[]>, |
15 | rowSelectionRef: ComputedRef<TableRowSelection<any> | null>, | 15 | rowSelectionRef: ComputedRef<TableRowSelection<any> | null>, |
16 | - getDataSourceRef: ComputedRef<Recordable[]> | 16 | + getDataSourceRef: ComputedRef<Recordable[]>, |
17 | ) { | 17 | ) { |
18 | const tableHeightRef: Ref<Nullable<number>> = ref(null); | 18 | const tableHeightRef: Ref<Nullable<number>> = ref(null); |
19 | 19 | ||
@@ -34,7 +34,7 @@ export function useTableScroll( | @@ -34,7 +34,7 @@ export function useTableScroll( | ||
34 | }, | 34 | }, |
35 | { | 35 | { |
36 | flush: 'post', | 36 | flush: 'post', |
37 | - } | 37 | + }, |
38 | ); | 38 | ); |
39 | 39 | ||
40 | function redoHeight() { | 40 | function redoHeight() { |
src/components/Time/src/Time.vue
src/components/Tinymce/src/Editor.vue
@@ -190,7 +190,7 @@ | @@ -190,7 +190,7 @@ | ||
190 | return; | 190 | return; |
191 | } | 191 | } |
192 | editor.setMode(attrs.disabled ? 'readonly' : 'design'); | 192 | editor.setMode(attrs.disabled ? 'readonly' : 'design'); |
193 | - } | 193 | + }, |
194 | ); | 194 | ); |
195 | 195 | ||
196 | onMountedOrActivated(() => { | 196 | onMountedOrActivated(() => { |
@@ -264,7 +264,7 @@ | @@ -264,7 +264,7 @@ | ||
264 | () => props.modelValue, | 264 | () => props.modelValue, |
265 | (val: string, prevVal: string) => { | 265 | (val: string, prevVal: string) => { |
266 | setValue(editor, val, prevVal); | 266 | setValue(editor, val, prevVal); |
267 | - } | 267 | + }, |
268 | ); | 268 | ); |
269 | 269 | ||
270 | watch( | 270 | watch( |
@@ -274,7 +274,7 @@ | @@ -274,7 +274,7 @@ | ||
274 | }, | 274 | }, |
275 | { | 275 | { |
276 | immediate: true, | 276 | immediate: true, |
277 | - } | 277 | + }, |
278 | ); | 278 | ); |
279 | 279 | ||
280 | editor.on(normalizedEvents ? normalizedEvents : 'change keyup undo redo', () => { | 280 | editor.on(normalizedEvents ? normalizedEvents : 'change keyup undo redo', () => { |
src/components/Transition/index.ts
@@ -18,10 +18,10 @@ export const ScaleRotateTransition = createSimpleTransition('scale-rotate-transi | @@ -18,10 +18,10 @@ export const ScaleRotateTransition = createSimpleTransition('scale-rotate-transi | ||
18 | 18 | ||
19 | export const ExpandXTransition = createJavascriptTransition( | 19 | export const ExpandXTransition = createJavascriptTransition( |
20 | 'expand-x-transition', | 20 | 'expand-x-transition', |
21 | - ExpandTransitionGenerator('', true) | 21 | + ExpandTransitionGenerator('', true), |
22 | ); | 22 | ); |
23 | 23 | ||
24 | export const ExpandTransition = createJavascriptTransition( | 24 | export const ExpandTransition = createJavascriptTransition( |
25 | 'expand-transition', | 25 | 'expand-transition', |
26 | - ExpandTransitionGenerator('') | 26 | + ExpandTransitionGenerator(''), |
27 | ); | 27 | ); |
src/components/Transition/src/CreateTransition.tsx
@@ -41,7 +41,7 @@ export function createSimpleTransition(name: string, origin = 'top center 0', mo | @@ -41,7 +41,7 @@ export function createSimpleTransition(name: string, origin = 'top center 0', mo | ||
41 | export function createJavascriptTransition( | 41 | export function createJavascriptTransition( |
42 | name: string, | 42 | name: string, |
43 | functions: Recordable, | 43 | functions: Recordable, |
44 | - mode: Mode = 'in-out' | 44 | + mode: Mode = 'in-out', |
45 | ) { | 45 | ) { |
46 | return defineComponent({ | 46 | return defineComponent({ |
47 | name, | 47 | name, |
src/components/Tree/src/Tree.vue
@@ -119,7 +119,7 @@ | @@ -119,7 +119,7 @@ | ||
119 | }); | 119 | }); |
120 | 120 | ||
121 | const getTreeData = computed((): TreeItem[] => | 121 | const getTreeData = computed((): TreeItem[] => |
122 | - searchState.startSearch ? searchState.searchData : unref(treeDataRef) | 122 | + searchState.startSearch ? searchState.searchData : unref(treeDataRef), |
123 | ); | 123 | ); |
124 | 124 | ||
125 | const getNotFound = computed((): boolean => { | 125 | const getNotFound = computed((): boolean => { |
@@ -219,7 +219,7 @@ | @@ -219,7 +219,7 @@ | ||
219 | (node) => { | 219 | (node) => { |
220 | return node[titleField]?.includes(searchValue) ?? false; | 220 | return node[titleField]?.includes(searchValue) ?? false; |
221 | }, | 221 | }, |
222 | - unref(getReplaceFields) | 222 | + unref(getReplaceFields), |
223 | ); | 223 | ); |
224 | } | 224 | } |
225 | 225 | ||
@@ -266,7 +266,7 @@ | @@ -266,7 +266,7 @@ | ||
266 | () => props.value, | 266 | () => props.value, |
267 | () => { | 267 | () => { |
268 | state.checkedKeys = toRaw(props.value || []); | 268 | state.checkedKeys = toRaw(props.value || []); |
269 | - } | 269 | + }, |
270 | ); | 270 | ); |
271 | 271 | ||
272 | watch( | 272 | watch( |
@@ -275,7 +275,7 @@ | @@ -275,7 +275,7 @@ | ||
275 | const v = toRaw(state.checkedKeys); | 275 | const v = toRaw(state.checkedKeys); |
276 | emit('update:value', v); | 276 | emit('update:value', v); |
277 | emit('change', v); | 277 | emit('change', v); |
278 | - } | 278 | + }, |
279 | ); | 279 | ); |
280 | 280 | ||
281 | // watchEffect(() => { | 281 | // watchEffect(() => { |
src/components/Tree/src/TreeHeader.vue
@@ -143,7 +143,7 @@ | @@ -143,7 +143,7 @@ | ||
143 | () => searchValue.value, | 143 | () => searchValue.value, |
144 | (v) => { | 144 | (v) => { |
145 | debounceEmitChange(v); | 145 | debounceEmitChange(v); |
146 | - } | 146 | + }, |
147 | ); | 147 | ); |
148 | watch( | 148 | watch( |
149 | () => props.searchText, | 149 | () => props.searchText, |
@@ -151,7 +151,7 @@ | @@ -151,7 +151,7 @@ | ||
151 | if (v !== searchValue.value) { | 151 | if (v !== searchValue.value) { |
152 | searchValue.value = v; | 152 | searchValue.value = v; |
153 | } | 153 | } |
154 | - } | 154 | + }, |
155 | ); | 155 | ); |
156 | // function handleSearch(e: ChangeEvent): void { | 156 | // function handleSearch(e: ChangeEvent): void { |
157 | // debounceEmitChange(e.target.value); | 157 | // debounceEmitChange(e.target.value); |
src/components/Tree/src/useTree.ts
@@ -8,7 +8,7 @@ import { forEach } from '/@/utils/helper/treeHelper'; | @@ -8,7 +8,7 @@ import { forEach } from '/@/utils/helper/treeHelper'; | ||
8 | 8 | ||
9 | export function useTree( | 9 | export function useTree( |
10 | treeDataRef: Ref<TreeDataItem[]>, | 10 | treeDataRef: Ref<TreeDataItem[]>, |
11 | - getReplaceFields: ComputedRef<ReplaceFields> | 11 | + getReplaceFields: ComputedRef<ReplaceFields>, |
12 | ) { | 12 | ) { |
13 | function getAllKeys(list?: TreeDataItem[]) { | 13 | function getAllKeys(list?: TreeDataItem[]) { |
14 | const keys: string[] = []; | 14 | const keys: string[] = []; |
src/components/Upload/src/BasicUpload.vue
src/components/Upload/src/FileList.vue
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | nextTick(() => { | 15 | nextTick(() => { |
16 | modalFn?.redoModalHeight?.(); | 16 | modalFn?.redoModalHeight?.(); |
17 | }); | 17 | }); |
18 | - } | 18 | + }, |
19 | ); | 19 | ); |
20 | return () => { | 20 | return () => { |
21 | const { columns, actionColumn, dataSource } = props; | 21 | const { columns, actionColumn, dataSource } = props; |
src/components/Upload/src/UploadModal.vue
@@ -102,7 +102,7 @@ | @@ -102,7 +102,7 @@ | ||
102 | 102 | ||
103 | const getOkButtonProps = computed(() => { | 103 | const getOkButtonProps = computed(() => { |
104 | const someSuccess = fileListRef.value.some( | 104 | const someSuccess = fileListRef.value.some( |
105 | - (item) => item.status === UploadResultStatus.SUCCESS | 105 | + (item) => item.status === UploadResultStatus.SUCCESS, |
106 | ); | 106 | ); |
107 | return { | 107 | return { |
108 | disabled: isUploadingRef.value || fileListRef.value.length === 0 || !someSuccess, | 108 | disabled: isUploadingRef.value || fileListRef.value.length === 0 || !someSuccess, |
@@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
111 | 111 | ||
112 | const getUploadBtnText = computed(() => { | 112 | const getUploadBtnText = computed(() => { |
113 | const someError = fileListRef.value.some( | 113 | const someError = fileListRef.value.some( |
114 | - (item) => item.status === UploadResultStatus.ERROR | 114 | + (item) => item.status === UploadResultStatus.ERROR, |
115 | ); | 115 | ); |
116 | return isUploadingRef.value | 116 | return isUploadingRef.value |
117 | ? t('component.upload.uploading') | 117 | ? t('component.upload.uploading') |
@@ -193,7 +193,7 @@ | @@ -193,7 +193,7 @@ | ||
193 | function onUploadProgress(progressEvent: ProgressEvent) { | 193 | function onUploadProgress(progressEvent: ProgressEvent) { |
194 | const complete = ((progressEvent.loaded / progressEvent.total) * 100) | 0; | 194 | const complete = ((progressEvent.loaded / progressEvent.total) * 100) | 0; |
195 | item.percent = complete; | 195 | item.percent = complete; |
196 | - } | 196 | + }, |
197 | ); | 197 | ); |
198 | item.status = UploadResultStatus.SUCCESS; | 198 | item.status = UploadResultStatus.SUCCESS; |
199 | item.responseData = data; | 199 | item.responseData = data; |
@@ -225,7 +225,7 @@ | @@ -225,7 +225,7 @@ | ||
225 | const data = await Promise.all( | 225 | const data = await Promise.all( |
226 | uploadFileList.map((item) => { | 226 | uploadFileList.map((item) => { |
227 | return uploadApiByItem(item); | 227 | return uploadApiByItem(item); |
228 | - }) | 228 | + }), |
229 | ); | 229 | ); |
230 | isUploadingRef.value = false; | 230 | isUploadingRef.value = false; |
231 | // 生产环境:抛出错误 | 231 | // 生产环境:抛出错误 |
src/components/Upload/src/UploadPreviewModal.vue
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | }; | 45 | }; |
46 | }); | 46 | }); |
47 | }, | 47 | }, |
48 | - { immediate: true } | 48 | + { immediate: true }, |
49 | ); | 49 | ); |
50 | 50 | ||
51 | // 删除 | 51 | // 删除 |
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | emit('delete', removed[0].url); | 56 | emit('delete', removed[0].url); |
57 | emit( | 57 | emit( |
58 | 'list-change', | 58 | 'list-change', |
59 | - fileListRef.value.map((item) => item.url) | 59 | + fileListRef.value.map((item) => item.url), |
60 | ); | 60 | ); |
61 | } | 61 | } |
62 | } | 62 | } |
src/components/Verify/src/DragVerify.vue
src/components/Verify/src/ImgRotate.vue
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | emit('change', isPassing); | 37 | emit('change', isPassing); |
38 | emit('update:value', isPassing); | 38 | emit('update:value', isPassing); |
39 | } | 39 | } |
40 | - } | 40 | + }, |
41 | ); | 41 | ); |
42 | 42 | ||
43 | const getImgWrapStyleRef = computed(() => { | 43 | const getImgWrapStyleRef = computed(() => { |
@@ -65,7 +65,7 @@ | @@ -65,7 +65,7 @@ | ||
65 | const { imgWidth, height, maxDegree } = props; | 65 | const { imgWidth, height, maxDegree } = props; |
66 | const { moveX } = data; | 66 | const { moveX } = data; |
67 | const currentRotate = Math.ceil( | 67 | const currentRotate = Math.ceil( |
68 | - (moveX / (imgWidth! - parseInt(height as string))) * maxDegree! * unref(getFactorRef) | 68 | + (moveX / (imgWidth! - parseInt(height as string))) * maxDegree! * unref(getFactorRef), |
69 | ); | 69 | ); |
70 | state.currentRotate = currentRotate; | 70 | state.currentRotate = currentRotate; |
71 | state.imgStyle = hackCss('transform', `rotateZ(${state.randomRotate - currentRotate}deg)`); | 71 | state.imgStyle = hackCss('transform', `rotateZ(${state.randomRotate - currentRotate}deg)`); |
src/directives/loading.ts
@@ -15,7 +15,7 @@ const loadingDirective: Directive = { | @@ -15,7 +15,7 @@ const loadingDirective: Directive = { | ||
15 | loading: !!binding.value, | 15 | loading: !!binding.value, |
16 | absolute: !fullscreen, | 16 | absolute: !fullscreen, |
17 | }, | 17 | }, |
18 | - fullscreen ? document.body : el | 18 | + fullscreen ? document.body : el, |
19 | ); | 19 | ); |
20 | el.instance = instance; | 20 | el.instance = instance; |
21 | }, | 21 | }, |
src/hooks/component/useFormItem.ts
@@ -16,7 +16,7 @@ export function useRuleFormItem<T extends Recordable>( | @@ -16,7 +16,7 @@ export function useRuleFormItem<T extends Recordable>( | ||
16 | props: T, | 16 | props: T, |
17 | key: keyof T = 'value', | 17 | key: keyof T = 'value', |
18 | changeEvent = 'change', | 18 | changeEvent = 'change', |
19 | - emitData?: Ref<any[]> | 19 | + emitData?: Ref<any[]>, |
20 | ) { | 20 | ) { |
21 | const instance = getCurrentInstance(); | 21 | const instance = getCurrentInstance(); |
22 | const emit = instance?.emit; | 22 | const emit = instance?.emit; |
src/hooks/core/useContext.ts
@@ -21,7 +21,7 @@ type ShallowUnwrap<T> = { | @@ -21,7 +21,7 @@ type ShallowUnwrap<T> = { | ||
21 | export function createContext<T>( | 21 | export function createContext<T>( |
22 | context: any, | 22 | context: any, |
23 | key: InjectionKey<T> = Symbol(), | 23 | key: InjectionKey<T> = Symbol(), |
24 | - options: CreateContextOptions = {} | 24 | + options: CreateContextOptions = {}, |
25 | ) { | 25 | ) { |
26 | const { readonly = true, createProvider = false, native = false } = options; | 26 | const { readonly = true, createProvider = false, native = false } = options; |
27 | 27 | ||
@@ -39,7 +39,7 @@ export function useContext<T>(key: InjectionKey<T>, defaultValue?: any, native?: | @@ -39,7 +39,7 @@ export function useContext<T>(key: InjectionKey<T>, defaultValue?: any, native?: | ||
39 | 39 | ||
40 | export function useContext<T>( | 40 | export function useContext<T>( |
41 | key: InjectionKey<T> = Symbol(), | 41 | key: InjectionKey<T> = Symbol(), |
42 | - defaultValue?: any | 42 | + defaultValue?: any, |
43 | ): ShallowUnwrap<T> { | 43 | ): ShallowUnwrap<T> { |
44 | return inject(key, defaultValue || {}); | 44 | return inject(key, defaultValue || {}); |
45 | } | 45 | } |
src/hooks/core/useLockFn.ts
1 | import { ref, unref } from 'vue'; | 1 | import { ref, unref } from 'vue'; |
2 | 2 | ||
3 | export function useLockFn<P extends any[] = any[], V extends any = any>( | 3 | export function useLockFn<P extends any[] = any[], V extends any = any>( |
4 | - fn: (...args: P) => Promise<V> | 4 | + fn: (...args: P) => Promise<V>, |
5 | ) { | 5 | ) { |
6 | const lockRef = ref(false); | 6 | const lockRef = ref(false); |
7 | return async function (...args: P) { | 7 | return async function (...args: P) { |
src/hooks/core/useTimeout.ts
@@ -16,7 +16,7 @@ export function useTimeoutFn(handle: Fn<any>, wait: number, native = false) { | @@ -16,7 +16,7 @@ export function useTimeoutFn(handle: Fn<any>, wait: number, native = false) { | ||
16 | (maturity) => { | 16 | (maturity) => { |
17 | maturity && handle(); | 17 | maturity && handle(); |
18 | }, | 18 | }, |
19 | - { immediate: false } | 19 | + { immediate: false }, |
20 | ); | 20 | ); |
21 | } | 21 | } |
22 | return { readyRef, stop, start }; | 22 | return { readyRef, stop, start }; |
src/hooks/event/useEventListener.ts
src/hooks/event/useScroll.ts
@@ -10,7 +10,7 @@ export function useScroll( | @@ -10,7 +10,7 @@ export function useScroll( | ||
10 | wait?: number; | 10 | wait?: number; |
11 | leading?: boolean; | 11 | leading?: boolean; |
12 | trailing?: boolean; | 12 | trailing?: boolean; |
13 | - } | 13 | + }, |
14 | ) { | 14 | ) { |
15 | const refX = ref(0); | 15 | const refX = ref(0); |
16 | const refY = ref(0); | 16 | const refY = ref(0); |
@@ -49,7 +49,7 @@ export function useScroll( | @@ -49,7 +49,7 @@ export function useScroll( | ||
49 | el && el.removeEventListener('scroll', handler); | 49 | el && el.removeEventListener('scroll', handler); |
50 | }); | 50 | }); |
51 | }, | 51 | }, |
52 | - { immediate: true } | 52 | + { immediate: true }, |
53 | ); | 53 | ); |
54 | }); | 54 | }); |
55 | 55 |
src/hooks/setting/index.ts
@@ -14,7 +14,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => { | @@ -14,7 +14,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => { | ||
14 | 14 | ||
15 | if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) { | 15 | if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) { |
16 | warn( | 16 | warn( |
17 | - `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` | 17 | + `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`, |
18 | ); | 18 | ); |
19 | } | 19 | } |
20 | 20 |
src/hooks/setting/useMenuSetting.ts
@@ -54,7 +54,7 @@ export function useMenuSetting() { | @@ -54,7 +54,7 @@ export function useMenuSetting() { | ||
54 | const getTopMenuAlign = computed(() => appStore.getMenuSetting.topMenuAlign); | 54 | const getTopMenuAlign = computed(() => appStore.getMenuSetting.topMenuAlign); |
55 | 55 | ||
56 | const getCloseMixSidebarOnChange = computed( | 56 | const getCloseMixSidebarOnChange = computed( |
57 | - () => appStore.getMenuSetting.closeMixSidebarOnChange | 57 | + () => appStore.getMenuSetting.closeMixSidebarOnChange, |
58 | ); | 58 | ); |
59 | 59 | ||
60 | const getIsSidebarType = computed(() => unref(getMenuType) === MenuTypeEnum.SIDEBAR); | 60 | const getIsSidebarType = computed(() => unref(getMenuType) === MenuTypeEnum.SIDEBAR); |
src/hooks/setting/useRootSetting.ts
@@ -56,7 +56,7 @@ export function useRootSetting() { | @@ -56,7 +56,7 @@ export function useRootSetting() { | ||
56 | const getLayoutContentMode = computed(() => | 56 | const getLayoutContentMode = computed(() => |
57 | appStore.getProjectConfig.contentMode === ContentEnum.FULL | 57 | appStore.getProjectConfig.contentMode === ContentEnum.FULL |
58 | ? ContentEnum.FULL | 58 | ? ContentEnum.FULL |
59 | - : ContentEnum.FIXED | 59 | + : ContentEnum.FIXED, |
60 | ); | 60 | ); |
61 | 61 | ||
62 | function setRootSetting(setting: Partial<RootSetting>) { | 62 | function setRootSetting(setting: Partial<RootSetting>) { |
src/hooks/web/useContentHeight.ts
@@ -27,7 +27,7 @@ export function useContentHeight( | @@ -27,7 +27,7 @@ export function useContentHeight( | ||
27 | anchorRef: Ref, | 27 | anchorRef: Ref, |
28 | subtractHeightRefs: Ref[], | 28 | subtractHeightRefs: Ref[], |
29 | substractSpaceRefs: Ref[], | 29 | substractSpaceRefs: Ref[], |
30 | - offsetHeightRef: Ref<number> = ref(0) | 30 | + offsetHeightRef: Ref<number> = ref(0), |
31 | ) { | 31 | ) { |
32 | const contentHeight: Ref<Nullable<number>> = ref(null); | 32 | const contentHeight: Ref<Nullable<number>> = ref(null); |
33 | const { footerHeightRef: layoutFooterHeightRef } = useLayoutHeight(); | 33 | const { footerHeightRef: layoutFooterHeightRef } = useLayoutHeight(); |
@@ -130,7 +130,7 @@ export function useContentHeight( | @@ -130,7 +130,7 @@ export function useContentHeight( | ||
130 | calcContentHeight(); | 130 | calcContentHeight(); |
131 | }, | 131 | }, |
132 | 50, | 132 | 50, |
133 | - { immediate: true } | 133 | + { immediate: true }, |
134 | ); | 134 | ); |
135 | watch( | 135 | watch( |
136 | () => [layoutFooterHeightRef.value], | 136 | () => [layoutFooterHeightRef.value], |
@@ -140,7 +140,7 @@ export function useContentHeight( | @@ -140,7 +140,7 @@ export function useContentHeight( | ||
140 | { | 140 | { |
141 | flush: 'post', | 141 | flush: 'post', |
142 | immediate: true, | 142 | immediate: true, |
143 | - } | 143 | + }, |
144 | ); | 144 | ); |
145 | 145 | ||
146 | return { redoHeight, setCompensation, contentHeight }; | 146 | return { redoHeight, setCompensation, contentHeight }; |
src/hooks/web/useCopyToClipboard.ts
@@ -17,7 +17,7 @@ export function useCopyToClipboard(initial?: string) { | @@ -17,7 +17,7 @@ export function useCopyToClipboard(initial?: string) { | ||
17 | isSuccessRef.value = copyTextToClipboard(str); | 17 | isSuccessRef.value = copyTextToClipboard(str); |
18 | } | 18 | } |
19 | }, | 19 | }, |
20 | - { immediate: !!initial, flush: 'sync' } | 20 | + { immediate: !!initial, flush: 'sync' }, |
21 | ); | 21 | ); |
22 | 22 | ||
23 | return { clipboardRef, isSuccessRef, copiedRef }; | 23 | return { clipboardRef, isSuccessRef, copiedRef }; |
src/hooks/web/useECharts.ts
@@ -11,7 +11,7 @@ import { useRootSetting } from '/@/hooks/setting/useRootSetting'; | @@ -11,7 +11,7 @@ import { useRootSetting } from '/@/hooks/setting/useRootSetting'; | ||
11 | 11 | ||
12 | export function useECharts( | 12 | export function useECharts( |
13 | elRef: Ref<HTMLDivElement>, | 13 | elRef: Ref<HTMLDivElement>, |
14 | - theme: 'light' | 'dark' | 'default' = 'default' | 14 | + theme: 'light' | 'dark' | 'default' = 'default', |
15 | ) { | 15 | ) { |
16 | const { getDarkMode: getSysDarkMode } = useRootSetting(); | 16 | const { getDarkMode: getSysDarkMode } = useRootSetting(); |
17 | 17 | ||
@@ -90,7 +90,7 @@ export function useECharts( | @@ -90,7 +90,7 @@ export function useECharts( | ||
90 | initCharts(theme as 'default'); | 90 | initCharts(theme as 'default'); |
91 | setOptions(cacheOptions.value); | 91 | setOptions(cacheOptions.value); |
92 | } | 92 | } |
93 | - } | 93 | + }, |
94 | ); | 94 | ); |
95 | 95 | ||
96 | tryOnUnmounted(() => { | 96 | tryOnUnmounted(() => { |
src/hooks/web/usePermission.ts
@@ -88,7 +88,7 @@ export function usePermission() { | @@ -88,7 +88,7 @@ export function usePermission() { | ||
88 | async function changeRole(roles: RoleEnum | RoleEnum[]): Promise<void> { | 88 | async function changeRole(roles: RoleEnum | RoleEnum[]): Promise<void> { |
89 | if (projectSetting.permissionMode !== PermissionModeEnum.ROUTE_MAPPING) { | 89 | if (projectSetting.permissionMode !== PermissionModeEnum.ROUTE_MAPPING) { |
90 | throw new Error( | 90 | throw new Error( |
91 | - 'Please switch PermissionModeEnum to ROUTE_MAPPING mode in the configuration to operate!' | 91 | + 'Please switch PermissionModeEnum to ROUTE_MAPPING mode in the configuration to operate!', |
92 | ); | 92 | ); |
93 | } | 93 | } |
94 | 94 |
src/hooks/web/useTitle.ts
@@ -6,6 +6,9 @@ import { useRouter } from 'vue-router'; | @@ -6,6 +6,9 @@ import { useRouter } from 'vue-router'; | ||
6 | 6 | ||
7 | import { REDIRECT_NAME } from '/@/router/constant'; | 7 | import { REDIRECT_NAME } from '/@/router/constant'; |
8 | 8 | ||
9 | +/** | ||
10 | + * Listening to page changes and dynamically changing site titles | ||
11 | + */ | ||
9 | export function useTitle() { | 12 | export function useTitle() { |
10 | const { title } = useGlobSetting(); | 13 | const { title } = useGlobSetting(); |
11 | const { t } = useI18n(); | 14 | const { t } = useI18n(); |
@@ -17,6 +20,7 @@ export function useTitle() { | @@ -17,6 +20,7 @@ export function useTitle() { | ||
17 | () => currentRoute.value.path, | 20 | () => currentRoute.value.path, |
18 | () => { | 21 | () => { |
19 | const route = unref(currentRoute); | 22 | const route = unref(currentRoute); |
23 | + | ||
20 | if (route.name === REDIRECT_NAME) { | 24 | if (route.name === REDIRECT_NAME) { |
21 | return; | 25 | return; |
22 | } | 26 | } |
@@ -24,6 +28,6 @@ export function useTitle() { | @@ -24,6 +28,6 @@ export function useTitle() { | ||
24 | const tTitle = t(route?.meta?.title as string); | 28 | const tTitle = t(route?.meta?.title as string); |
25 | pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`; | 29 | pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`; |
26 | }, | 30 | }, |
27 | - { immediate: true } | 31 | + { immediate: true }, |
28 | ); | 32 | ); |
29 | } | 33 | } |
src/hooks/web/useWatermark.ts
@@ -6,7 +6,7 @@ import { isDef } from '/@/utils/is'; | @@ -6,7 +6,7 @@ import { isDef } from '/@/utils/is'; | ||
6 | const domSymbol = Symbol('watermark-dom'); | 6 | const domSymbol = Symbol('watermark-dom'); |
7 | 7 | ||
8 | export function useWatermark( | 8 | export function useWatermark( |
9 | - appendEl: Ref<HTMLElement | null> = ref(document.body) as Ref<HTMLElement> | 9 | + appendEl: Ref<HTMLElement | null> = ref(document.body) as Ref<HTMLElement>, |
10 | ) { | 10 | ) { |
11 | const func = useRafThrottle(function () { | 11 | const func = useRafThrottle(function () { |
12 | const el = unref(appendEl); | 12 | const el = unref(appendEl); |
@@ -49,7 +49,7 @@ export function useWatermark( | @@ -49,7 +49,7 @@ export function useWatermark( | ||
49 | width?: number; | 49 | width?: number; |
50 | height?: number; | 50 | height?: number; |
51 | str?: string; | 51 | str?: string; |
52 | - } = {} | 52 | + } = {}, |
53 | ) { | 53 | ) { |
54 | const el = unref(watermarkEl); | 54 | const el = unref(watermarkEl); |
55 | if (!el) return; | 55 | if (!el) return; |
src/layouts/default/content/useContentViewHeight.ts
@@ -27,7 +27,7 @@ export function useContentViewHeight() { | @@ -27,7 +27,7 @@ export function useContentViewHeight() { | ||
27 | contentHeight.value = window.innerHeight; | 27 | contentHeight.value = window.innerHeight; |
28 | }, | 28 | }, |
29 | 100, | 29 | 100, |
30 | - { immediate: true } | 30 | + { immediate: true }, |
31 | ); | 31 | ); |
32 | 32 | ||
33 | async function setPageHeight(height: number) { | 33 | async function setPageHeight(height: number) { |
src/layouts/default/header/components/notify/NoticeList.vue
@@ -107,7 +107,7 @@ | @@ -107,7 +107,7 @@ | ||
107 | () => props.currentPage, | 107 | () => props.currentPage, |
108 | (v) => { | 108 | (v) => { |
109 | current.value = v; | 109 | current.value = v; |
110 | - } | 110 | + }, |
111 | ); | 111 | ); |
112 | const isTitleClickable = computed(() => !!props.onTitleClick); | 112 | const isTitleClickable = computed(() => !!props.onTitleClick); |
113 | const getPagination = computed(() => { | 113 | const getPagination = computed(() => { |
src/layouts/default/menu/index.vue
@@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
60 | const { getIsMobile } = useAppInject(); | 60 | const { getIsMobile } = useAppInject(); |
61 | 61 | ||
62 | const getComputedMenuMode = computed(() => | 62 | const getComputedMenuMode = computed(() => |
63 | - unref(getIsMobile) ? MenuModeEnum.INLINE : props.menuMode || unref(getMenuMode) | 63 | + unref(getIsMobile) ? MenuModeEnum.INLINE : props.menuMode || unref(getMenuMode), |
64 | ); | 64 | ); |
65 | 65 | ||
66 | const getComputedMenuTheme = computed(() => props.theme || unref(getMenuTheme)); | 66 | const getComputedMenuTheme = computed(() => props.theme || unref(getMenuTheme)); |
src/layouts/default/menu/useLayoutMenu.ts
@@ -20,11 +20,11 @@ export function useSplitMenu(splitType: Ref<MenuSplitTyeEnum>) { | @@ -20,11 +20,11 @@ export function useSplitMenu(splitType: Ref<MenuSplitTyeEnum>) { | ||
20 | const throttleHandleSplitLeftMenu = useThrottleFn(handleSplitLeftMenu, 50); | 20 | const throttleHandleSplitLeftMenu = useThrottleFn(handleSplitLeftMenu, 50); |
21 | 21 | ||
22 | const splitNotLeft = computed( | 22 | const splitNotLeft = computed( |
23 | - () => unref(splitType) !== MenuSplitTyeEnum.LEFT && !unref(getIsHorizontal) | 23 | + () => unref(splitType) !== MenuSplitTyeEnum.LEFT && !unref(getIsHorizontal), |
24 | ); | 24 | ); |
25 | 25 | ||
26 | const getSplitLeft = computed( | 26 | const getSplitLeft = computed( |
27 | - () => !unref(getSplit) || unref(splitType) !== MenuSplitTyeEnum.LEFT | 27 | + () => !unref(getSplit) || unref(splitType) !== MenuSplitTyeEnum.LEFT, |
28 | ); | 28 | ); |
29 | 29 | ||
30 | const getSpiltTop = computed(() => unref(splitType) === MenuSplitTyeEnum.TOP); | 30 | const getSpiltTop = computed(() => unref(splitType) === MenuSplitTyeEnum.TOP); |
@@ -48,7 +48,7 @@ export function useSplitMenu(splitType: Ref<MenuSplitTyeEnum>) { | @@ -48,7 +48,7 @@ export function useSplitMenu(splitType: Ref<MenuSplitTyeEnum>) { | ||
48 | }, | 48 | }, |
49 | { | 49 | { |
50 | immediate: true, | 50 | immediate: true, |
51 | - } | 51 | + }, |
52 | ); | 52 | ); |
53 | 53 | ||
54 | // Menu changes | 54 | // Menu changes |
@@ -59,7 +59,7 @@ export function useSplitMenu(splitType: Ref<MenuSplitTyeEnum>) { | @@ -59,7 +59,7 @@ export function useSplitMenu(splitType: Ref<MenuSplitTyeEnum>) { | ||
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | immediate: true, | 61 | immediate: true, |
62 | - } | 62 | + }, |
63 | ); | 63 | ); |
64 | 64 | ||
65 | // split Menu changes | 65 | // split Menu changes |
@@ -68,7 +68,7 @@ export function useSplitMenu(splitType: Ref<MenuSplitTyeEnum>) { | @@ -68,7 +68,7 @@ export function useSplitMenu(splitType: Ref<MenuSplitTyeEnum>) { | ||
68 | () => { | 68 | () => { |
69 | if (unref(splitNotLeft)) return; | 69 | if (unref(splitNotLeft)) return; |
70 | genMenus(); | 70 | genMenus(); |
71 | - } | 71 | + }, |
72 | ); | 72 | ); |
73 | 73 | ||
74 | // Handle left menu split | 74 | // Handle left menu split |
src/layouts/default/setting/components/SettingFooter.vue
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | 49 | ||
50 | function handleCopy() { | 50 | function handleCopy() { |
51 | const { isSuccessRef } = useCopyToClipboard( | 51 | const { isSuccessRef } = useCopyToClipboard( |
52 | - JSON.stringify(unref(appStore.getProjectConfig), null, 2) | 52 | + JSON.stringify(unref(appStore.getProjectConfig), null, 2), |
53 | ); | 53 | ); |
54 | unref(isSuccessRef) && | 54 | unref(isSuccessRef) && |
55 | createSuccessModal({ | 55 | createSuccessModal({ |
src/layouts/default/tabs/components/FoldButton.vue
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | const getIsUnFold = computed(() => !unref(getShowMenu) && !unref(getShowHeader)); | 23 | const getIsUnFold = computed(() => !unref(getShowMenu) && !unref(getShowHeader)); |
24 | 24 | ||
25 | const getIcon = computed(() => | 25 | const getIcon = computed(() => |
26 | - unref(getIsUnFold) ? 'codicon:screen-normal' : 'codicon:screen-full' | 26 | + unref(getIsUnFold) ? 'codicon:screen-normal' : 'codicon:screen-full', |
27 | ); | 27 | ); |
28 | 28 | ||
29 | function handleFold() { | 29 | function handleFold() { |
src/layouts/default/tabs/components/TabContent.vue
@@ -44,12 +44,12 @@ | @@ -44,12 +44,12 @@ | ||
44 | const getIsTabs = computed(() => !props.isExtra); | 44 | const getIsTabs = computed(() => !props.isExtra); |
45 | 45 | ||
46 | const getTrigger = computed((): ('contextmenu' | 'click' | 'hover')[] => | 46 | const getTrigger = computed((): ('contextmenu' | 'click' | 'hover')[] => |
47 | - unref(getIsTabs) ? ['contextmenu'] : ['click'] | 47 | + unref(getIsTabs) ? ['contextmenu'] : ['click'], |
48 | ); | 48 | ); |
49 | 49 | ||
50 | const { getDropMenuList, handleMenuEvent, handleContextMenu } = useTabDropdown( | 50 | const { getDropMenuList, handleMenuEvent, handleContextMenu } = useTabDropdown( |
51 | props as TabContentProps, | 51 | props as TabContentProps, |
52 | - getIsTabs | 52 | + getIsTabs, |
53 | ); | 53 | ); |
54 | 54 | ||
55 | function handleContext(e) { | 55 | function handleContext(e) { |
src/logics/error-handle/index.ts
@@ -85,7 +85,7 @@ export function scriptErrorHandler( | @@ -85,7 +85,7 @@ export function scriptErrorHandler( | ||
85 | source?: string, | 85 | source?: string, |
86 | lineno?: number, | 86 | lineno?: number, |
87 | colno?: number, | 87 | colno?: number, |
88 | - error?: Error | 88 | + error?: Error, |
89 | ) { | 89 | ) { |
90 | if (event === 'Script error.' && !source) { | 90 | if (event === 'Script error.' && !source) { |
91 | return false; | 91 | return false; |
@@ -129,7 +129,7 @@ function registerPromiseErrorHandler() { | @@ -129,7 +129,7 @@ function registerPromiseErrorHandler() { | ||
129 | message: event.reason, | 129 | message: event.reason, |
130 | }); | 130 | }); |
131 | }, | 131 | }, |
132 | - true | 132 | + true, |
133 | ); | 133 | ); |
134 | } | 134 | } |
135 | 135 | ||
@@ -157,7 +157,7 @@ function registerResourceErrorHandler() { | @@ -157,7 +157,7 @@ function registerResourceErrorHandler() { | ||
157 | message: (e.target || ({} as any)).localName + ' is load error', | 157 | message: (e.target || ({} as any)).localName + ' is load error', |
158 | }); | 158 | }); |
159 | }, | 159 | }, |
160 | - true | 160 | + true, |
161 | ); | 161 | ); |
162 | } | 162 | } |
163 | 163 |