From f002b05cdc04c9365af164cf19bae41ad037eaf9 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu <1171051090@qq.com> Date: Wed, 6 Jan 2021 22:21:38 +0800 Subject: [PATCH] update --- src/assets/styles/antd.scss | 3 + src/assets/styles/prosemirror.scss | 2 +- src/assets/styles/variable.scss | 3 +- src/configs/element.ts | 2 +- src/views/Editor/CanvasTool/index.vue | 8 +- src/views/Editor/EditorHeader/index.vue | 2 +- .../ElementStylePanel/TextStylePanel.vue | 105 ++++------------ .../Editor/Toolbar/common/ElementOpacity.vue | 48 +++++++ .../Editor/Toolbar/common/ElementOutline.vue | 118 ++++++++++++++++++ .../Editor/Toolbar/common/ElementShadow.vue | 117 +++++++++++++++++ .../element/hooks/useElementOutline.ts | 2 +- vue.config.js | 4 +- 12 files changed, 321 insertions(+), 93 deletions(-) create mode 100644 src/views/Editor/Toolbar/common/ElementOpacity.vue create mode 100644 src/views/Editor/Toolbar/common/ElementOutline.vue create mode 100644 src/views/Editor/Toolbar/common/ElementShadow.vue diff --git a/src/assets/styles/antd.scss b/src/assets/styles/antd.scss index 2fbd90ff..98ae6838 100644 --- a/src/assets/styles/antd.scss +++ b/src/assets/styles/antd.scss @@ -13,4 +13,7 @@ } .ant-btn { font-size: 13px !important; +} +.ant-select-item-option-content { + font-size: 13px !important; } \ No newline at end of file diff --git a/src/assets/styles/prosemirror.scss b/src/assets/styles/prosemirror.scss index 484d75d6..6ef220c7 100644 --- a/src/assets/styles/prosemirror.scss +++ b/src/assets/styles/prosemirror.scss @@ -7,7 +7,7 @@ font-family: '微软雅黑'; ::selection { - background-color: rgba(#41464b, 0.3); + background-color: rgba(#d14424, 0.3); color: inherit; } diff --git a/src/assets/styles/variable.scss b/src/assets/styles/variable.scss index 23c0af56..6a9783d2 100644 --- a/src/assets/styles/variable.scss +++ b/src/assets/styles/variable.scss @@ -1,2 +1,3 @@ -$themeColor: #41464b; +$themeColor: #d14424; +$textColor: #41464b; $borderRadius: 2px; \ No newline at end of file diff --git a/src/configs/element.ts b/src/configs/element.ts index 54c347ca..92f045ed 100644 --- a/src/configs/element.ts +++ b/src/configs/element.ts @@ -1,4 +1,4 @@ -const DEFAULT_COLOR = '#41464b' +const DEFAULT_COLOR = '#d14424' export const ELEMENT_TYPE = { 'text': '文本', diff --git a/src/views/Editor/CanvasTool/index.vue b/src/views/Editor/CanvasTool/index.vue index 782e93c6..40be0359 100644 --- a/src/views/Editor/CanvasTool/index.vue +++ b/src/views/Editor/CanvasTool/index.vue @@ -16,7 +16,7 @@ - + @@ -100,7 +100,7 @@ export default defineComponent({ } const isOpenShapePool = ref(false) - const isOpenlinePool = ref(false) + const isOpenLinePool = ref(false) const drawText = () => { store.commit(MutationTypes.SET_CREATING_ELEMENT, { type: 'text', @@ -119,7 +119,7 @@ export default defineComponent({ type: 'line', data: line, }) - isOpenShapePool.value = false + isOpenLinePool.value = false } return { @@ -131,7 +131,7 @@ export default defineComponent({ undo, insertImageElement, isOpenShapePool, - isOpenlinePool, + isOpenLinePool, drawText, drawShape, drawLine, diff --git a/src/views/Editor/EditorHeader/index.vue b/src/views/Editor/EditorHeader/index.vue index f6965769..a75e704f 100644 --- a/src/views/Editor/EditorHeader/index.vue +++ b/src/views/Editor/EditorHeader/index.vue @@ -45,7 +45,7 @@ export default defineComponent({ } .menu-item { font-size: 13px; - color: $themeColor; + color: $textColor; margin: 0 10px; cursor: pointer; diff --git a/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue b/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue index 59e60707..a985ce49 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue @@ -96,76 +96,31 @@ -
-
描边样式:
- -
-
-
描边颜色:
- - - - -
-
-
描边粗细:
- -
+ -
-
水平阴影:
- -
-
-
垂直阴影:
- -
-
-
模糊距离:
- -
-
-
阴影颜色:
- - - - -
+ -
-
透明度:
- -
+ + + \ No newline at end of file diff --git a/src/views/Editor/Toolbar/common/ElementOutline.vue b/src/views/Editor/Toolbar/common/ElementOutline.vue new file mode 100644 index 00000000..986c3e4b --- /dev/null +++ b/src/views/Editor/Toolbar/common/ElementOutline.vue @@ -0,0 +1,118 @@ + + + + + \ No newline at end of file diff --git a/src/views/Editor/Toolbar/common/ElementShadow.vue b/src/views/Editor/Toolbar/common/ElementShadow.vue new file mode 100644 index 00000000..baf6fa20 --- /dev/null +++ b/src/views/Editor/Toolbar/common/ElementShadow.vue @@ -0,0 +1,117 @@ + + + + + \ No newline at end of file diff --git a/src/views/components/element/hooks/useElementOutline.ts b/src/views/components/element/hooks/useElementOutline.ts index 00cf2a35..4ee9f240 100644 --- a/src/views/components/element/hooks/useElementOutline.ts +++ b/src/views/components/element/hooks/useElementOutline.ts @@ -4,7 +4,7 @@ import { PPTElementOutline } from '@/types/slides' export default (outline: Ref) => { const outlineWidth = computed(() => (outline.value && outline.value.width !== undefined) ? outline.value.width : 0) const outlineStyle = computed(() => (outline.value && outline.value.style !== undefined) ? outline.value.style : 'solid') - const outlineColor = computed(() => (outline.value && outline.value.color !== undefined) ? outline.value.color : '#41464b') + const outlineColor = computed(() => (outline.value && outline.value.color !== undefined) ? outline.value.color : '#d14424') return { outlineWidth, diff --git a/vue.config.js b/vue.config.js index 8014c906..04edf44f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -12,8 +12,8 @@ module.exports = { less: { lessOptions: { modifyVars: { - 'primary-color': '#41464b', - 'link-color': '#41464b', + 'primary-color': '#d14424', + 'link-color': '#d14424', }, javascriptEnabled: true, },