Commit 61d853e6a52d1881eca4ba10a9f06fe4937108e0

Authored by 无木
1 parent 1f55c418

style(types): fix some type statement

src/components/Application/src/AppLogo.vue
... ... @@ -23,7 +23,7 @@
23 23 /**
24 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 28 * Whether to show title
29 29 */
... ...
src/components/Cropper/src/CopperModal.vue
... ... @@ -122,10 +122,12 @@
122 122 import { isFunction } from '/@/utils/is';
123 123 import { useI18n } from '/@/hooks/web/useI18n';
124 124  
  125 + type apiFunParams = { file: Blob; name: string; filename: string };
  126 +
125 127 const props = {
126 128 circled: { type: Boolean, default: true },
127 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 11 :style="{ cursor: isTitleClickable ? 'pointer' : '' }"
12 12 :delete="!!item.titleDelete"
13 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 18 :content="item.title"
17 19 />
... ... @@ -34,8 +36,8 @@
34 36 <a-typography-paragraph
35 37 style="width: 100%; margin-bottom: 0 !important"
36 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 41 : false
40 42 "
41 43 :content="item.description"
... ...