Commit 61d853e6a52d1881eca4ba10a9f06fe4937108e0

Authored by 无木
1 parent 1f55c418

style(types): fix some type statement

src/components/Application/src/AppLogo.vue
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 /** 23 /**
24 * The theme of the current parent component 24 * The theme of the current parent component
25 */ 25 */
26 - theme: { type: String, validator: (v) => ['light', 'dark'].includes(v) }, 26 + theme: { type: String, validator: (v: string) => ['light', 'dark'].includes(v) },
27 /** 27 /**
28 * Whether to show title 28 * Whether to show title
29 */ 29 */
src/components/Cropper/src/CopperModal.vue
@@ -122,10 +122,12 @@ @@ -122,10 +122,12 @@
122 import { isFunction } from '/@/utils/is'; 122 import { isFunction } from '/@/utils/is';
123 import { useI18n } from '/@/hooks/web/useI18n'; 123 import { useI18n } from '/@/hooks/web/useI18n';
124 124
  125 + type apiFunParams = { file: Blob; name: string; filename: string };
  126 +
125 const props = { 127 const props = {
126 circled: { type: Boolean, default: true }, 128 circled: { type: Boolean, default: true },
127 uploadApi: { 129 uploadApi: {
128 - type: Function as PropType<({ file: Blob, name: string, filename: string }) => Promise<any>>, 130 + type: Function as PropType<(params: apiFunParams) => Promise<any>>,
129 }, 131 },
130 }; 132 };
131 133
src/layouts/default/header/components/notify/NoticeList.vue
@@ -11,7 +11,9 @@ @@ -11,7 +11,9 @@
11 :style="{ cursor: isTitleClickable ? 'pointer' : '' }" 11 :style="{ cursor: isTitleClickable ? 'pointer' : '' }"
12 :delete="!!item.titleDelete" 12 :delete="!!item.titleDelete"
13 :ellipsis=" 13 :ellipsis="
14 - $props.titleRows > 0 ? { rows: $props.titleRows, tooltip: item.title } : false 14 + $props.titleRows && $props.titleRows > 0
  15 + ? { rows: $props.titleRows, tooltip: !!item.title }
  16 + : false
15 " 17 "
16 :content="item.title" 18 :content="item.title"
17 /> 19 />
@@ -34,8 +36,8 @@ @@ -34,8 +36,8 @@
34 <a-typography-paragraph 36 <a-typography-paragraph
35 style="width: 100%; margin-bottom: 0 !important" 37 style="width: 100%; margin-bottom: 0 !important"
36 :ellipsis=" 38 :ellipsis="
37 - $props.descRows > 0  
38 - ? { rows: $props.descRows, tooltip: item.description } 39 + $props.descRows && $props.descRows > 0
  40 + ? { rows: $props.descRows, tooltip: !!item.description }
39 : false 41 : false
40 " 42 "
41 :content="item.description" 43 :content="item.description"