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