Browse Source

fix: fix types

main
xingyu 2 years ago
parent
commit
9acc73a591
  1. 8
      src/components/Container/src/collapse/CollapseContainer.vue
  2. 1
      src/components/CronTab/src/validator.ts
  3. 4
      src/components/Form/src/components/FormItem.vue
  4. 2
      src/components/Form/src/hooks/useForm.ts
  5. 1
      src/components/Form/src/hooks/useFormEvents.ts
  6. 2
      src/components/Form/src/types/form.ts
  7. 6
      src/components/FormDesign/src/components/VFormDesign/components/RuleProps.vue
  8. 3
      src/components/FormDesign/src/components/VFormDesign/index.vue
  9. 1
      src/components/FormDesign/src/hooks/useVFormMethods.ts
  10. 2
      src/components/FormDesign/src/utils/index.ts
  11. 5
      src/components/Preview/src/Functional.vue
  12. 20
      src/components/Table/src/components/HeaderCell.vue
  13. 2
      src/components/Table/src/components/TableImg.vue
  14. 3
      src/components/Table/src/components/editable/CellComponent.ts
  15. 1
      src/components/Table/src/hooks/useTable.ts
  16. 2
      src/components/Table/src/types/table.ts
  17. 1
      src/components/Tinymce/src/tinymce.ts
  18. 2
      src/components/Transition/src/ExpandTransition.ts
  19. 20
      src/components/Tree/src/BasicTree.vue
  20. 3
      src/components/Upload/src/helper.ts
  21. 4
      src/components/Verifition/src/Verify.vue
  22. 2
      src/components/Verifition/src/Verify/VerifyPoints.vue
  23. 2
      src/components/Verifition/src/Verify/VerifySlide.vue
  24. 2
      src/components/Verifition/src/utils/ase.ts
  25. 2
      src/hooks/web/useContentHeight.ts
  26. 1
      src/hooks/web/useDesign.ts
  27. 1
      src/hooks/web/usePage.ts
  28. 1
      src/hooks/web/usePermission.ts
  29. 1
      src/hooks/web/useTabs.ts
  30. 22
      src/layouts/default/menu/index.vue
  31. 1
      src/layouts/default/setting/handler.ts
  32. 2
      src/layouts/default/tabs/useMultipleTabs.ts
  33. 1
      src/router/guard/index.ts
  34. 1
      src/router/helper/routeHelper.ts
  35. 2
      src/router/types.ts
  36. 3
      src/store/modules/multipleTab.ts
  37. 3
      src/store/modules/permission.ts
  38. 1
      src/utils/auth/index.ts
  39. 4
      src/utils/cache/storageCache.ts
  40. 2
      src/utils/color.ts
  41. 8
      src/utils/domUtils.ts
  42. 1
      src/utils/file/base64Conver.ts
  43. 1
      src/utils/http/axios/index.ts
  44. 4
      src/utils/index.ts
  45. 1
      src/utils/is.ts
  46. 1
      src/views/base/profile/data.ts
  47. 2
      src/views/bpm/oa/leave/detail.vue
  48. 2
      src/views/bpm/processInstance/create/index.vue
  49. 4
      src/views/infra/codegen/components/PreviewModal.vue
  50. 2
      src/views/pay/cashier/index.vue
  51. 2
      src/views/system/tenantPackage/TenantPackageModal.vue
  52. 1
      src/views/system/user/user.data.ts

8
src/components/Container/src/collapse/CollapseContainer.vue

@ -72,12 +72,12 @@ export default defineComponent({
<CollapseTransition enable={props.canExpan}>
{props.loading
? (
<Skeleton active={props.loading} />
<Skeleton active={props.loading} />
)
: (
<div class={`${prefixCls}__body`} v-show={show.value}>
{slots.default?.()}
</div>
<div class={`${prefixCls}__body`} v-show={show.value}>
{slots.default?.()}
</div>
)}
</CollapseTransition>
</div>

1
src/components/CronTab/src/validator.ts

@ -1,3 +1,4 @@
/* eslint-disable prefer-promise-reject-errors */
import CronParser from 'cron-parser'
import type { ValidatorRule } from 'ant-design-vue/lib/form/interface'

4
src/components/Form/src/components/FormItem.vue

@ -286,7 +286,9 @@ export default defineComponent({
const renderLabel = subLabel
? (
<span>
{label} <span class="text-secondary">{subLabel}</span>
{label}
{' '}
<span class="text-secondary">{subLabel}</span>
</span>
)
: (

2
src/components/Form/src/hooks/useForm.ts

@ -101,7 +101,7 @@ export function useForm(props?: Props): UseFormReturnType {
return form.submit()
},
validate: async <T = Recordable>(nameList?: NamePath[] | false): Promise<T> => {
validate: async <T = any>(nameList?: NamePath[] | false): Promise<T> => {
const form = await getForm()
return form.validate(nameList)
},

1
src/components/Form/src/hooks/useFormEvents.ts

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/require-await */
import type { ComputedRef, Ref } from 'vue'
import type { NamePath } from 'ant-design-vue/lib/form/interface'
import { nextTick, toRaw, unref } from 'vue'

2
src/components/Form/src/types/form.ts

@ -35,7 +35,7 @@ export interface FormActionType {
removeSchemaByField: (field: string | string[]) => Promise<void>
appendSchemaByField: (schema: FormSchema | FormSchema[], prefixField: string | undefined, first?: boolean | undefined) => Promise<void>
validateFields: (nameList?: NamePath[]) => Promise<any>
validate: <T = Recordable>(nameList?: NamePath[] | false) => Promise<T>
validate: <T = any>(nameList?: NamePath[] | false) => Promise<T>
scrollToField: (name: NamePath, options?: ScrollOptions) => Promise<void>
}

6
src/components/FormDesign/src/components/VFormDesign/components/RuleProps.vue

@ -95,7 +95,7 @@ const patternDataSource = ref([
},
{
value:
// eslint-disable-next-line max-len
'/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z](?:((\\d{5}[A-HJK])|([A-HJK][A-HJ-NP-Z0-9][0-9]{4}))|[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳])$/',
text: '车牌号(新能源)',
},
@ -109,7 +109,7 @@ const patternDataSource = ref([
},
{
value:
// eslint-disable-next-line max-len
'/^(([^<>()[\\]\\\\.,;:\\s@"]+(\\.[^<>()[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/',
text: 'email(邮箱)',
},
@ -127,7 +127,7 @@ const patternDataSource = ref([
},
{
value:
// eslint-disable-next-line max-len
'/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/',
text: '中文汉字',
},

3
src/components/FormDesign/src/components/VFormDesign/index.vue

@ -151,8 +151,7 @@ function copyFormItem(formItem: IVFormComponent) {
* @param item {IVFormComponent} 当前点击的组件
* @param isCopy {boolean} 是否复制
*/
function handleCopy(item: IVFormComponent = formConfig.value.currentItem as IVFormComponent,
isCopy = true) {
function handleCopy(item: IVFormComponent = formConfig.value.currentItem as IVFormComponent, isCopy = true) {
const key = formConfig.value.currentItem?.key
/**
* 遍历当表单项配置如果是复制则复制一份表单项如果不是复制则直接添加到表单项中

1
src/components/FormDesign/src/hooks/useVFormMethods.ts

@ -132,7 +132,6 @@ export function useVFormMethods<E extends EmitsOptions = EmitsOptions>(
* formData中的值
* @return {Promise<IAnyObject<any>>}
*/
// eslint-disable-next-line @typescript-eslint/require-await
const getData: IGetData = async () => {
return cloneDeep(props.formModel)
}

2
src/components/FormDesign/src/utils/index.ts

@ -199,7 +199,7 @@ export function strToReg(rules: IValidationRule[]) {
*/
export function runCode<T>(code: any): T {
try {
// eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func
// eslint-disable-next-line no-new-func
return new Function(`return ${code}`)()
}
catch {

5
src/components/Preview/src/Functional.vue

@ -337,7 +337,10 @@ export default defineComponent({
const { imageList } = props
return (
<div class={`${prefixCls}__index`}>
{currentIndex + 1} / {imageList.length}
{currentIndex + 1}
{' '}
/
{imageList.length}
</div>
)
}

20
src/components/Table/src/components/HeaderCell.vue

@ -33,18 +33,18 @@ export default defineComponent({
return () => {
return (
<div>
{getIsEdit.value
? (
<div>
{getIsEdit.value
? (
<EditTableHeaderCell>{getTitle.value}</EditTableHeaderCell>
)
: (
)
: (
<span class="default-header-cell">{getTitle.value}</span>
)}
{getHelpMessage.value && (
<BasicHelp text={getHelpMessage.value} class={`${prefixCls}__help`} />
)}
</div>
)}
{getHelpMessage.value && (
<BasicHelp text={getHelpMessage.value} class={`${prefixCls}__help`} />
)}
</div>
)
}
},

2
src/components/Table/src/components/TableImg.vue

@ -20,7 +20,7 @@ const props = defineProps({
srcPrefix: propTypes.string.def(''),
// fallback,
fallback: propTypes.string.def(
// eslint-disable-next-line max-len
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnY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QcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==',
),
})

3
src/components/Table/src/components/editable/CellComponent.ts

@ -12,8 +12,7 @@ export interface ComponentProps {
getPopupContainer?: Fn
}
export function CellComponent({ component = 'Input', rule = true, ruleMessage, popoverOpen, getPopupContainer }: ComponentProps,
{ attrs }) {
export function CellComponent({ component = 'Input', rule = true, ruleMessage, popoverOpen, getPopupContainer }: ComponentProps, { attrs }) {
const Comp = componentMap.get(component) as typeof defineComponent
const DefaultComp = h(Comp, attrs)

1
src/components/Table/src/hooks/useTable.ts

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/await-thenable */
import type { WatchStopHandle } from 'vue'
import { onUnmounted, ref, toRaw, unref, watch } from 'vue'
import type { BasicColumn, BasicTableProps, FetchParams, TableActionType } from '../types/table'

2
src/components/Table/src/types/table.ts

@ -403,8 +403,6 @@ export interface BasicTableProps<T = any> {
export type CellFormat = string | ((text: string, record: Recordable, index: number) => string | number) | Map<string | number, any>
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
export interface BasicColumn extends ColumnProps<Recordable> {
children?: BasicColumn[]
filters?: {

1
src/components/Tinymce/src/tinymce.ts

@ -1,4 +1,3 @@
/* eslint-disable max-len */
// Any plugins you want to setting has to be imported
// Detail plugins list see https://www.tinymce.com/docs/plugins/
// Custom builds see https://www.tinymce.com/download/custom-builds/

2
src/components/Transition/src/ExpandTransition.ts

@ -38,6 +38,7 @@ export default function (expandedParentClass = '', x = false) {
// el.style[sizeProperty] = '0';
// eslint-disable-next-line no-void
void el.offsetHeight // force reflow
el.style.transition = initialStyle.transition
@ -63,6 +64,7 @@ export default function (expandedParentClass = '', x = false) {
el.style.overflow = 'hidden'
el.style[sizeProperty] = `${el[offsetProperty]}px`
// eslint-disable-next-line no-void
void el.offsetHeight // force reflow
requestAnimationFrame(() => (el.style[sizeProperty] = '0'))

20
src/components/Tree/src/BasicTree.vue

@ -358,11 +358,11 @@ export default defineComponent({
const titleDom = isHighlight
? (
<span class={unref(getBindValues)?.blockNode ? `${bem('content')}` : ''}>
<span>{title.slice(0, searchIdx)}</span>
<span style={highlightStyle}>{searchText}</span>
<span>{title.slice(searchIdx + (searchText as string).length)}</span>
</span>
<span class={unref(getBindValues)?.blockNode ? `${bem('content')}` : ''}>
<span>{title.slice(0, searchIdx)}</span>
<span style={highlightStyle}>{searchText}</span>
<span>{title.slice(searchIdx + (searchText as string).length)}</span>
</span>
)
: (
title
@ -374,11 +374,11 @@ export default defineComponent({
getSlot(slots, 'title', item)
)
: (
<>
{icon && <TreeIcon icon={icon} />}
{titleDom}
<span class={bem('actions')}>{renderAction(item)}</span>
</>
<>
{icon && <TreeIcon icon={icon} />}
{titleDom}
<span class={bem('actions')}>{renderAction(item)}</span>
</>
)}
</span>
)

3
src/components/Upload/src/helper.ts

@ -23,5 +23,6 @@ export function getBase64WithFile(file: File) {
reader.readAsDataURL(file)
reader.onload = () => resolve({ result: reader.result as string, file })
reader.onerror = error => reject(error)
})
},
)
}

4
src/components/Verifition/src/Verify.vue

@ -2,7 +2,7 @@
/**
* Verify 验证码组件
* @description 分发验证码使用
* */
*/
import { computed, ref, toRefs, watchEffect } from 'vue'
import VerifySlide from './Verify/VerifySlide.vue'
import VerifyPoints from './Verify/VerifyPoints.vue'
@ -70,7 +70,7 @@ export default {
/**
* refresh
* @description 刷新
* */
*/
const refresh = () => {
if (instance.value.refresh)
instance.value.refresh()

2
src/components/Verifition/src/Verify/VerifyPoints.vue

@ -2,7 +2,7 @@
/**
* VerifyPoints
* @description 点选
* */
*/
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue'
import { resetSize } from './../utils/util'
import { aesEncrypt } from './../utils/ase'

2
src/components/Verifition/src/Verify/VerifySlide.vue

@ -2,7 +2,7 @@
/**
* VerifySlide
* @description 滑块
* */
*/
import { computed, getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs, watch } from 'vue'
import { aesEncrypt } from './../utils/ase'
import { resetSize } from './../utils/util'

2
src/components/Verifition/src/utils/ase.ts

@ -3,7 +3,7 @@ import CryptoJS from 'crypto-js'
/**
* @word
* @keyWord String
* */
*/
export function aesEncrypt(word, keyWord = 'XwKsGlMcdPMEhR1B') {
const key = CryptoJS.enc.Utf8.parse(keyWord)
const srcs = CryptoJS.enc.Utf8.parse(word)

2
src/hooks/web/useContentHeight.ts

@ -23,8 +23,8 @@ type Upward = number | string | null | undefined
* @param anchorRef Ref<ElRef | ComponentRef>
* @param subtractHeightRefs Ref<ElRef | ComponentRef>
* @param substractSpaceRefs (margins/paddings) Ref<ElRef | ComponentRef>
* @param offsetHeightRef
* @param upwardSpace class为止 2|ant-layout表示向上递归直到碰见.ant-layout为止
* @param offsetHeightRef
* @returns
*/
export function useContentHeight(

1
src/hooks/web/useDesign.ts

@ -16,7 +16,6 @@ export function useDesign(scope: string) {
// }
return {
// prefixCls: computed(() => `${values.prefixCls}-${scope}`),
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
prefixCls: `${values.prefixCls}-${scope}`,
prefixVar: values.prefixCls,
// style,

1
src/hooks/web/usePage.ts

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/unbound-method */
import type { RouteLocationRaw, Router } from 'vue-router'
import { unref } from 'vue'

1
src/hooks/web/usePermission.ts

@ -40,7 +40,6 @@ export function usePermission() {
/**
* Reset and regain authority resource information
*
* @param id
*/
async function resume() {
const tabStore = useMultipleTabStore()

1
src/hooks/web/useTabs.ts

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/await-thenable */
import type { RouteLocationNormalized, Router } from 'vue-router'
import { useRouter } from 'vue-router'

22
src/layouts/default/menu/index.vue

@ -103,7 +103,7 @@ export default defineComponent({
})
/**
* click menu
* @param menu
* @param path
*/
function handleMenuClick(path: string) {
@ -112,7 +112,7 @@ export default defineComponent({
/**
* before click menu
* @param menu
* @param path
*/
async function beforeMenuClickFn(path: string) {
if (!isUrl(path))
@ -135,17 +135,17 @@ export default defineComponent({
return null
return !props.isHorizontal
? (
<SimpleMenu {...menuProps} isSplitMenu={unref(getSplit)} items={menus} />
<SimpleMenu {...menuProps} isSplitMenu={unref(getSplit)} items={menus} />
)
: (
<BasicMenu
{...(menuProps as any)}
isHorizontal={props.isHorizontal}
type={unref(getMenuType)}
showLogo={unref(getIsShowLogo)}
mode={unref(getComputedMenuMode as any)}
items={menus}
/>
<BasicMenu
{...(menuProps as any)}
isHorizontal={props.isHorizontal}
type={unref(getMenuType)}
showLogo={unref(getIsShowLogo)}
mode={unref(getComputedMenuMode as any)}
items={menus}
/>
)
}

1
src/layouts/default/setting/handler.ts

@ -1,3 +1,4 @@
/* eslint-disable no-case-declarations */
import { HandlerEnum } from './enum'
import { updateHeaderBgColor, updateSidebarBgColor } from '@/logics/theme/updateBackground'
import { updateColorWeak } from '@/logics/theme/updateColorWeak'

2
src/layouts/default/tabs/useMultipleTabs.ts

@ -62,7 +62,7 @@ export function useTabsDrag(affixTextList: string[]) {
const el = document.querySelectorAll(`.${prefixCls} .ant-tabs-nav-wrap > div`)?.[0] as HTMLElement
const { initSortable } = useSortable(el, {
filter: (_evt, target: HTMLElement) => {
const text = target.innerText
const text = target.textContent
if (!text)
return false
return affixTextList.map(res => t(res)).includes(text)

1
src/router/guard/index.ts

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/require-await */
import type { RouteLocationNormalized, Router } from 'vue-router'
import { Modal, notification } from 'ant-design-vue'
import { unref } from 'vue'

1
src/router/helper/routeHelper.ts

@ -64,7 +64,6 @@ function dynamicImport(dynamicViewsModules: Record<string, () => Promise<Recorda
}
else if (matchKeys?.length > 1) {
warn(
// eslint-disable-next-line max-len
'Please do not create `.vue` and `.TSX` files with the same file name in the same hierarchical directory under the views folder. This will cause dynamic introduction failure',
)
}

2
src/router/types.ts

@ -4,8 +4,6 @@ import type { RoleEnum } from '@/enums/roleEnum'
export type Component<T = any> = ReturnType<typeof defineComponent> | (() => Promise<typeof import('*.vue')>) | (() => Promise<T>)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
keepAlive?: boolean
visible?: boolean

3
src/store/modules/multipleTab.ts

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/unbound-method */
import type { RouteLocationNormalized, RouteLocationRaw, Router } from 'vue-router'
import { toRaw, unref } from 'vue'
@ -337,7 +336,7 @@ export const useMultipleTabStore = defineStore('app-multiple-tab', {
},
/**
* replace tab's path
* *
*
*/
updateTabPath(fullPath: string, route: RouteLocationNormalized) {
const findTab = this.getTabList.find(item => item === route)

3
src/store/modules/permission.ts

@ -1,3 +1,4 @@
/* eslint-disable no-case-declarations */
import { toRaw } from 'vue'
import { defineStore } from 'pinia'
@ -132,7 +133,7 @@ export const usePermissionStore = defineStore('app-permission', {
/**
* @description pathroutes中的affix标记
* */
*/
const patchHomeAffix = (routes: AppRouteRecordRaw[]) => {
if (!routes || routes.length === 0)
return

1
src/utils/auth/index.ts

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/unbound-method */
import type { BasicKeys } from '@/utils/cache/persistent'
import { Persistent } from '@/utils/cache/persistent'
import { ACCESS_TOKEN_KEY, CacheTypeEnum, REFRESH_TOKEN_KEY, TENANT_ID_KEY } from '@/enums/cacheEnum'

4
src/utils/cache/storageCache.ts vendored

@ -33,10 +33,6 @@ export function createStorage({
private prefixKey?: string
private encryption: AesEncryption
private hasEncrypt: boolean
/**
*
* @param {*} storage
*/
constructor() {
this.storage = storage
this.prefixKey = prefixKey

2
src/utils/color.ts

@ -2,7 +2,7 @@
* .
* #fff000 #f00
*
* @param String color
* @param color
* @return Boolean
*/
export function isHexColor(color: string) {

8
src/utils/domUtils.ts

@ -158,16 +158,12 @@ export function once(el: HTMLElement, event: string, fn: EventListener): void {
export function useRafThrottle<T extends FunctionArgs>(fn: T): T {
let locked = false
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
return function (...args: any[]) {
return (...args: any[]) => {
if (locked)
return
locked = true
window.requestAnimationFrame(() => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-invalid-this
// eslint-disable-next-line ts/no-invalid-this
fn.apply(this, args)
locked = false
})

1
src/utils/file/base64Conver.ts

@ -27,6 +27,7 @@ export function urlToBase64(url: string, mineType?: string): Promise<string> {
img.crossOrigin = ''
img.onload = function () {
if (!canvas || !ctx)
// eslint-disable-next-line prefer-promise-reject-errors
return reject()
canvas.height = img.height

1
src/utils/http/axios/index.ts

@ -84,6 +84,7 @@ const transform: AxiosTransform = {
switch (code) {
case ResultEnum.UNAUTHORIZED:
timeoutMsg = t('sys.api.timeoutMessage')
// eslint-disable-next-line no-case-declarations
const userStore = useUserStoreWithOut()
userStore.setAccessToken(undefined)
userStore.logout(true)

4
src/utils/index.ts

@ -165,9 +165,7 @@ export function simpleDebounce(fn, delay = 100) {
clearTimeout(timer)
timer = setTimeout(() => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-invalid-this
// eslint-disable-next-line ts/no-invalid-this
fn.apply(this, args)
}, delay)
}

1
src/utils/is.ts

@ -1,6 +1,5 @@
import { isNil } from 'lodash-es'
// eslint-disable-next-line @typescript-eslint/unbound-method
const toString = Object.prototype.toString
export function is(val: unknown, type: string) {

1
src/views/base/profile/data.ts

@ -1,3 +1,4 @@
/* eslint-disable prefer-promise-reject-errors */
import type { FormSchema } from '@/components/Form'
import { useI18n } from '@/hooks/web/useI18n'

2
src/views/bpm/oa/leave/detail.vue

@ -27,7 +27,7 @@ async function getInfo() {
datas.value = res
}
/** 初始化 **/
/** 初始化 */
onMounted(async () => {
await getInfo()
})

2
src/views/bpm/processInstance/create/index.vue

@ -33,7 +33,7 @@ const [registerTable] = useTable({
},
})
/** 处理选择流程的按钮操作 **/
/** 处理选择流程的按钮操作 */
async function handleSelect(row) {
//
selectProcessInstance.value = row

4
src/views/infra/codegen/components/PreviewModal.vue

@ -33,7 +33,7 @@ function handleSelect(keys) {
activeKey.value = keys[0]
}
/** 生成 files 目录 **/
/** 生成 files 目录 */
interface filesType {
id: string
label: string
@ -102,7 +102,7 @@ function handleFiles(datas) {
return files
}
/** 复制 **/
/** 复制 */
async function copy(text: string) {
const { copy, copied, isSupported } = useClipboard({ source: text })
if (!isSupported) {

2
src/views/pay/cashier/index.vue

@ -250,7 +250,7 @@ async function getDetail() {
datas.value = res
}
/** 初始化 **/
/** 初始化 */
onMounted(async () => {
await getDetail()
})

2
src/views/system/tenantPackage/TenantPackageModal.vue

@ -93,7 +93,7 @@ function menuReset() {
* 父子节点关联情况下 checkedKeys为选中的菜单 e.halfCheckedKeys为父节点数组
* 父子节点独立情况下 checkedKeys为{checked: number[], halfChecked: number[]} e.halfCheckedKeys为null
* @param checkedKeys 选中的菜单
* @param e event
* @param event event
*/
function menuCheck(checkedKeys: CheckedKeys, event: CheckedEvent) {
if (Array.isArray(checkedKeys)) {

1
src/views/system/user/user.data.ts

@ -1,3 +1,4 @@
/* eslint-disable prefer-promise-reject-errors */
import { h } from 'vue'
import { Switch } from 'ant-design-vue'
import dayjs from 'dayjs'