fix: 移除不正确的背景图类型(原始大小)

This commit is contained in:
pipipi-pikachu 2021-08-11 22:53:47 +08:00
parent 2ae2742cfc
commit cc75249551
3 changed files with 3 additions and 4 deletions

View File

@ -27,7 +27,7 @@ export default (background: Ref<SlideBackground | undefined>) => {
return {
backgroundImage: `url(${image}`,
backgroundRepeat: 'repeat',
backgroundSize: 'initial',
backgroundSize: 'contain',
}
}
return {

View File

@ -178,7 +178,7 @@ export interface SlideBackground {
type: 'solid' | 'image' | 'gradient';
color?: string;
image?: string;
imageSize?: 'cover' | 'contain' | 'repeat' | 'initial';
imageSize?: 'cover' | 'contain' | 'repeat';
gradientType?: 'linear' | 'radial';
gradientColor?: [string, string];
gradientRotate?: number;

View File

@ -25,11 +25,10 @@
<Select
style="flex: 10;"
:value="background.size || 'cover'"
:value="background.imageSize || 'cover'"
@change="value => updateBackground({ imageSize: value })"
v-else-if="background.type === 'image'"
>
<SelectOption value="initial">原始大小</SelectOption>
<SelectOption value="contain">缩放</SelectOption>
<SelectOption value="repeat">拼贴</SelectOption>
<SelectOption value="cover">缩放铺满</SelectOption>