Liyuan Li 5 years ago
parent
commit
d420634ed1
3 changed files with 6 additions and 1 deletions
  1. 2 0
      CHANGELOG.md
  2. 1 1
      demo/static.html
  3. 3 0
      src/ts/toolbar/Fullscreen.ts

+ 2 - 0
CHANGELOG.md

@@ -51,6 +51,8 @@
 
 ### v3.0.12 / 2020-04-0x
 
+* [276](https://github.com/Vanessa219/vditor/issues/276) 当设置编辑器宽度后,模式切换导致样式错误 `修复缺陷`
+
 ### v3.0.11 / 2020-04-05
 
 * [266](https://github.com/Vanessa219/vditor/issues/266) linkToImgUrl 图片重复上传 `修复缺陷`

+ 1 - 1
demo/static.html

@@ -35,7 +35,7 @@
     <meta property="og:image" content="https://cdn.jsdelivr.net/npm/vditor/dist/images/logo.png"/>
     <meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/vditor/dist/images/logo.png"/>
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vditor@latest/dist/index.css"/>
-    <script src="https://cdn.jsdelivr.net/npm/[email protected].7/dist/index.min.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/[email protected].11/dist/index.min.js"></script>
 </head>
 <body>
 <h2><a href="https://hacpai.com/article/1549638745630?r=Vanessa" target="_blank">Doc</a></h2>

+ 3 - 0
src/ts/toolbar/Fullscreen.ts

@@ -1,5 +1,6 @@
 import contractSVG from "../../assets/icons/contract.svg";
 import fullscreenSVG from "../../assets/icons/fullscreen.svg";
+import {setPadding} from "../ui/initUI";
 import {getEventName} from "../util/compatibility";
 import {MenuItem} from "./MenuItem";
 
@@ -40,6 +41,8 @@ export class Fullscreen extends MenuItem {
             if (menuItem.click) {
                 menuItem.click(vditor.element.classList.contains("vditor--fullscreen"));
             }
+
+            setPadding(vditor);
         });
     }
 }