mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 19:29:02 +08:00
refactoring
This commit is contained in:
parent
e419b6cedf
commit
c55f710250
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Fuse from 'fuse.js'
|
import Fuse from 'fuse.js'
|
||||||
import tippy, { roundArrow, sticky } from 'tippy.js'
|
import tippy, { sticky } from 'tippy.js'
|
||||||
import Icon from 'Components/Icon'
|
import Icon from 'Components/Icon'
|
||||||
import { Editor, EditorContent, EditorMenuBar } from 'tiptap'
|
import { Editor, EditorContent, EditorMenuBar } from 'tiptap'
|
||||||
import {
|
import {
|
||||||
@ -46,7 +46,6 @@ import {
|
|||||||
Bold,
|
Bold,
|
||||||
Italic,
|
Italic,
|
||||||
} from 'tiptap-extensions'
|
} from 'tiptap-extensions'
|
||||||
import 'tippy.js/dist/svg-arrow.css'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
@ -222,7 +221,6 @@ export default {
|
|||||||
getReferenceClientRect: node.getBoundingClientRect,
|
getReferenceClientRect: node.getBoundingClientRect,
|
||||||
appendTo: () => document.body,
|
appendTo: () => document.body,
|
||||||
interactive: true,
|
interactive: true,
|
||||||
arrow: roundArrow,
|
|
||||||
sticky: true, // make sure position of tippy is updated when content changes
|
sticky: true, // make sure position of tippy is updated when content changes
|
||||||
plugins: [sticky],
|
plugins: [sticky],
|
||||||
content: this.$refs.suggestions,
|
content: this.$refs.suggestions,
|
||||||
@ -301,29 +299,5 @@ export default {
|
|||||||
text-align: inherit;
|
text-align: inherit;
|
||||||
color: $color-white;
|
color: $color-white;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
||||||
&[data-placement^=top]>.tippy-arrow:before {
|
|
||||||
border-top-color: $color-black;
|
|
||||||
}
|
|
||||||
|
|
||||||
&[data-placement^=bottom]>.tippy-arrow:before {
|
|
||||||
border-bottom-color: $color-black;
|
|
||||||
}
|
|
||||||
|
|
||||||
&[data-placement^=left]>.tippy-arrow:before {
|
|
||||||
border-left-color: $color-black;
|
|
||||||
}
|
|
||||||
|
|
||||||
&[data-placement^=right]>.tippy-arrow:before {
|
|
||||||
border-right-color: $color-black;
|
|
||||||
}
|
|
||||||
|
|
||||||
&>.tippy-backdrop {
|
|
||||||
background-color: $color-black;
|
|
||||||
}
|
|
||||||
|
|
||||||
&>.tippy-svg-arrow {
|
|
||||||
fill: $color-black;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user