fix: Block Editor 文件预览窗口保存后没有提示已保存
This commit is contained in:
parent
ca9137f014
commit
bac086f261
@ -9,8 +9,12 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import { NodeViewWrapper } from '@tiptap/vue-3'
|
||||
import type { NodeViewProps } from '@tiptap/vue-3'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { t } from '@/shared/i18n'
|
||||
import FilePreviewPopup from '@/views/pagetype/file/file_preview_popup.vue'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const props = defineProps<NodeViewProps>()
|
||||
|
||||
const fileName = computed(() => props.node.attrs.fileName || '')
|
||||
@ -56,6 +60,10 @@ function handleClick() {
|
||||
}
|
||||
}
|
||||
|
||||
function onSaved() {
|
||||
message.success(t('Saved'))
|
||||
}
|
||||
|
||||
async function downloadFile() {
|
||||
try {
|
||||
const res = await fetch(fileUrl.value)
|
||||
@ -143,6 +151,7 @@ const fileColor = computed(() => {
|
||||
:row="previewRow"
|
||||
size="large"
|
||||
@close="showPreview = false"
|
||||
@saved="onSaved"
|
||||
/>
|
||||
</NodeViewWrapper>
|
||||
</template>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user