fix: ts type eroor

This commit is contained in:
xingyu
2023-02-01 15:53:55 +08:00
parent 5fe0106155
commit 19fe7ea8f9
5 changed files with 8 additions and 13 deletions

View File

@ -1,10 +1,4 @@
import axios, {
AxiosInstance,
AxiosRequestConfig,
AxiosRequestHeaders,
AxiosResponse,
AxiosError
} from 'axios'
import axios, { AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosError } from 'axios'
import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
import qs from 'qs'
import { config } from '@/config/axios/config'
@ -41,7 +35,7 @@ const service: AxiosInstance = axios.create({
// request拦截器
service.interceptors.request.use(
(config: AxiosRequestConfig) => {
(config) => {
// 是否需要设置 token
let isToken = (config!.headers || {}).isToken === false
whiteList.some((v) => {

View File

@ -5,7 +5,7 @@ import * as NotifyMessageApi from '@/api/system/notify/message'
const { push } = useRouter()
const activeName = ref('notice')
const unreadCount = ref(0) // 未读消息数量
const list = ref([]) // 消息列表
const list = ref<any[]>([]) // 消息列表
// 获得消息列表
const getList = async () => {

View File

@ -16,7 +16,7 @@
<template #toMail_default="{ row }">
<div>{{ row.toMail }}</div>
<div v-if="row.userType && row.userId">
<dict-tag :type="DICT_TYPE.USER_TYPE" :value="row.userType" />{{ '(' + row.userId + ')' }}
<DictTag :type="DICT_TYPE.USER_TYPE" :value="row.userType" />{{ '(' + row.userId + ')' }}
</div>
</template>
<template #actionbtns_default="{ row }">
@ -46,6 +46,7 @@
</template>
<script setup lang="ts" name="MailLog">
// 业务相关的 import
import { DICT_TYPE } from '@/utils/dict'
import { allSchemas } from './log.data'
import * as MailLogApi from '@/api/system/mail/log'
import * as MailAccountApi from '@/api/system/mail/account'
@ -61,7 +62,7 @@ const [registerTable] = useXTable({
params: queryParams,
getListApi: MailLogApi.getMailLogPageApi
})
const accountOptions = ref([]) // 账号下拉选项
const accountOptions = ref<any[]>([]) // 账号下拉选项
// 弹窗相关的变量
const modelVisible = ref(false) // 是否显示弹出层

View File

@ -152,7 +152,7 @@ const [registerTable, { reload, deleteData }] = useXTable({
getListApi: MailTemplateApi.getMailTemplatePageApi,
deleteApi: MailTemplateApi.deleteMailTemplateApi
})
const accountOptions = ref([]) // 账号下拉选项
const accountOptions = ref<any[]>([]) // 账号下拉选项
// 弹窗相关的变量
const modelVisible = ref(false) // 是否显示弹出层

View File

@ -202,7 +202,7 @@ const submitForm = async () => {
const sendForm = ref({
content: '',
params: {},
userId: undefined,
userId: 0,
templateCode: '',
templateParams: {}
})