From ec15ac88956c4537b00d04d6329feb80a0851d52 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu <1171051090@qq.com> Date: Wed, 13 Jan 2021 22:36:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BB=E7=81=AF=E7=89=87=E6=94=BE=E6=98=A0?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Screen/SlideThumbnails.vue | 68 ++++++++++++++ src/views/Screen/WritingBoardTool.vue | 109 ++++++++++++++++++++++ src/views/Screen/index.vue | 128 ++++---------------------- 3 files changed, 195 insertions(+), 110 deletions(-) create mode 100644 src/views/Screen/SlideThumbnails.vue create mode 100644 src/views/Screen/WritingBoardTool.vue diff --git a/src/views/Screen/SlideThumbnails.vue b/src/views/Screen/SlideThumbnails.vue new file mode 100644 index 0000000..0a564ef --- /dev/null +++ b/src/views/Screen/SlideThumbnails.vue @@ -0,0 +1,68 @@ + + + + + \ No newline at end of file diff --git a/src/views/Screen/WritingBoardTool.vue b/src/views/Screen/WritingBoardTool.vue new file mode 100644 index 0000000..e6f632e --- /dev/null +++ b/src/views/Screen/WritingBoardTool.vue @@ -0,0 +1,109 @@ + + + + + \ No newline at end of file diff --git a/src/views/Screen/index.vue b/src/views/Screen/index.vue index d54b68d..b553be6 100644 --- a/src/views/Screen/index.vue +++ b/src/views/Screen/index.vue @@ -35,49 +35,25 @@ -
-
- -
-
+
- -
- - + + @@ -97,17 +73,15 @@ import { KEYS } from '@/configs/hotkey' import { ContextmenuItem } from '@/components/Contextmenu/types' import ScreenSlide from './ScreenSlide.vue' -import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue' -import WritingBoard from '@/components/WritingBoard.vue' - -const writingBoardColors = ['#000000', '#ffffff', '#1e497b', '#4e81bb', '#e2534d', '#9aba60', '#8165a0', '#47acc5', '#f9974c'] +import SlideThumbnails from './SlideThumbnails.vue' +import WritingBoardTool from './WritingBoardTool.vue' export default defineComponent({ name: 'screen', components: { ScreenSlide, - ThumbnailSlide, - WritingBoard, + SlideThumbnails, + WritingBoardTool, }, setup() { const store = useStore() @@ -119,13 +93,10 @@ export default defineComponent({ const slideHeight = ref(0) const scale = computed(() => slideWidth.value / VIEWPORT_SIZE) - const slideListModelVisible = ref(false) + const slideThumbnailModelVisible = ref(false) - const writingBoardRef = ref() const writingBoardVisible = ref(false) - const writingBoardConfigsVisible = ref(false) - const writingBoardColor = ref('#e2534d') - const writingBoardModel = ref('pen') + const writingBoardToolVisible = ref(false) const setSlideContentSize = () => { const winWidth = document.body.clientWidth @@ -223,7 +194,7 @@ export default defineComponent({ } const turnSlideToIndex = (index: number) => { - slideListModelVisible.value = false + slideThumbnailModelVisible.value = false store.commit(MutationTypes.UPDATE_SLIDE_INDEX, index) animationIndex.value = 0 } @@ -260,14 +231,10 @@ export default defineComponent({ contextmenus, execPrev, execNext, - slideListModelVisible, - writingBoardVisible, - writingBoardConfigsVisible, + slideThumbnailModelVisible, turnSlideToIndex, - writingBoardRef, - writingBoardColors, - writingBoardColor, - writingBoardModel, + writingBoardVisible, + writingBoardToolVisible, } }, }) @@ -366,63 +333,4 @@ export default defineComponent({ margin-left: 8px; } } - -.slide-list-model { - height: 600px; - padding: 5px 10px; - display: flex; - flex-wrap: wrap; - align-content: flex-start; - overflow: overlay; - - .thumbnail { - width: 150px; - margin-bottom: 12px; - outline: 1px solid rgba($color: $themeColor, $alpha: .1); - - &.active { - outline-color: $themeColor; - } - - &:not(:nth-child(6n)) { - margin-right: 12px; - } - } -} - -.writing-board-configs { - font-size: 12px; - - .btn { - padding: 3px 10px; - margin: 0 -10px; - margin-bottom: 3px; - cursor: pointer; - - &:hover { - background-color: #ccc; - } - } - .colors { - display: flex; - margin-top: 8px; - } - .color { - width: 15px; - height: 15px; - outline: 1px solid #ccc; - cursor: pointer; - - &:hover { - transform: scale(1.1); - } - &.active { - outline: 2px solid $themeColor; - } - - & + .color { - margin-left: 5px; - } - } -} \ No newline at end of file