mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
update
This commit is contained in:
parent
9787261ce7
commit
2186fc0d97
33
src/components/Popover.vue
Normal file
33
src/components/Popover.vue
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<APopover trigger="click" overlayClassName="popover">
|
||||||
|
<template v-slot:content>
|
||||||
|
<slot name="content"></slot>
|
||||||
|
</template>
|
||||||
|
<slot></slot>
|
||||||
|
</APopover>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Popover } from 'ant-design-vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'popover',
|
||||||
|
components: {
|
||||||
|
APopover: Popover,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.popover {
|
||||||
|
padding-top: 6px;
|
||||||
|
|
||||||
|
.ant-popover-arrow {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.ant-popover-inner {
|
||||||
|
border: 1px solid #eee;
|
||||||
|
box-shadow: 3px 3px 3px rgba(#000, 0.15);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -10,7 +10,7 @@ const schema = new Schema({
|
|||||||
marks: schemaMarks,
|
marks: schemaMarks,
|
||||||
})
|
})
|
||||||
|
|
||||||
export const createDocument = (content: string) => {
|
const createDocument = (content: string) => {
|
||||||
const htmlString = `<div>${content}</div>`
|
const htmlString = `<div>${content}</div>`
|
||||||
const parser = new window.DOMParser()
|
const parser = new window.DOMParser()
|
||||||
const element = parser.parseFromString(htmlString, 'text/html').body.firstElementChild
|
const element = parser.parseFromString(htmlString, 'text/html').body.firstElementChild
|
||||||
|
@ -42,7 +42,7 @@ import { MutationTypes, State } from '@/store'
|
|||||||
import { EditorView } from 'prosemirror-view'
|
import { EditorView } from 'prosemirror-view'
|
||||||
import { PPTTextElement } from '@/types/slides'
|
import { PPTTextElement } from '@/types/slides'
|
||||||
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||||
import { initProsemirrorEditor, createDocument } from '@/prosemirror/'
|
import { initProsemirrorEditor } from '@/prosemirror/'
|
||||||
import useElementShadow from '@/views/components/element/hooks/useElementShadow'
|
import useElementShadow from '@/views/components/element/hooks/useElementShadow'
|
||||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user