Commit 19fe7ea8f935053992dde81a701cf92a49e50885
1 parent
5fe01061
fix: ts type eroor
Showing
5 changed files
with
8 additions
and
13 deletions
yudao-ui-admin-vue3/src/config/axios/service.ts
| 1 | -import axios, { | |
| 2 | - AxiosInstance, | |
| 3 | - AxiosRequestConfig, | |
| 4 | - AxiosRequestHeaders, | |
| 5 | - AxiosResponse, | |
| 6 | - AxiosError | |
| 7 | -} from 'axios' | |
| 1 | +import axios, { AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosError } from 'axios' | |
| 8 | 2 | import { ElMessage, ElMessageBox, ElNotification } from 'element-plus' |
| 9 | 3 | import qs from 'qs' |
| 10 | 4 | import { config } from '@/config/axios/config' |
| ... | ... | @@ -41,7 +35,7 @@ const service: AxiosInstance = axios.create({ |
| 41 | 35 | |
| 42 | 36 | // request拦截器 |
| 43 | 37 | service.interceptors.request.use( |
| 44 | - (config: AxiosRequestConfig) => { | |
| 38 | + (config) => { | |
| 45 | 39 | // 是否需要设置 token |
| 46 | 40 | let isToken = (config!.headers || {}).isToken === false |
| 47 | 41 | whiteList.some((v) => { | ... | ... |
yudao-ui-admin-vue3/src/layout/components/Message/src/Message.vue
| ... | ... | @@ -5,7 +5,7 @@ import * as NotifyMessageApi from '@/api/system/notify/message' |
| 5 | 5 | const { push } = useRouter() |
| 6 | 6 | const activeName = ref('notice') |
| 7 | 7 | const unreadCount = ref(0) // 未读消息数量 |
| 8 | -const list = ref([]) // 消息列表 | |
| 8 | +const list = ref<any[]>([]) // 消息列表 | |
| 9 | 9 | |
| 10 | 10 | // 获得消息列表 |
| 11 | 11 | const getList = async () => { | ... | ... |
yudao-ui-admin-vue3/src/views/system/mail/log/index.vue
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | <template #toMail_default="{ row }"> |
| 17 | 17 | <div>{{ row.toMail }}</div> |
| 18 | 18 | <div v-if="row.userType && row.userId"> |
| 19 | - <dict-tag :type="DICT_TYPE.USER_TYPE" :value="row.userType" />{{ '(' + row.userId + ')' }} | |
| 19 | + <DictTag :type="DICT_TYPE.USER_TYPE" :value="row.userType" />{{ '(' + row.userId + ')' }} | |
| 20 | 20 | </div> |
| 21 | 21 | </template> |
| 22 | 22 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -46,6 +46,7 @@ |
| 46 | 46 | </template> |
| 47 | 47 | <script setup lang="ts" name="MailLog"> |
| 48 | 48 | // 业务相关的 import |
| 49 | +import { DICT_TYPE } from '@/utils/dict' | |
| 49 | 50 | import { allSchemas } from './log.data' |
| 50 | 51 | import * as MailLogApi from '@/api/system/mail/log' |
| 51 | 52 | import * as MailAccountApi from '@/api/system/mail/account' |
| ... | ... | @@ -61,7 +62,7 @@ const [registerTable] = useXTable({ |
| 61 | 62 | params: queryParams, |
| 62 | 63 | getListApi: MailLogApi.getMailLogPageApi |
| 63 | 64 | }) |
| 64 | -const accountOptions = ref([]) // 账号下拉选项 | |
| 65 | +const accountOptions = ref<any[]>([]) // 账号下拉选项 | |
| 65 | 66 | |
| 66 | 67 | // 弹窗相关的变量 |
| 67 | 68 | const modelVisible = ref(false) // 是否显示弹出层 | ... | ... |
yudao-ui-admin-vue3/src/views/system/mail/template/index.vue
| ... | ... | @@ -152,7 +152,7 @@ const [registerTable, { reload, deleteData }] = useXTable({ |
| 152 | 152 | getListApi: MailTemplateApi.getMailTemplatePageApi, |
| 153 | 153 | deleteApi: MailTemplateApi.deleteMailTemplateApi |
| 154 | 154 | }) |
| 155 | -const accountOptions = ref([]) // 账号下拉选项 | |
| 155 | +const accountOptions = ref<any[]>([]) // 账号下拉选项 | |
| 156 | 156 | |
| 157 | 157 | // 弹窗相关的变量 |
| 158 | 158 | const modelVisible = ref(false) // 是否显示弹出层 | ... | ... |
yudao-ui-admin-vue3/src/views/system/notify/template/index.vue