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

@ -28,7 +28,7 @@
}, },
"dependencies": { "dependencies": {
"@iconify/iconify": "^3.0.1", "@iconify/iconify": "^3.0.1",
"@vueuse/core": "^9.9.0", "@vueuse/core": "^9.10.0",
"@wangeditor/editor": "^5.1.23", "@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.10", "@wangeditor/editor-for-vue": "^5.1.10",
"@zxcvbn-ts/core": "^2.1.0", "@zxcvbn-ts/core": "^2.1.0",
@ -42,7 +42,7 @@
"mitt": "^3.0.0", "mitt": "^3.0.0",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pinia": "^2.0.28", "pinia": "^2.0.29",
"qrcode": "^1.5.1", "qrcode": "^1.5.1",
"qs": "^6.11.0", "qs": "^6.11.0",
"url": "^0.11.0", "url": "^0.11.0",
@ -53,9 +53,9 @@
"web-storage-cache": "^1.1.1" "web-storage-cache": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^17.3.0", "@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.3.0", "@commitlint/config-conventional": "^17.4.2",
"@iconify/json": "^2.2.1", "@iconify/json": "^2.2.7",
"@intlify/unplugin-vue-i18n": "^0.8.1", "@intlify/unplugin-vue-i18n": "^0.8.1",
"@purge-icons/generated": "^0.9.0", "@purge-icons/generated": "^0.9.0",
"@types/intro.js": "^5.1.0", "@types/intro.js": "^5.1.0",
@ -64,38 +64,38 @@
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0", "@types/qrcode": "^1.5.0",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.48.0", "@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.48.0", "@typescript-eslint/parser": "^5.48.1",
"@vitejs/plugin-legacy": "^3.0.1", "@vitejs/plugin-legacy": "^3.0.1",
"@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0", "@vitejs/plugin-vue-jsx": "^3.0.0",
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.13",
"consola": "^2.15.3", "consola": "^2.15.3",
"eslint": "^8.31.0", "eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.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-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.8.0", "eslint-plugin-vue": "^9.9.0",
"husky": "^8.0.3", "husky": "^8.0.3",
"less": "^4.1.3", "less": "^4.1.3",
"lint-staged": "^13.1.0", "lint-staged": "^13.1.0",
"plop": "^3.1.1", "plop": "^3.1.1",
"postcss": "^8.4.20", "postcss": "^8.4.21",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.8.1", "prettier": "^2.8.3",
"rimraf": "^3.0.2", "rimraf": "^4.0.7",
"rollup": "^3.9.1", "rollup": "^3.10.0",
"stylelint": "^14.16.1", "stylelint": "^14.16.1",
"stylelint-config-html": "^1.1.0", "stylelint-config-html": "^1.1.0",
"stylelint-config-prettier": "^9.0.4", "stylelint-config-prettier": "^9.0.4",
"stylelint-config-recommended": "^9.0.0", "stylelint-config-recommended": "^9.0.0",
"stylelint-config-standard": "^29.0.0", "stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0", "stylelint-order": "^6.0.1",
"terser": "^5.16.1", "terser": "^5.16.1",
"typescript": "4.9.4", "typescript": "4.9.4",
"unplugin-vue-define-options": "^1.1.1", "unplugin-vue-define-options": "^1.1.4",
"vite": "4.0.3", "vite": "4.0.4",
"vite-plugin-ejs": "^1.6.4", "vite-plugin-ejs": "^1.6.4",
"vite-plugin-eslint": "^1.8.1", "vite-plugin-eslint": "^1.8.1",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
@ -104,7 +104,7 @@
"vite-plugin-style-import": "2.0.0", "vite-plugin-style-import": "2.0.0",
"vite-plugin-svg-icons": "^2.0.1", "vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-windicss": "^1.8.10", "vite-plugin-windicss": "^1.8.10",
"vue-tsc": "^1.0.19", "vue-tsc": "^1.0.24",
"windicss": "^3.5.6", "windicss": "^3.5.6",
"windicss-analysis": "^0.3.5" "windicss-analysis": "^0.3.5"
}, },

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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