Skip to content

Commit

Permalink
fix: 修复TS类型错误
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Jan 16, 2023
1 parent 2800fb8 commit 1c06a27
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 28 deletions.
36 changes: 18 additions & 18 deletions package.json
Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"@iconify/iconify": "^3.0.1",
"@vueuse/core": "^9.9.0",
"@vueuse/core": "^9.10.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.10",
"@zxcvbn-ts/core": "^2.1.0",
Expand All @@ -42,7 +42,7 @@
"mitt": "^3.0.0",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"pinia": "^2.0.28",
"pinia": "^2.0.29",
"qrcode": "^1.5.1",
"qs": "^6.11.0",
"url": "^0.11.0",
Expand All @@ -53,9 +53,9 @@
"web-storage-cache": "^1.1.1"
},
"devDependencies": {
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@iconify/json": "^2.2.1",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@iconify/json": "^2.2.7",
"@intlify/unplugin-vue-i18n": "^0.8.1",
"@purge-icons/generated": "^0.9.0",
"@types/intro.js": "^5.1.0",
Expand All @@ -64,38 +64,38 @@
"@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0",
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.48.1",
"@vitejs/plugin-legacy": "^3.0.1",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"autoprefixer": "^10.4.13",
"consola": "^2.15.3",
"eslint": "^8.31.0",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-define-config": "^1.13.0",
"eslint-define-config": "^1.14.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.8.0",
"eslint-plugin-vue": "^9.9.0",
"husky": "^8.0.3",
"less": "^4.1.3",
"lint-staged": "^13.1.0",
"plop": "^3.1.1",
"postcss": "^8.4.20",
"postcss": "^8.4.21",
"postcss-html": "^1.5.0",
"postcss-less": "^6.0.0",
"prettier": "^2.8.1",
"rimraf": "^3.0.2",
"rollup": "^3.9.1",
"prettier": "^2.8.3",
"rimraf": "^4.0.7",
"rollup": "^3.10.0",
"stylelint": "^14.16.1",
"stylelint-config-html": "^1.1.0",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-recommended": "^9.0.0",
"stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0",
"stylelint-order": "^6.0.1",
"terser": "^5.16.1",
"typescript": "4.9.4",
"unplugin-vue-define-options": "^1.1.1",
"vite": "4.0.3",
"unplugin-vue-define-options": "^1.1.4",
"vite": "4.0.4",
"vite-plugin-ejs": "^1.6.4",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-mock": "^2.9.6",
Expand All @@ -104,7 +104,7 @@
"vite-plugin-style-import": "2.0.0",
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-windicss": "^1.8.10",
"vue-tsc": "^1.0.19",
"vue-tsc": "^1.0.24",
"windicss": "^3.5.6",
"windicss-analysis": "^0.3.5"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/ConfigGlobal/src/ConfigGlobal.vue
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Descriptions/src/Descriptions.vue
Expand Up @@ -23,7 +23,7 @@ const props = defineProps({
default: () => []
},
data: {
type: Object as PropType<Recordable>,
type: Object as PropType<any>,
default: () => ({})
}
})
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/web/useTimeAgo.ts
Expand Up @@ -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} 个月`),
Expand All @@ -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) =>
Expand Down
10 changes: 5 additions & 5 deletions src/views/Components/Descriptions.vue
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion src/views/Components/Echart.vue
Expand Up @@ -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>
Expand Down
3 changes: 1 addition & 2 deletions src/views/Dashboard/echarts-data.ts
@@ -1,5 +1,4 @@
import { EChartsOption } from 'echarts'
import { EChartsOption as EChartsWordOption } from 'echarts-wordcloud'
import { useI18n } from '@/hooks/web/useI18n'

const { t } = useI18n()
Expand Down Expand Up @@ -185,7 +184,7 @@ export const radarOption: EChartsOption = {
]
}

export const wordOptions: EChartsWordOption = {
export const wordOptions = {
series: [
{
type: 'wordCloud',
Expand Down

0 comments on commit 1c06a27

Please sign in to comment.