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