Commit 56a966cfbf8db5b29a42185f0f25a0e800c30dbb

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