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

View File

@ -5,7 +5,7 @@ import * as NotifyMessageApi from '@/api/system/notify/message'
const { push } = useRouter() const { push } = useRouter()
const activeName = ref('notice') const activeName = ref('notice')
const unreadCount = ref(0) // const unreadCount = ref(0) //
const list = ref([]) // const list = ref<any[]>([]) //
// //
const getList = async () => { const getList = async () => {

View File

@ -16,7 +16,7 @@
<template #toMail_default="{ row }"> <template #toMail_default="{ row }">
<div>{{ row.toMail }}</div> <div>{{ row.toMail }}</div>
<div v-if="row.userType && row.userId"> <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> </div>
</template> </template>
<template #actionbtns_default="{ row }"> <template #actionbtns_default="{ row }">
@ -46,6 +46,7 @@
</template> </template>
<script setup lang="ts" name="MailLog"> <script setup lang="ts" name="MailLog">
// import // import
import { DICT_TYPE } from '@/utils/dict'
import { allSchemas } from './log.data' import { allSchemas } from './log.data'
import * as MailLogApi from '@/api/system/mail/log' import * as MailLogApi from '@/api/system/mail/log'
import * as MailAccountApi from '@/api/system/mail/account' import * as MailAccountApi from '@/api/system/mail/account'
@ -61,7 +62,7 @@ const [registerTable] = useXTable({
params: queryParams, params: queryParams,
getListApi: MailLogApi.getMailLogPageApi getListApi: MailLogApi.getMailLogPageApi
}) })
const accountOptions = ref([]) // const accountOptions = ref<any[]>([]) //
// //
const modelVisible = ref(false) // const modelVisible = ref(false) //

View File

@ -152,7 +152,7 @@ const [registerTable, { reload, deleteData }] = useXTable({
getListApi: MailTemplateApi.getMailTemplatePageApi, getListApi: MailTemplateApi.getMailTemplatePageApi,
deleteApi: MailTemplateApi.deleteMailTemplateApi deleteApi: MailTemplateApi.deleteMailTemplateApi
}) })
const accountOptions = ref([]) // const accountOptions = ref<any[]>([]) //
// //
const modelVisible = ref(false) // const modelVisible = ref(false) //

View File

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