Browse Source

style(types): fix some type statement

pull/1073/head
无木 5 years ago
parent
commit
61d853e6a5
  1. 2
      src/components/Application/src/AppLogo.vue
  2. 4
      src/components/Cropper/src/CopperModal.vue
  3. 8
      src/layouts/default/header/components/notify/NoticeList.vue

2
src/components/Application/src/AppLogo.vue

@ -23,7 +23,7 @@
/** /**
* The theme of the current parent component * 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 * Whether to show title
*/ */

4
src/components/Cropper/src/CopperModal.vue

@ -122,10 +122,12 @@
import { isFunction } from '/@/utils/is'; import { isFunction } from '/@/utils/is';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
type apiFunParams = { file: Blob; name: string; filename: string };
const props = { const props = {
circled: { type: Boolean, default: true }, circled: { type: Boolean, default: true },
uploadApi: { uploadApi: {
type: Function as PropType<({ file: Blob, name: string, filename: string }) => Promise<any>>, type: Function as PropType<(params: apiFunParams) => Promise<any>>,
}, },
}; };

8
src/layouts/default/header/components/notify/NoticeList.vue

@ -11,7 +11,9 @@
:style="{ cursor: isTitleClickable ? 'pointer' : '' }" :style="{ cursor: isTitleClickable ? 'pointer' : '' }"
:delete="!!item.titleDelete" :delete="!!item.titleDelete"
:ellipsis=" :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" :content="item.title"
/> />
@ -34,8 +36,8 @@
<a-typography-paragraph <a-typography-paragraph
style="width: 100%; margin-bottom: 0 !important" style="width: 100%; margin-bottom: 0 !important"
:ellipsis=" :ellipsis="
$props.descRows > 0 $props.descRows && $props.descRows > 0
? { rows: $props.descRows, tooltip: item.description } ? { rows: $props.descRows, tooltip: !!item.description }
: false : false
" "
:content="item.description" :content="item.description"

Loading…
Cancel
Save