From 33f976b1eaa02e745438811b320ec790f5686123 Mon Sep 17 00:00:00 2001 From: Timi Date: Fri, 28 Aug 2026 17:45:38 +0800 Subject: [PATCH] fix iframe style --- .../tiptap-editor/TiptapIframeButton.vue | 91 +++++++++++++------ .../tiptap-editor/TiptapLinkButton.vue | 1 + 2 files changed, 65 insertions(+), 27 deletions(-) diff --git a/src/components/tiptap-editor/TiptapIframeButton.vue b/src/components/tiptap-editor/TiptapIframeButton.vue index 13d7fc2..54b4659 100644 --- a/src/components/tiptap-editor/TiptapIframeButton.vue +++ b/src/components/tiptap-editor/TiptapIframeButton.vue @@ -1,5 +1,5 @@ @@ -53,6 +80,14 @@ const iframeForm = reactive({ height: "28rem" }); +function setWidth(width: "auto" | "100%") { + iframeForm.width = width; +} + +function setHeight() { + iframeForm.height = "auto"; +} + function openDialog() { if (!props.editor) { return; @@ -105,19 +140,21 @@ async function onConfirm() { diff --git a/src/components/tiptap-editor/TiptapLinkButton.vue b/src/components/tiptap-editor/TiptapLinkButton.vue index 3f6e422..d298993 100644 --- a/src/components/tiptap-editor/TiptapLinkButton.vue +++ b/src/components/tiptap-editor/TiptapLinkButton.vue @@ -101,6 +101,7 @@ function onConfirm() {