diff --git a/src/assets/styles/antd.scss b/src/assets/styles/antd.scss index 5638c38a..84db77da 100644 --- a/src/assets/styles/antd.scss +++ b/src/assets/styles/antd.scss @@ -17,6 +17,9 @@ .ant-radio-group { font-size: 13px !important; } +.ant-select-selection-item { + font-size: 13px; +} .ant-select-item-option-content { font-size: 13px !important; } diff --git a/src/hooks/useSlideBackgroundStyle.ts b/src/hooks/useSlideBackgroundStyle.ts index fbfa15b1..c73e8c73 100644 --- a/src/hooks/useSlideBackgroundStyle.ts +++ b/src/hooks/useSlideBackgroundStyle.ts @@ -12,10 +12,12 @@ export default (background: Ref) => { return { backgroundImage: `url(${value}`, backgroundRepeat: 'repeat', + backgroundSize: 'initial', } } return { backgroundImage: `url(${value}`, + backgroundRepeat: 'no-repeat', backgroundSize: size, } } diff --git a/src/types/slides.ts b/src/types/slides.ts index 7ffb5bf3..3dc21ea8 100644 --- a/src/types/slides.ts +++ b/src/types/slides.ts @@ -153,7 +153,7 @@ export interface PPTAnimation { export interface SlideBackground { type: 'solid' | 'image'; value: string; - size?: 'cover' | 'contain' | 'repeat'; + size?: 'cover' | 'contain' | 'repeat' | 'initial'; } export interface Slide { diff --git a/src/views/Editor/Canvas/SlideBackground.vue b/src/views/Editor/Canvas/SlideBackground.vue index 39530a8e..0bd95efc 100644 --- a/src/views/Editor/Canvas/SlideBackground.vue +++ b/src/views/Editor/Canvas/SlideBackground.vue @@ -43,7 +43,6 @@ export default defineComponent({ width: 100%; height: 100%; background-position: center; - background-size: cover; position: absolute; } diff --git a/src/views/Editor/CanvasTool/index.vue b/src/views/Editor/CanvasTool/index.vue index 192cbabd..6f4ae4a3 100644 --- a/src/views/Editor/CanvasTool/index.vue +++ b/src/views/Editor/CanvasTool/index.vue @@ -1,29 +1,45 @@ diff --git a/src/views/Editor/Toolbar/SlideStylePanel.vue b/src/views/Editor/Toolbar/SlideStylePanel.vue index e37a0ee6..a949da6b 100644 --- a/src/views/Editor/Toolbar/SlideStylePanel.vue +++ b/src/views/Editor/Toolbar/SlideStylePanel.vue @@ -1,13 +1,178 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/Editor/Toolbar/common/ColorButton.vue b/src/views/Editor/Toolbar/common/ColorButton.vue new file mode 100644 index 00000000..768a02e2 --- /dev/null +++ b/src/views/Editor/Toolbar/common/ColorButton.vue @@ -0,0 +1,38 @@ + + + + + \ No newline at end of file diff --git a/src/views/Editor/Toolbar/common/ElementOutline.vue b/src/views/Editor/Toolbar/common/ElementOutline.vue index 891e07c5..25d37536 100644 --- a/src/views/Editor/Toolbar/common/ElementOutline.vue +++ b/src/views/Editor/Toolbar/common/ElementOutline.vue @@ -30,10 +30,7 @@ @update:modelValue="value => updateOutline({ color: value })" /> - +
@@ -55,8 +52,13 @@ import { MutationTypes, State } from '@/store' import { PPTElement, PPTElementOutline } from '@/types/slides' import useHistorySnapshot from '@/hooks/useHistorySnapshot' +import ColorButton from './ColorButton.vue' + export default defineComponent({ name: 'element-outline', + components: { + ColorButton, + }, setup() { const store = useStore() const handleElement: Ref = computed(() => store.getters.handleElement) @@ -104,22 +106,6 @@ export default defineComponent({ align-items: center; margin-bottom: 10px; } -.color-btn { - display: flex; - align-items: center; - padding: 0 !important; -} -.color-block { - width: 100px; - height: 20px; - background-color: #777; - margin: 0 8px; -} -.color-btn-icon { - font-size: 12px; - margin-top: 2px; - color: #bfbfbf; -} .switch-wrapper { text-align: right; } diff --git a/src/views/Editor/Toolbar/common/ElementShadow.vue b/src/views/Editor/Toolbar/common/ElementShadow.vue index ffa523c2..4c695272 100644 --- a/src/views/Editor/Toolbar/common/ElementShadow.vue +++ b/src/views/Editor/Toolbar/common/ElementShadow.vue @@ -49,10 +49,7 @@ @update:modelValue="value => updateShadow({ color: value })" /> - +
@@ -66,8 +63,13 @@ import { MutationTypes, State } from '@/store' import { PPTElement, PPTElementShadow } from '@/types/slides' import useHistorySnapshot from '@/hooks/useHistorySnapshot' +import ColorButton from './ColorButton.vue' + export default defineComponent({ name: 'element-shadow', + components: { + ColorButton, + }, setup() { const store = useStore() const handleElement: Ref = computed(() => store.getters.handleElement) @@ -115,22 +117,6 @@ export default defineComponent({ align-items: center; margin-bottom: 10px; } -.color-btn { - display: flex; - align-items: center; - padding: 0 !important; -} -.color-block { - width: 100px; - height: 20px; - background-color: #777; - margin: 0 8px; -} -.color-btn-icon { - font-size: 12px; - margin-top: 2px; - color: #bfbfbf; -} .switch-wrapper { text-align: right; } diff --git a/src/views/Screen/ScreenSlide.vue b/src/views/Screen/ScreenSlide.vue index fb8cecea..7341e98b 100644 --- a/src/views/Screen/ScreenSlide.vue +++ b/src/views/Screen/ScreenSlide.vue @@ -67,8 +67,9 @@ export default defineComponent({ transform-origin: 0 0; } .background { + width: 100%; + height: 100%; background-position: center; - background-size: cover; position: absolute; } \ No newline at end of file diff --git a/src/views/components/ThumbnailSlide/index.vue b/src/views/components/ThumbnailSlide/index.vue index 35bd54f9..5a90a354 100644 --- a/src/views/components/ThumbnailSlide/index.vue +++ b/src/views/components/ThumbnailSlide/index.vue @@ -69,8 +69,9 @@ export default defineComponent({ transform-origin: 0 0; } .background { + width: 100%; + height: 100%; background-position: center; - background-size: cover; position: absolute; } \ No newline at end of file