Skip to content

Commit

Permalink
style(types): fix some type statement
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan committed Aug 13, 2021
1 parent 1f55c41 commit 61d853e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Application/src/AppLogo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* The theme of the current parent component
*/
theme: { type: String, validator: (v) => ['light', 'dark'].includes(v) },
theme: { type: String, validator: (v: string) => ['light', 'dark'].includes(v) },
/**
* Whether to show title
*/
Expand Down
4 changes: 3 additions & 1 deletion src/components/Cropper/src/CopperModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@
import { isFunction } from '/@/utils/is';
import { useI18n } from '/@/hooks/web/useI18n';
type apiFunParams = { file: Blob; name: string; filename: string };
const props = {
circled: { type: Boolean, default: true },
uploadApi: {
type: Function as PropType<({ file: Blob, name: string, filename: string }) => Promise<any>>,
type: Function as PropType<(params: apiFunParams) => Promise<any>>,
},
};
Expand Down
8 changes: 5 additions & 3 deletions src/layouts/default/header/components/notify/NoticeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
:style="{ cursor: isTitleClickable ? 'pointer' : '' }"
:delete="!!item.titleDelete"
:ellipsis="
$props.titleRows > 0 ? { rows: $props.titleRows, tooltip: item.title } : false
$props.titleRows && $props.titleRows > 0
? { rows: $props.titleRows, tooltip: !!item.title }
: false
"
:content="item.title"
/>
Expand All @@ -34,8 +36,8 @@
<a-typography-paragraph
style="width: 100%; margin-bottom: 0 !important"
:ellipsis="
$props.descRows > 0
? { rows: $props.descRows, tooltip: item.description }
$props.descRows && $props.descRows > 0
? { rows: $props.descRows, tooltip: !!item.description }
: false
"
:content="item.description"
Expand Down

0 comments on commit 61d853e

Please sign in to comment.