Browse Source

fix: 消除Preview Options的函数定义类型错误

main
xingyu 2 years ago
parent
commit
eb96488317
  1. 2
      src/components/Loading/src/Loading.vue
  2. 4
      src/components/Preview/src/typing.ts

2
src/components/Loading/src/Loading.vue

@ -25,7 +25,7 @@ defineProps({
<section <section
v-show="loading" v-show="loading"
class="full-loading" class="full-loading"
:class="{ absolute, [theme]: !!theme }" :class="{ absolute, [`${theme}`]: !!theme }"
:style="[background ? `background-color: ${background}` : '']" :style="[background ? `background-color: ${background}` : '']"
> >
<Spin v-bind="$attrs" :tip="tip" :size="size" :spinning="loading" /> <Spin v-bind="$attrs" :tip="tip" :size="size" :spinning="loading" />

4
src/components/Preview/src/typing.ts

@ -12,8 +12,8 @@ export interface Options {
defaultWidth?: number defaultWidth?: number
maskClosable?: boolean maskClosable?: boolean
rememberState?: boolean rememberState?: boolean
onImgLoad?: (img: onImgLoadType) => void onImgLoad?: (params: onImgLoadType) => void
onImgError?: (img: onImgLoadType) => void onImgError?: (params: onImgLoadType) => void
} }
export interface Props { export interface Props {