fix: fix types
parent
1de5f2bb5a
commit
9acc73a591
|
|
@ -72,12 +72,12 @@ export default defineComponent({
|
||||||
<CollapseTransition enable={props.canExpan}>
|
<CollapseTransition enable={props.canExpan}>
|
||||||
{props.loading
|
{props.loading
|
||||||
? (
|
? (
|
||||||
<Skeleton active={props.loading} />
|
<Skeleton active={props.loading} />
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
<div class={`${prefixCls}__body`} v-show={show.value}>
|
<div class={`${prefixCls}__body`} v-show={show.value}>
|
||||||
{slots.default?.()}
|
{slots.default?.()}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</CollapseTransition>
|
</CollapseTransition>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable prefer-promise-reject-errors */
|
||||||
import CronParser from 'cron-parser'
|
import CronParser from 'cron-parser'
|
||||||
import type { ValidatorRule } from 'ant-design-vue/lib/form/interface'
|
import type { ValidatorRule } from 'ant-design-vue/lib/form/interface'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,9 @@ export default defineComponent({
|
||||||
const renderLabel = subLabel
|
const renderLabel = subLabel
|
||||||
? (
|
? (
|
||||||
<span>
|
<span>
|
||||||
{label} <span class="text-secondary">{subLabel}</span>
|
{label}
|
||||||
|
{' '}
|
||||||
|
<span class="text-secondary">{subLabel}</span>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ export function useForm(props?: Props): UseFormReturnType {
|
||||||
return form.submit()
|
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()
|
const form = await getForm()
|
||||||
return form.validate(nameList)
|
return form.validate(nameList)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable @typescript-eslint/require-await */
|
|
||||||
import type { ComputedRef, Ref } from 'vue'
|
import type { ComputedRef, Ref } from 'vue'
|
||||||
import type { NamePath } from 'ant-design-vue/lib/form/interface'
|
import type { NamePath } from 'ant-design-vue/lib/form/interface'
|
||||||
import { nextTick, toRaw, unref } from 'vue'
|
import { nextTick, toRaw, unref } from 'vue'
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ export interface FormActionType {
|
||||||
removeSchemaByField: (field: string | string[]) => Promise<void>
|
removeSchemaByField: (field: string | string[]) => Promise<void>
|
||||||
appendSchemaByField: (schema: FormSchema | FormSchema[], prefixField: string | undefined, first?: boolean | undefined) => Promise<void>
|
appendSchemaByField: (schema: FormSchema | FormSchema[], prefixField: string | undefined, first?: boolean | undefined) => Promise<void>
|
||||||
validateFields: (nameList?: NamePath[]) => Promise<any>
|
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>
|
scrollToField: (name: NamePath, options?: ScrollOptions) => Promise<void>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ const patternDataSource = ref([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:
|
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挂学警港澳])$/',
|
'/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][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: '车牌号(新能源)',
|
text: '车牌号(新能源)',
|
||||||
},
|
},
|
||||||
|
|
@ -109,7 +109,7 @@ const patternDataSource = ref([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:
|
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,}))$/',
|
'/^(([^<>()[\\]\\\\.,;:\\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(邮箱)',
|
text: 'email(邮箱)',
|
||||||
},
|
},
|
||||||
|
|
@ -127,7 +127,7 @@ const patternDataSource = ref([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:
|
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])+$/',
|
'/^(?:[\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: '中文汉字',
|
text: '中文汉字',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -151,8 +151,7 @@ function copyFormItem(formItem: IVFormComponent) {
|
||||||
* @param item {IVFormComponent} 当前点击的组件
|
* @param item {IVFormComponent} 当前点击的组件
|
||||||
* @param isCopy {boolean} 是否复制
|
* @param isCopy {boolean} 是否复制
|
||||||
*/
|
*/
|
||||||
function handleCopy(item: IVFormComponent = formConfig.value.currentItem as IVFormComponent,
|
function handleCopy(item: IVFormComponent = formConfig.value.currentItem as IVFormComponent, isCopy = true) {
|
||||||
isCopy = true) {
|
|
||||||
const key = formConfig.value.currentItem?.key
|
const key = formConfig.value.currentItem?.key
|
||||||
/**
|
/**
|
||||||
* 遍历当表单项配置,如果是复制,则复制一份表单项,如果不是复制,则直接添加到表单项中
|
* 遍历当表单项配置,如果是复制,则复制一份表单项,如果不是复制,则直接添加到表单项中
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,6 @@ export function useVFormMethods<E extends EmitsOptions = EmitsOptions>(
|
||||||
* 获取formData中的值
|
* 获取formData中的值
|
||||||
* @return {Promise<IAnyObject<any>>}
|
* @return {Promise<IAnyObject<any>>}
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/require-await
|
|
||||||
const getData: IGetData = async () => {
|
const getData: IGetData = async () => {
|
||||||
return cloneDeep(props.formModel)
|
return cloneDeep(props.formModel)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ export function strToReg(rules: IValidationRule[]) {
|
||||||
*/
|
*/
|
||||||
export function runCode<T>(code: any): T {
|
export function runCode<T>(code: any): T {
|
||||||
try {
|
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}`)()
|
return new Function(`return ${code}`)()
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
|
|
||||||
|
|
@ -337,7 +337,10 @@ export default defineComponent({
|
||||||
const { imageList } = props
|
const { imageList } = props
|
||||||
return (
|
return (
|
||||||
<div class={`${prefixCls}__index`}>
|
<div class={`${prefixCls}__index`}>
|
||||||
{currentIndex + 1} / {imageList.length}
|
{currentIndex + 1}
|
||||||
|
{' '}
|
||||||
|
/
|
||||||
|
{imageList.length}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,18 +33,18 @@ export default defineComponent({
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{getIsEdit.value
|
{getIsEdit.value
|
||||||
? (
|
? (
|
||||||
<EditTableHeaderCell>{getTitle.value}</EditTableHeaderCell>
|
<EditTableHeaderCell>{getTitle.value}</EditTableHeaderCell>
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
<span class="default-header-cell">{getTitle.value}</span>
|
<span class="default-header-cell">{getTitle.value}</span>
|
||||||
)}
|
)}
|
||||||
{getHelpMessage.value && (
|
{getHelpMessage.value && (
|
||||||
<BasicHelp text={getHelpMessage.value} class={`${prefixCls}__help`} />
|
<BasicHelp text={getHelpMessage.value} class={`${prefixCls}__help`} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ const props = defineProps({
|
||||||
srcPrefix: propTypes.string.def(''),
|
srcPrefix: propTypes.string.def(''),
|
||||||
// fallback,加载失败显示图像占位符。
|
// fallback,加载失败显示图像占位符。
|
||||||
fallback: propTypes.string.def(
|
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/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkA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U5ErkJggg==',
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ export interface ComponentProps {
|
||||||
getPopupContainer?: Fn
|
getPopupContainer?: Fn
|
||||||
}
|
}
|
||||||
|
|
||||||
export function CellComponent({ component = 'Input', rule = true, ruleMessage, popoverOpen, getPopupContainer }: ComponentProps,
|
export function CellComponent({ component = 'Input', rule = true, ruleMessage, popoverOpen, getPopupContainer }: ComponentProps, { attrs }) {
|
||||||
{ attrs }) {
|
|
||||||
const Comp = componentMap.get(component) as typeof defineComponent
|
const Comp = componentMap.get(component) as typeof defineComponent
|
||||||
|
|
||||||
const DefaultComp = h(Comp, attrs)
|
const DefaultComp = h(Comp, attrs)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable @typescript-eslint/await-thenable */
|
|
||||||
import type { WatchStopHandle } from 'vue'
|
import type { WatchStopHandle } from 'vue'
|
||||||
import { onUnmounted, ref, toRaw, unref, watch } from 'vue'
|
import { onUnmounted, ref, toRaw, unref, watch } from 'vue'
|
||||||
import type { BasicColumn, BasicTableProps, FetchParams, TableActionType } from '../types/table'
|
import type { BasicColumn, BasicTableProps, FetchParams, TableActionType } from '../types/table'
|
||||||
|
|
|
||||||
|
|
@ -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>
|
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> {
|
export interface BasicColumn extends ColumnProps<Recordable> {
|
||||||
children?: BasicColumn[]
|
children?: BasicColumn[]
|
||||||
filters?: {
|
filters?: {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable max-len */
|
|
||||||
// Any plugins you want to setting has to be imported
|
// Any plugins you want to setting has to be imported
|
||||||
// Detail plugins list see https://www.tinymce.com/docs/plugins/
|
// Detail plugins list see https://www.tinymce.com/docs/plugins/
|
||||||
// Custom builds see https://www.tinymce.com/download/custom-builds/
|
// Custom builds see https://www.tinymce.com/download/custom-builds/
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ export default function (expandedParentClass = '', x = false) {
|
||||||
|
|
||||||
// el.style[sizeProperty] = '0';
|
// el.style[sizeProperty] = '0';
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-void
|
||||||
void el.offsetHeight // force reflow
|
void el.offsetHeight // force reflow
|
||||||
|
|
||||||
el.style.transition = initialStyle.transition
|
el.style.transition = initialStyle.transition
|
||||||
|
|
@ -63,6 +64,7 @@ export default function (expandedParentClass = '', x = false) {
|
||||||
el.style.overflow = 'hidden'
|
el.style.overflow = 'hidden'
|
||||||
el.style[sizeProperty] = `${el[offsetProperty]}px`
|
el.style[sizeProperty] = `${el[offsetProperty]}px`
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-void
|
||||||
void el.offsetHeight // force reflow
|
void el.offsetHeight // force reflow
|
||||||
|
|
||||||
requestAnimationFrame(() => (el.style[sizeProperty] = '0'))
|
requestAnimationFrame(() => (el.style[sizeProperty] = '0'))
|
||||||
|
|
|
||||||
|
|
@ -358,11 +358,11 @@ export default defineComponent({
|
||||||
|
|
||||||
const titleDom = isHighlight
|
const titleDom = isHighlight
|
||||||
? (
|
? (
|
||||||
<span class={unref(getBindValues)?.blockNode ? `${bem('content')}` : ''}>
|
<span class={unref(getBindValues)?.blockNode ? `${bem('content')}` : ''}>
|
||||||
<span>{title.slice(0, searchIdx)}</span>
|
<span>{title.slice(0, searchIdx)}</span>
|
||||||
<span style={highlightStyle}>{searchText}</span>
|
<span style={highlightStyle}>{searchText}</span>
|
||||||
<span>{title.slice(searchIdx + (searchText as string).length)}</span>
|
<span>{title.slice(searchIdx + (searchText as string).length)}</span>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
title
|
title
|
||||||
|
|
@ -374,11 +374,11 @@ export default defineComponent({
|
||||||
getSlot(slots, 'title', item)
|
getSlot(slots, 'title', item)
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
<>
|
<>
|
||||||
{icon && <TreeIcon icon={icon} />}
|
{icon && <TreeIcon icon={icon} />}
|
||||||
{titleDom}
|
{titleDom}
|
||||||
<span class={bem('actions')}>{renderAction(item)}</span>
|
<span class={bem('actions')}>{renderAction(item)}</span>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -23,5 +23,6 @@ export function getBase64WithFile(file: File) {
|
||||||
reader.readAsDataURL(file)
|
reader.readAsDataURL(file)
|
||||||
reader.onload = () => resolve({ result: reader.result as string, file })
|
reader.onload = () => resolve({ result: reader.result as string, file })
|
||||||
reader.onerror = error => reject(error)
|
reader.onerror = error => reject(error)
|
||||||
})
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Verify 验证码组件
|
* Verify 验证码组件
|
||||||
* @description 分发验证码使用
|
* @description 分发验证码使用
|
||||||
* */
|
*/
|
||||||
import { computed, ref, toRefs, watchEffect } from 'vue'
|
import { computed, ref, toRefs, watchEffect } from 'vue'
|
||||||
import VerifySlide from './Verify/VerifySlide.vue'
|
import VerifySlide from './Verify/VerifySlide.vue'
|
||||||
import VerifyPoints from './Verify/VerifyPoints.vue'
|
import VerifyPoints from './Verify/VerifyPoints.vue'
|
||||||
|
|
@ -70,7 +70,7 @@ export default {
|
||||||
/**
|
/**
|
||||||
* refresh
|
* refresh
|
||||||
* @description 刷新
|
* @description 刷新
|
||||||
* */
|
*/
|
||||||
const refresh = () => {
|
const refresh = () => {
|
||||||
if (instance.value.refresh)
|
if (instance.value.refresh)
|
||||||
instance.value.refresh()
|
instance.value.refresh()
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* VerifyPoints
|
* VerifyPoints
|
||||||
* @description 点选
|
* @description 点选
|
||||||
* */
|
*/
|
||||||
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue'
|
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue'
|
||||||
import { resetSize } from './../utils/util'
|
import { resetSize } from './../utils/util'
|
||||||
import { aesEncrypt } from './../utils/ase'
|
import { aesEncrypt } from './../utils/ase'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* VerifySlide
|
* VerifySlide
|
||||||
* @description 滑块
|
* @description 滑块
|
||||||
* */
|
*/
|
||||||
import { computed, getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs, watch } from 'vue'
|
import { computed, getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs, watch } from 'vue'
|
||||||
import { aesEncrypt } from './../utils/ase'
|
import { aesEncrypt } from './../utils/ase'
|
||||||
import { resetSize } from './../utils/util'
|
import { resetSize } from './../utils/util'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import CryptoJS from 'crypto-js'
|
||||||
/**
|
/**
|
||||||
* @word 要加密的内容
|
* @word 要加密的内容
|
||||||
* @keyWord String 服务器随机返回的关键字
|
* @keyWord String 服务器随机返回的关键字
|
||||||
* */
|
*/
|
||||||
export function aesEncrypt(word, keyWord = 'XwKsGlMcdPMEhR1B') {
|
export function aesEncrypt(word, keyWord = 'XwKsGlMcdPMEhR1B') {
|
||||||
const key = CryptoJS.enc.Utf8.parse(keyWord)
|
const key = CryptoJS.enc.Utf8.parse(keyWord)
|
||||||
const srcs = CryptoJS.enc.Utf8.parse(word)
|
const srcs = CryptoJS.enc.Utf8.parse(word)
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ type Upward = number | string | null | undefined
|
||||||
* @param anchorRef 锚点组件 Ref<ElRef | ComponentRef>
|
* @param anchorRef 锚点组件 Ref<ElRef | ComponentRef>
|
||||||
* @param subtractHeightRefs 待减去高度的组件列表 Ref<ElRef | ComponentRef>
|
* @param subtractHeightRefs 待减去高度的组件列表 Ref<ElRef | ComponentRef>
|
||||||
* @param substractSpaceRefs 待减去空闲空间(margins/paddings)的组件列表 Ref<ElRef | ComponentRef>
|
* @param substractSpaceRefs 待减去空闲空间(margins/paddings)的组件列表 Ref<ElRef | ComponentRef>
|
||||||
* @param offsetHeightRef 计算偏移的响应式高度,计算高度时将直接减去此值
|
|
||||||
* @param upwardSpace 向上递归减去空闲空间的 层级 或 直到指定class为止 数值为2代表向上递归两次|数值为ant-layout表示向上递归直到碰见.ant-layout为止
|
* @param upwardSpace 向上递归减去空闲空间的 层级 或 直到指定class为止 数值为2代表向上递归两次|数值为ant-layout表示向上递归直到碰见.ant-layout为止
|
||||||
|
* @param offsetHeightRef 计算偏移的响应式高度,计算高度时将直接减去此值
|
||||||
* @returns 响应式高度
|
* @returns 响应式高度
|
||||||
*/
|
*/
|
||||||
export function useContentHeight(
|
export function useContentHeight(
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ export function useDesign(scope: string) {
|
||||||
// }
|
// }
|
||||||
return {
|
return {
|
||||||
// prefixCls: computed(() => `${values.prefixCls}-${scope}`),
|
// prefixCls: computed(() => `${values.prefixCls}-${scope}`),
|
||||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
||||||
prefixCls: `${values.prefixCls}-${scope}`,
|
prefixCls: `${values.prefixCls}-${scope}`,
|
||||||
prefixVar: values.prefixCls,
|
prefixVar: values.prefixCls,
|
||||||
// style,
|
// style,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
|
||||||
import type { RouteLocationRaw, Router } from 'vue-router'
|
import type { RouteLocationRaw, Router } from 'vue-router'
|
||||||
|
|
||||||
import { unref } from 'vue'
|
import { unref } from 'vue'
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ export function usePermission() {
|
||||||
/**
|
/**
|
||||||
* Reset and regain authority resource information
|
* Reset and regain authority resource information
|
||||||
* 重置和重新获得权限资源信息
|
* 重置和重新获得权限资源信息
|
||||||
* @param id
|
|
||||||
*/
|
*/
|
||||||
async function resume() {
|
async function resume() {
|
||||||
const tabStore = useMultipleTabStore()
|
const tabStore = useMultipleTabStore()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable @typescript-eslint/await-thenable */
|
|
||||||
import type { RouteLocationNormalized, Router } from 'vue-router'
|
import type { RouteLocationNormalized, Router } from 'vue-router'
|
||||||
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ export default defineComponent({
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* click menu
|
* click menu
|
||||||
* @param menu
|
* @param path
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handleMenuClick(path: string) {
|
function handleMenuClick(path: string) {
|
||||||
|
|
@ -112,7 +112,7 @@ export default defineComponent({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* before click menu
|
* before click menu
|
||||||
* @param menu
|
* @param path
|
||||||
*/
|
*/
|
||||||
async function beforeMenuClickFn(path: string) {
|
async function beforeMenuClickFn(path: string) {
|
||||||
if (!isUrl(path))
|
if (!isUrl(path))
|
||||||
|
|
@ -135,17 +135,17 @@ export default defineComponent({
|
||||||
return null
|
return null
|
||||||
return !props.isHorizontal
|
return !props.isHorizontal
|
||||||
? (
|
? (
|
||||||
<SimpleMenu {...menuProps} isSplitMenu={unref(getSplit)} items={menus} />
|
<SimpleMenu {...menuProps} isSplitMenu={unref(getSplit)} items={menus} />
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
<BasicMenu
|
<BasicMenu
|
||||||
{...(menuProps as any)}
|
{...(menuProps as any)}
|
||||||
isHorizontal={props.isHorizontal}
|
isHorizontal={props.isHorizontal}
|
||||||
type={unref(getMenuType)}
|
type={unref(getMenuType)}
|
||||||
showLogo={unref(getIsShowLogo)}
|
showLogo={unref(getIsShowLogo)}
|
||||||
mode={unref(getComputedMenuMode as any)}
|
mode={unref(getComputedMenuMode as any)}
|
||||||
items={menus}
|
items={menus}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable no-case-declarations */
|
||||||
import { HandlerEnum } from './enum'
|
import { HandlerEnum } from './enum'
|
||||||
import { updateHeaderBgColor, updateSidebarBgColor } from '@/logics/theme/updateBackground'
|
import { updateHeaderBgColor, updateSidebarBgColor } from '@/logics/theme/updateBackground'
|
||||||
import { updateColorWeak } from '@/logics/theme/updateColorWeak'
|
import { updateColorWeak } from '@/logics/theme/updateColorWeak'
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export function useTabsDrag(affixTextList: string[]) {
|
||||||
const el = document.querySelectorAll(`.${prefixCls} .ant-tabs-nav-wrap > div`)?.[0] as HTMLElement
|
const el = document.querySelectorAll(`.${prefixCls} .ant-tabs-nav-wrap > div`)?.[0] as HTMLElement
|
||||||
const { initSortable } = useSortable(el, {
|
const { initSortable } = useSortable(el, {
|
||||||
filter: (_evt, target: HTMLElement) => {
|
filter: (_evt, target: HTMLElement) => {
|
||||||
const text = target.innerText
|
const text = target.textContent
|
||||||
if (!text)
|
if (!text)
|
||||||
return false
|
return false
|
||||||
return affixTextList.map(res => t(res)).includes(text)
|
return affixTextList.map(res => t(res)).includes(text)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable @typescript-eslint/require-await */
|
|
||||||
import type { RouteLocationNormalized, Router } from 'vue-router'
|
import type { RouteLocationNormalized, Router } from 'vue-router'
|
||||||
import { Modal, notification } from 'ant-design-vue'
|
import { Modal, notification } from 'ant-design-vue'
|
||||||
import { unref } from 'vue'
|
import { unref } from 'vue'
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@ function dynamicImport(dynamicViewsModules: Record<string, () => Promise<Recorda
|
||||||
}
|
}
|
||||||
else if (matchKeys?.length > 1) {
|
else if (matchKeys?.length > 1) {
|
||||||
warn(
|
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',
|
'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',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ import type { RoleEnum } from '@/enums/roleEnum'
|
||||||
|
|
||||||
export type Component<T = any> = ReturnType<typeof defineComponent> | (() => Promise<typeof import('*.vue')>) | (() => Promise<T>)
|
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'> {
|
export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
|
||||||
keepAlive?: boolean
|
keepAlive?: boolean
|
||||||
visible?: boolean
|
visible?: boolean
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
|
||||||
import type { RouteLocationNormalized, RouteLocationRaw, Router } from 'vue-router'
|
import type { RouteLocationNormalized, RouteLocationRaw, Router } from 'vue-router'
|
||||||
|
|
||||||
import { toRaw, unref } from 'vue'
|
import { toRaw, unref } from 'vue'
|
||||||
|
|
@ -337,7 +336,7 @@ export const useMultipleTabStore = defineStore('app-multiple-tab', {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* replace tab's path
|
* replace tab's path
|
||||||
* *
|
*
|
||||||
*/
|
*/
|
||||||
updateTabPath(fullPath: string, route: RouteLocationNormalized) {
|
updateTabPath(fullPath: string, route: RouteLocationNormalized) {
|
||||||
const findTab = this.getTabList.find(item => item === route)
|
const findTab = this.getTabList.find(item => item === route)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable no-case-declarations */
|
||||||
import { toRaw } from 'vue'
|
import { toRaw } from 'vue'
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
|
|
@ -132,7 +133,7 @@ export const usePermissionStore = defineStore('app-permission', {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 根据设置的首页path,修正routes中的affix标记(固定首页)
|
* @description 根据设置的首页path,修正routes中的affix标记(固定首页)
|
||||||
* */
|
*/
|
||||||
const patchHomeAffix = (routes: AppRouteRecordRaw[]) => {
|
const patchHomeAffix = (routes: AppRouteRecordRaw[]) => {
|
||||||
if (!routes || routes.length === 0)
|
if (!routes || routes.length === 0)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
|
||||||
import type { BasicKeys } from '@/utils/cache/persistent'
|
import type { BasicKeys } from '@/utils/cache/persistent'
|
||||||
import { Persistent } from '@/utils/cache/persistent'
|
import { Persistent } from '@/utils/cache/persistent'
|
||||||
import { ACCESS_TOKEN_KEY, CacheTypeEnum, REFRESH_TOKEN_KEY, TENANT_ID_KEY } from '@/enums/cacheEnum'
|
import { ACCESS_TOKEN_KEY, CacheTypeEnum, REFRESH_TOKEN_KEY, TENANT_ID_KEY } from '@/enums/cacheEnum'
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,6 @@ export function createStorage({
|
||||||
private prefixKey?: string
|
private prefixKey?: string
|
||||||
private encryption: AesEncryption
|
private encryption: AesEncryption
|
||||||
private hasEncrypt: boolean
|
private hasEncrypt: boolean
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {*} storage
|
|
||||||
*/
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.storage = storage
|
this.storage = storage
|
||||||
this.prefixKey = prefixKey
|
this.prefixKey = prefixKey
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
* 判断是否 十六进制颜色值.
|
* 判断是否 十六进制颜色值.
|
||||||
* 输入形式可为 #fff000 #f00
|
* 输入形式可为 #fff000 #f00
|
||||||
*
|
*
|
||||||
* @param String color 十六进制颜色值
|
* @param color 十六进制颜色值
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
export function isHexColor(color: string) {
|
export function isHexColor(color: string) {
|
||||||
|
|
|
||||||
|
|
@ -158,16 +158,12 @@ export function once(el: HTMLElement, event: string, fn: EventListener): void {
|
||||||
|
|
||||||
export function useRafThrottle<T extends FunctionArgs>(fn: T): T {
|
export function useRafThrottle<T extends FunctionArgs>(fn: T): T {
|
||||||
let locked = false
|
let locked = false
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
return (...args: any[]) => {
|
||||||
// @ts-expect-error
|
|
||||||
return function (...args: any[]) {
|
|
||||||
if (locked)
|
if (locked)
|
||||||
return
|
return
|
||||||
locked = true
|
locked = true
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line ts/no-invalid-this
|
||||||
// @ts-expect-error
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-invalid-this
|
|
||||||
fn.apply(this, args)
|
fn.apply(this, args)
|
||||||
locked = false
|
locked = false
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ export function urlToBase64(url: string, mineType?: string): Promise<string> {
|
||||||
img.crossOrigin = ''
|
img.crossOrigin = ''
|
||||||
img.onload = function () {
|
img.onload = function () {
|
||||||
if (!canvas || !ctx)
|
if (!canvas || !ctx)
|
||||||
|
// eslint-disable-next-line prefer-promise-reject-errors
|
||||||
return reject()
|
return reject()
|
||||||
|
|
||||||
canvas.height = img.height
|
canvas.height = img.height
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ const transform: AxiosTransform = {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case ResultEnum.UNAUTHORIZED:
|
case ResultEnum.UNAUTHORIZED:
|
||||||
timeoutMsg = t('sys.api.timeoutMessage')
|
timeoutMsg = t('sys.api.timeoutMessage')
|
||||||
|
// eslint-disable-next-line no-case-declarations
|
||||||
const userStore = useUserStoreWithOut()
|
const userStore = useUserStoreWithOut()
|
||||||
userStore.setAccessToken(undefined)
|
userStore.setAccessToken(undefined)
|
||||||
userStore.logout(true)
|
userStore.logout(true)
|
||||||
|
|
|
||||||
|
|
@ -165,9 +165,7 @@ export function simpleDebounce(fn, delay = 100) {
|
||||||
clearTimeout(timer)
|
clearTimeout(timer)
|
||||||
|
|
||||||
timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line ts/no-invalid-this
|
||||||
// @ts-expect-error
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-invalid-this
|
|
||||||
fn.apply(this, args)
|
fn.apply(this, args)
|
||||||
}, delay)
|
}, delay)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { isNil } from 'lodash-es'
|
import { isNil } from 'lodash-es'
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
||||||
const toString = Object.prototype.toString
|
const toString = Object.prototype.toString
|
||||||
|
|
||||||
export function is(val: unknown, type: string) {
|
export function is(val: unknown, type: string) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable prefer-promise-reject-errors */
|
||||||
import type { FormSchema } from '@/components/Form'
|
import type { FormSchema } from '@/components/Form'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ async function getInfo() {
|
||||||
datas.value = res
|
datas.value = res
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getInfo()
|
await getInfo()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ const [registerTable] = useTable({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 处理选择流程的按钮操作 **/
|
/** 处理选择流程的按钮操作 */
|
||||||
async function handleSelect(row) {
|
async function handleSelect(row) {
|
||||||
// 设置选择的流程
|
// 设置选择的流程
|
||||||
selectProcessInstance.value = row
|
selectProcessInstance.value = row
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function handleSelect(keys) {
|
||||||
activeKey.value = keys[0]
|
activeKey.value = keys[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 生成 files 目录 **/
|
/** 生成 files 目录 */
|
||||||
interface filesType {
|
interface filesType {
|
||||||
id: string
|
id: string
|
||||||
label: string
|
label: string
|
||||||
|
|
@ -102,7 +102,7 @@ function handleFiles(datas) {
|
||||||
return files
|
return files
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 复制 **/
|
/** 复制 */
|
||||||
async function copy(text: string) {
|
async function copy(text: string) {
|
||||||
const { copy, copied, isSupported } = useClipboard({ source: text })
|
const { copy, copied, isSupported } = useClipboard({ source: text })
|
||||||
if (!isSupported) {
|
if (!isSupported) {
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,7 @@ async function getDetail() {
|
||||||
datas.value = res
|
datas.value = res
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getDetail()
|
await getDetail()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ function menuReset() {
|
||||||
* 父子节点关联情况下 checkedKeys为选中的菜单 e.halfCheckedKeys为父节点数组
|
* 父子节点关联情况下 checkedKeys为选中的菜单 e.halfCheckedKeys为父节点数组
|
||||||
* 父子节点独立情况下 checkedKeys为{checked: number[], halfChecked: number[]} e.halfCheckedKeys为null
|
* 父子节点独立情况下 checkedKeys为{checked: number[], halfChecked: number[]} e.halfCheckedKeys为null
|
||||||
* @param checkedKeys 选中的菜单
|
* @param checkedKeys 选中的菜单
|
||||||
* @param e event
|
* @param event event
|
||||||
*/
|
*/
|
||||||
function menuCheck(checkedKeys: CheckedKeys, event: CheckedEvent) {
|
function menuCheck(checkedKeys: CheckedKeys, event: CheckedEvent) {
|
||||||
if (Array.isArray(checkedKeys)) {
|
if (Array.isArray(checkedKeys)) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable prefer-promise-reject-errors */
|
||||||
import { h } from 'vue'
|
import { h } from 'vue'
|
||||||
import { Switch } from 'ant-design-vue'
|
import { Switch } from 'ant-design-vue'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue