fix: 修复TS类型错误

This commit is contained in:
kailong321200875
2023-01-16 14:45:39 +08:00
parent 2800fb81c7
commit 1c06a27b90
7 changed files with 29 additions and 28 deletions

View File

@@ -14,7 +14,7 @@ const { variables } = useDesign()
const appStore = useAppStore()
const props = defineProps({
size: propTypes.oneOf<ElementPlusSize[]>(['default', 'small', 'large']).def('default')
size: propTypes.oneOf<ElementPlusSize>(['default', 'small', 'large']).def('default')
})
provide('configGlobal', props)

View File

@@ -23,7 +23,7 @@ const props = defineProps({
default: () => []
},
data: {
type: Object as PropType<Recordable>,
type: Object as PropType<any>,
default: () => ({})
}
})

View File

@@ -8,6 +8,7 @@ const TIME_AGO_MESSAGE_MAP: {
} = {
'zh-CN': {
justNow: '刚刚',
invalid: '无效时间',
past: (n) => (n.match(/\d/) ? `${n}` : n),
future: (n) => (n.match(/\d/) ? `${n}` : n),
month: (n, past) => (n === 1 ? (past ? '上个月' : '下个月') : `${n} 个月`),
@@ -20,6 +21,7 @@ const TIME_AGO_MESSAGE_MAP: {
},
en: {
justNow: '刚刚',
invalid: 'Invalid Date',
past: (n) => (n.match(/\d/) ? `${n} ago` : n),
future: (n) => (n.match(/\d/) ? `in ${n}` : n),
month: (n, past) =>

View File

@@ -82,19 +82,19 @@ const formValidation = () => {
<Form is-custom :model="form" :rules="rules" @register="register">
<Descriptions :title="t('descriptionsDemo.form')" :data="data" :schema="schema" class="mt-20px">
<template #username-label="scope">
<template #username-label="{ row: scope }">
<span class="is-required--item">{{ scope.label }}</span>
</template>
<template #nickName-label="scope">
<template #nickName-label="{ row: scope }">
<span class="is-required--item">{{ scope.label }}</span>
</template>
<template #phone-label="scope">
<template #phone-label="{ row: scope }">
<span class="is-required--item">{{ scope.label }}</span>
</template>
<template #email-label="scope">
<template #email-label="{ row: scope }">
<span class="is-required--item">{{ scope.label }}</span>
</template>
<template #addr-label="scope">
<template #addr-label="{ row: scope }">
<span class="is-required--item">{{ scope.label }}</span>
</template>

View File

@@ -28,7 +28,7 @@ const { t } = useI18n()
</ElCol>
<ElCol :span="24">
<ElCard shadow="hover" class="mb-20px">
<Echart :options="wordOptions" :height="300" />
<Echart :options="wordOptions as any" :height="300" />
</ElCard>
</ElCol>
</ElRow>

View File

@@ -1,5 +1,4 @@
import { EChartsOption } from 'echarts'
import { EChartsOption as EChartsWordOption } from 'echarts-wordcloud'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n()
@@ -185,7 +184,7 @@ export const radarOption: EChartsOption = {
]
}
export const wordOptions: EChartsWordOption = {
export const wordOptions = {
series: [
{
type: 'wordCloud',