zoukankan      html  css  js  c++  java
  • 关于使用metronic时里modal模拟框使用ueditor时不能全屏的情况

    ueditor里有这么断代码,

    1.初始显示状态下(非全屏),修改一下代码的z-index

    UE.Editor.defaultOptions = function(editor){
    
        var _url = editor.options.UEDITOR_HOME_URL;
        return {
            isShow: true,
            initialContent: '',
            initialStyle:'',
            autoClearinitialContent: false,
            iframeCssUrl: _url + 'themes/iframe.css',
            textarea: 'editorValue',
            focus: false,
            focusInEnd: true,
            autoClearEmptyNode: true,
            fullscreen: false,
            readonly: false,
            zIndex: 10052,//大于弹出模拟框即可
            imagePopup: true,
            enterTag: 'p',
            customDomain: false,
            lang: 'zh-cn',
            langPath: _url + 'lang/',
            theme: 'default',
            themePath: _url + 'themes/',
            allHtmlEnabled: false,
            scaleEnabled: false,
            tableNativeEditInFF: false,
            autoSyncData : true,
            fileNameFormat: '{time}{rand:6}'
        }
    };
    

      

    2.这里是全屏状态下的,修改后,点击全屏就不会出现被其他层遮住的情况,关键字_updateFullScreen

      _updateFullScreen:function () {
                if (this._fullscreen) {
                    var vpRect = uiUtils.getViewportRect();
                    this.getDom().style.cssText = 'border:0;position:absolute;left:0;top:' + (this.editor.options.topOffset || 0) + 'px;' + vpRect.width + 'px;height:' + vpRect.height + 'px;z-index:' + (this.getDom().style.zIndex * 1 + 1000);
                    uiUtils.setViewportOffset(this.getDom(), { left:0, top:this.editor.options.topOffset || 0 });
                    this.editor.setHeight(vpRect.height - this.getDom('toolbarbox').offsetHeight - this.getDom('bottombar').offsetHeight - (this.editor.options.topOffset || 0),true);
                    //不手动调一下,会导致全屏失效
                    if(browser.gecko){
                        try{
                            window.onresize();
                        }catch(e){
    
                        }
    
                    }
                }
            },
    

      

    只需要把z-index的值修改大点即可,详细看项目需要

    (this.getDom().style.zIndex * 1 + 10000)
    

      

    当你自认为做出了不错的功能但描述出来时又支支吾吾的时候,不要为自己说不出来而懊恼,因为不是你发挥有问题,更不要向别人解释用了啥高大上插件,别让自己成为接口程序员,请静下心回去补补基础。
  • 相关阅读:
    PPT1 例1
    皇宫看守 树形DP
    没有上司的晚会 树形DP
    将功补过 树形DP
    战略游戏 树形DP
    选课 树形DP
    二叉苹果树 树形DP
    GDOI2016总结
    加分二叉树 树形DP
    [注意]未做的题(最短路)
  • 原文地址:https://www.cnblogs.com/renyiqiu/p/5592110.html
Copyright © 2011-2022 走看看