style(contenteditable): 为 contenteditable 组件添加全屏样式
- 在 contenteditable 组件的最外层 div 上添加 screen 类 - 在样式中定义 screen 类,设置宽度为 100% - 这个修改旨在解决 contenteditable 在移动端全屏显示的问题
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="className">
|
<div :class="className" class="screen">
|
||||||
<div class="flex contenteditable align-center space-between">
|
<div class="flex contenteditable align-center space-between">
|
||||||
<p
|
<p
|
||||||
:id="'editor' + id"
|
:id="'editor' + id"
|
||||||
@@ -299,6 +299,9 @@ const insertImageAtCaret = (html) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.screen {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.contenteditable-content {
|
.contenteditable-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user