Browse Source

:sparkles: fix #855

Vanessa 5 years ago
parent
commit
6adc751a2e
4 changed files with 13 additions and 0 deletions
  1. 4 0
      CHANGELOG.md
  2. 2 0
      src/ts/toolbar/Fullscreen.ts
  3. 3 0
      src/ts/util/Options.ts
  4. 4 0
      types/index.d.ts

+ 4 - 0
CHANGELOG.md

@@ -88,7 +88,11 @@
 
 ### v3.7.3 / 2020-12-xx
 
+* [855](https://github.com/Vanessa219/vditor/issues/855) 添加全屏 z-index 设置 `引入特性`
 * [850](https://github.com/Vanessa219/vditor/issues/850) 工具栏大纲按钮点击后焦点并未回到内容区 `改进功能`
+* 文档修改
+  * 3.7.3
+    * 添加 `options.fullscreen.index`
 
 ### v3.7.2 / 2020-12-14
 

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

@@ -15,6 +15,7 @@ export class Fullscreen extends MenuItem {
                 if (!menuItem.level) {
                     this.innerHTML = menuItem.icon;
                 }
+                vditor.element.style.zIndex = "";
                 vditor.element.classList.remove("vditor--fullscreen");
                 Object.keys(vditor.toolbar.elements).forEach((key) => {
                     const svgElement = vditor.toolbar.elements[key].firstChild as HTMLElement;
@@ -29,6 +30,7 @@ export class Fullscreen extends MenuItem {
                 if (!menuItem.level) {
                     this.innerHTML = '<svg><use xlink:href="#vditor-icon-contract"></use></svg>';
                 }
+                vditor.element.style.zIndex = vditor.options.fullscreen.index.toString();
                 vditor.element.classList.add("vditor--fullscreen");
                 Object.keys(vditor.toolbar.elements).forEach((key) => {
                     const svgElement = vditor.toolbar.elements[key].firstChild as HTMLElement;

+ 3 - 0
src/ts/util/Options.ts

@@ -20,6 +20,9 @@ export class Options {
             type: "markdown",
         },
         debugger: false,
+        fullscreen: {
+            index: 90,
+        },
         height: "auto",
         hint: {
             delay: 200,

+ 4 - 0
types/index.d.ts

@@ -484,6 +484,10 @@ interface IOptions {
     placeholder?: string;
     /** 多语言。默认值: 'zh_CN' */
     lang?: (keyof II18n);
+    /** @link https://ld246.com/article/1549638745630#options-fullscreen */
+    fullscreen?: {
+        index: number;
+    };
     /** @link https://ld246.com/article/1549638745630#options-toolbar */
     toolbar?: Array<string | IMenuItem>;
     /** @link https://ld246.com/article/1549638745630#options-resize */