This commit is contained in:
2024-07-17 16:16:08 +08:00
parent 9f224e0631
commit 5c320ebc54
3 changed files with 8 additions and 2 deletions

View File

@ -239,7 +239,7 @@ export default {
// range null // range null
let index = range ? range : 0; 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); this.Quill.setSelection(index + 1);
}, },

View File

@ -11,7 +11,7 @@ class Video extends BlockEmbed {
static create(value) { static create(value) {
const node = super.create(); const node = super.create();
// 添加video标签所需的属性 // 添加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('preload', 'auto') // auto - 当页面加载后载入整个视频 meta - 当页面加载后只载入元数据 none - 当页面加载后不载入视频
// node.setAttribute('playsinline', 'true') // node.setAttribute('playsinline', 'true')
// node.setAttribute('x-webkit-airplay', 'allow') // node.setAttribute('x-webkit-airplay', 'allow')

View File

@ -1178,6 +1178,12 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .ql-editor {
::v-deep .ql-video {
width: 100% !important;
}
}
.articleSummary { .articleSummary {
::v-deep .el-textarea__inner { ::v-deep .el-textarea__inner {
height: 100px; height: 100px;