From a660c0fa4ad5ccc5f8dfa243735932828f637601 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sun, 24 Sep 2023 20:35:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=BF=E6=8D=A2Tooltip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/directive/tooltip.ts | 2 +- src/views/Editor/CanvasTool/index.vue | 73 ++--- src/views/Editor/EditorHeader/index.vue | 17 +- src/views/Editor/ExportDialog/ExportImage.vue | 5 +- src/views/Editor/ExportDialog/ExportPPTX.vue | 5 +- .../Editor/Toolbar/ElementAnimationPanel.vue | 9 +- .../Editor/Toolbar/ElementPositionPanel.vue | 33 +-- .../ChartStylePanel/index.vue | 5 +- .../ElementStylePanel/MultiStylePanel.vue | 55 ++-- .../ElementStylePanel/ShapeStylePanel.vue | 143 ++++------ .../ElementStylePanel/TableStylePanel.vue | 81 +++--- .../ElementStylePanel/TextStylePanel.vue | 254 ++++++++---------- .../Editor/Toolbar/MultiPositionPanel.vue | 25 +- src/views/Screen/BaseView.vue | 27 +- src/views/Screen/WritingBoardTool.vue | 37 ++- 15 files changed, 298 insertions(+), 473 deletions(-) diff --git a/src/plugins/directive/tooltip.ts b/src/plugins/directive/tooltip.ts index 74ae6488..40d6b0ea 100644 --- a/src/plugins/directive/tooltip.ts +++ b/src/plugins/directive/tooltip.ts @@ -20,7 +20,7 @@ interface BindingValue { const TooltipDirective: Directive = { mounted(el: CustomHTMLElement, binding: DirectiveBinding) { let content = '' - let placement: Placement = 'auto' + let placement: Placement = 'top' let delay: Delay = [300, 0] if (typeof binding.value === 'string') { diff --git a/src/views/Editor/CanvasTool/index.vue b/src/views/Editor/CanvasTool/index.vue index b0a60815..7e50e39d 100644 --- a/src/views/Editor/CanvasTool/index.vue +++ b/src/views/Editor/CanvasTool/index.vue @@ -1,63 +1,45 @@ @@ -155,7 +143,6 @@ import { InputNumber, Divider, Button, - Tooltip, Popover, Select, Radio, diff --git a/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue b/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue index dbbfda2f..1a2d94c4 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue @@ -132,11 +132,9 @@ @update:modelValue="value => emitRichTextCommand('color', value)" /> - - - - - + + + - - - - - + + + - - - - - - + + - - - - - - - - - - - - + + + + - - - - - - + + @@ -222,15 +210,9 @@ :value="richTextAttrs.align" @change="e => emitRichTextCommand('align', e.target.value)" > - - - - - - - - - + + + - - - - - - - - - + + + @@ -285,7 +261,6 @@ import ShapeItemThumbnail from '@/views/Editor/CanvasTool/ShapeItemThumbnail.vue import { Divider, Button, - Tooltip, Popover, Slider, Select, diff --git a/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue b/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue index 165a21a2..3073b078 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue @@ -38,11 +38,9 @@ @update:modelValue="value => updateTextAttrs({ color: value })" /> - - - - - + + + - - - - - + + + - - - - - - - - - - - - + + + + - - - - - - - - - + + + @@ -201,7 +187,6 @@ import ColorPicker from '@/components/ColorPicker/index.vue' import { Divider, Button, - Tooltip, Popover, Select, Switch, diff --git a/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue b/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue index cca11f00..dbe76ec2 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue @@ -51,11 +51,9 @@ @update:modelValue="value => emitRichTextCommand('color', value)" /> - - - - - + + + - - - - - + + + - - - - - - + + - - - - - - - - - - - - + + + + - - - - - A₂ - - - - - - - + + A₂> + + - - - - - - - - - + + @@ -190,29 +173,20 @@ :value="richTextAttrs.align" @change="e => emitRichTextCommand('align', e.target.value)" > - - - - - - - - - - - - + + + +
- - - +