fix: 修复TS类型错误
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -23,7 +23,7 @@ const props = defineProps({
|
||||
default: () => []
|
||||
},
|
||||
data: {
|
||||
type: Object as PropType<Recordable>,
|
||||
type: Object as PropType<any>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user