From 5c320ebc54ec5cd0dd9910c278d3c72ca29a29b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Wed, 17 Jul 2024 16:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/index.vue | 2 +- src/utils/quillVideo.js | 2 +- src/views/manage/propaganda/index.vue | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index fee10ea..d2bd55f 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -239,7 +239,7 @@ export default { // 获取光标位置:当编辑器中没有输入文本时,这里获取到的 range 为 null let index = range ? range : 0; // 在光标所在位置 插入视频 - this.Quill.insertEmbed(index, "video", { url: videoLink, poster: 'https://7up.pics/images/2024/01/23/101sh.png' }); + this.Quill.insertEmbed(index, "video", { url: videoLink }); // 调整光标到最后 this.Quill.setSelection(index + 1); }, diff --git a/src/utils/quillVideo.js b/src/utils/quillVideo.js index 73d1634..32312aa 100644 --- a/src/utils/quillVideo.js +++ b/src/utils/quillVideo.js @@ -11,7 +11,7 @@ class Video extends BlockEmbed { static create(value) { const node = super.create(); // 添加video标签所需的属性 - node.setAttribute('style', 'object-fit:fill;width: 30%;') + node.setAttribute('style', 'object-fit:fill;width: 100%;') node.setAttribute('preload', 'auto') // auto - 当页面加载后载入整个视频 meta - 当页面加载后只载入元数据 none - 当页面加载后不载入视频 // node.setAttribute('playsinline', 'true') // node.setAttribute('x-webkit-airplay', 'allow') diff --git a/src/views/manage/propaganda/index.vue b/src/views/manage/propaganda/index.vue index 9005c0e..37129f6 100644 --- a/src/views/manage/propaganda/index.vue +++ b/src/views/manage/propaganda/index.vue @@ -1178,6 +1178,12 @@ export default { };