🔨 修改 defineProps 规范.

This commit is contained in:
lijiahangmax
2024-04-06 23:11:30 +08:00
parent 812286a2e7
commit 3623e6bd4a
50 changed files with 300 additions and 394 deletions

View File

@@ -60,7 +60,6 @@
<script lang="ts" setup>
import type { UserQueryResponse, LoginHistoryQueryResponse } from '@/api/user/user';
import type { PropType } from 'vue';
import useLoading from '@/hooks/loading';
import { ref, onBeforeMount } from 'vue';
import { ResultStatus } from '../types/const';
@@ -69,9 +68,9 @@
import { dateFormat } from '@/utils';
import { isMobile } from '@/utils/is';
const props = defineProps({
user: Object as PropType<UserQueryResponse>,
});
const props = defineProps<{
user?: UserQueryResponse;
}>();
const list = ref<LoginHistoryQueryResponse[]>([]);

View File

@@ -49,7 +49,6 @@
<script lang="ts" setup>
import type { UserUpdateRequest, UserQueryResponse } from '@/api/user/user';
import type { PropType } from 'vue';
import useLoading from '@/hooks/loading';
import { ref, onMounted } from 'vue';
import formRules from '../../user/types/form.rules';
@@ -59,9 +58,9 @@
import { Message } from '@arco-design/web-vue';
import { updateUser } from '@/api/user/user';
const props = defineProps({
user: Object as PropType<UserQueryResponse>,
});
const props = defineProps<{
user?: UserQueryResponse;
}>();
const userStore = useUserStore();
const { loading, setLoading } = useLoading();

View File

@@ -33,16 +33,15 @@
<script lang="ts" setup>
import type { UserQueryResponse } from '@/api/user/user';
import type { PropType } from 'vue';
import { ref, onBeforeMount } from 'vue';
import { useCacheStore, useDictStore } from '@/store';
import { dictKeys } from '@/views/user/operator-log/types/const';
import OperatorLogQueryHeader from '@/views/user/operator-log/components/operator-log-query-header.vue';
import OperatorLogSimpleTable from '@/views/user/operator-log/components/operator-log-simple-table.vue';
const props = defineProps({
user: Object as PropType<UserQueryResponse>,
});
const props = defineProps<{
user?: UserQueryResponse;
}>();
const cacheStore = useCacheStore();

View File

@@ -68,7 +68,6 @@
<script lang="ts" setup>
import type { UserQueryResponse } from '@/api/user/user';
import type { UserSessionQueryResponse } from '@/api/user/user';
import type { PropType } from 'vue';
import useLoading from '@/hooks/loading';
import { ref, onBeforeMount } from 'vue';
import { getCurrentUserSessionList, offlineCurrentUserSession } from '@/api/user/mine';
@@ -78,9 +77,9 @@
import usePermission from '@/hooks/permission';
import { getUserSessionList, offlineUserSession } from '@/api/user/user';
const props = defineProps({
user: Object as PropType<UserQueryResponse>,
});
const props = defineProps<{
user?: UserQueryResponse;
}>();
const list = ref<UserSessionQueryResponse[]>([]);