build(projects): update tsconfig、eslintrc

This commit is contained in:
Soybean
2022-03-12 16:21:40 +08:00
parent 4093dcd6dc
commit 75de2b0604
131 changed files with 1174 additions and 1140 deletions

View File

@ -47,6 +47,6 @@ export default function useCountDown(second: number) {
isCounting,
start,
stop,
isComplete
isComplete,
};
}

View File

@ -26,7 +26,7 @@ export default function useImageVerify(width = 152, height = 40) {
domRef,
imgCode,
setImgCode,
getImgCode
getImgCode,
};
}

View File

@ -54,6 +54,6 @@ export default function useSmsCode() {
start,
isCounting,
getSmsCode,
loading
loading,
};
}

View File

@ -10,7 +10,7 @@ interface ScrollBodyStyle {
export default function useBodyScroll(duration = 300) {
const defaultStyle: ScrollBodyStyle = {
overflow: '',
paddingRight: ''
paddingRight: '',
};
function getInitBodyStyle() {
const { overflow, paddingRight } = document.body.style;
@ -42,6 +42,6 @@ export default function useBodyScroll(duration = 300) {
getInitBodyStyle();
return {
scrollBodyHandler
scrollBodyHandler,
};
}

View File

@ -1,6 +1,6 @@
import { ref } from 'vue';
export default function useBoolean(initValue: boolean = false) {
export default function useBoolean(initValue = false) {
const bool = ref(initValue);
function setBool(value: boolean) {
@ -21,6 +21,6 @@ export default function useBoolean(initValue: boolean = false) {
setBool,
setTrue,
setFalse,
toggle
toggle,
};
}

View File

@ -2,7 +2,7 @@ import { provide, inject } from 'vue';
import type { InjectionKey } from 'vue';
/** 创建共享上下文状态 */
export default function useContext<T>(contextName: string = 'context') {
export default function useContext<T>(contextName = 'context') {
const injectKey: InjectionKey<T> = Symbol(contextName);
function useProvide(context: T) {
@ -10,11 +10,11 @@ export default function useContext<T>(contextName: string = 'context') {
}
function useInject() {
return inject(injectKey)!;
return inject(injectKey) as T;
}
return {
useProvide,
useInject
useInject,
};
}

View File

@ -1,11 +1,11 @@
import useBoolean from './useBoolean';
export default function useLoading(initValue: boolean = false) {
export default function useLoading(initValue = false) {
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue);
return {
loading,
startLoading,
endLoading
endLoading,
};
}

View File

@ -9,6 +9,6 @@ export default function useLoadingEmpty(initLoading = false, initEmpty = false)
startLoading,
endLoading,
empty,
setEmpty
setEmpty,
};
}

View File

@ -11,7 +11,7 @@ export default function useModalVisible(hideScroll = true) {
const { scrollBodyHandler } = useBodyScroll();
function modalVisibleWatcher() {
const stopHandle = watch(visible, async newValue => {
const stopHandle = watch(visible, async (newValue) => {
scrollBodyHandler(newValue);
});
@ -28,6 +28,6 @@ export default function useModalVisible(hideScroll = true) {
visible,
openModal,
closeModal,
toggleModal
toggleModal,
};
}

View File

@ -24,6 +24,6 @@ export default function useReload() {
return {
reloadFlag,
handleReload
handleReload,
};
}