From bd2d08c9ff3189d1047c6ae4a13b8bbde709d882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9A=AE=E5=85=89=EF=BC=9A=E5=9F=8E=E4=B8=AD=E5=9F=8E?= <806783409@qq.com> Date: Sat, 26 Dec 2020 13:43:19 +0800 Subject: [PATCH] =?UTF-8?q?#I262OZ=20=E7=BC=96=E8=BE=91=E6=A1=86=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zyplayer-doc-ui/wiki-ui/src/views/page/Edit.vue | 4 ++-- .../main/resources/css/{app.e1e856e7.css => app.d1dc89b9.css} | 2 +- ...hunk-4b763d50.7e74e765.css => chunk-4b763d50.edd147c5.css} | 2 +- ...hunk-5544a2b8.b3d0f39b.css => chunk-5544a2b8.17d2b8a1.css} | 0 zyplayer-doc-wiki/src/main/resources/doc-wiki.html | 2 +- .../main/resources/js/{app.f4439c4e.js => app.1467f310.js} | 2 +- ...{chunk-07e56bb7.476081ea.js => chunk-07e56bb7.ca7575bc.js} | 0 ...{chunk-34407190.0d583c2d.js => chunk-34407190.69ced152.js} | 0 ...{chunk-4b763d50.67c6b108.js => chunk-4b763d50.e8bf0362.js} | 2 +- ...{chunk-5544a2b8.6714a421.js => chunk-5544a2b8.774dc497.js} | 0 ...{chunk-578c28a7.6a10864d.js => chunk-578c28a7.54a578cc.js} | 0 ...{chunk-5dc97978.14484106.js => chunk-5dc97978.1238356c.js} | 0 12 files changed, 7 insertions(+), 7 deletions(-) rename zyplayer-doc-wiki/src/main/resources/css/{app.e1e856e7.css => app.d1dc89b9.css} (61%) rename zyplayer-doc-wiki/src/main/resources/css/{chunk-4b763d50.7e74e765.css => chunk-4b763d50.edd147c5.css} (90%) rename zyplayer-doc-wiki/src/main/resources/css/{chunk-5544a2b8.b3d0f39b.css => chunk-5544a2b8.17d2b8a1.css} (100%) rename zyplayer-doc-wiki/src/main/resources/js/{app.f4439c4e.js => app.1467f310.js} (82%) rename zyplayer-doc-wiki/src/main/resources/js/{chunk-07e56bb7.476081ea.js => chunk-07e56bb7.ca7575bc.js} (100%) rename zyplayer-doc-wiki/src/main/resources/js/{chunk-34407190.0d583c2d.js => chunk-34407190.69ced152.js} (100%) rename zyplayer-doc-wiki/src/main/resources/js/{chunk-4b763d50.67c6b108.js => chunk-4b763d50.e8bf0362.js} (94%) rename zyplayer-doc-wiki/src/main/resources/js/{chunk-5544a2b8.6714a421.js => chunk-5544a2b8.774dc497.js} (100%) rename zyplayer-doc-wiki/src/main/resources/js/{chunk-578c28a7.6a10864d.js => chunk-578c28a7.54a578cc.js} (100%) rename zyplayer-doc-wiki/src/main/resources/js/{chunk-5dc97978.14484106.js => chunk-5dc97978.1238356c.js} (100%) diff --git a/zyplayer-doc-ui/wiki-ui/src/views/page/Edit.vue b/zyplayer-doc-ui/wiki-ui/src/views/page/Edit.vue index 54e31e30..0c919851 100644 --- a/zyplayer-doc-ui/wiki-ui/src/views/page/Edit.vue +++ b/zyplayer-doc-ui/wiki-ui/src/views/page/Edit.vue @@ -32,7 +32,7 @@ -
+
@@ -275,7 +275,7 @@ .page-edit-vue .upload-page-file .el-upload-list{display: none;} .page-edit-vue .is-link{color: #1e88e5;cursor: pointer;} /*编辑框高度*/ - .page-edit-vue #newPageContentDiv .w-e-text-container{height: 600px !important;} + .page-edit-vue #newPageContentDiv .w-e-text-container{height: 100% !important;} /*评论*/ .page-edit-vue .comment-box .head{ float: left;background-color: #ccc;border-radius: 50%;margin-right: 10px; diff --git a/zyplayer-doc-wiki/src/main/resources/css/app.e1e856e7.css b/zyplayer-doc-wiki/src/main/resources/css/app.d1dc89b9.css similarity index 61% rename from zyplayer-doc-wiki/src/main/resources/css/app.e1e856e7.css rename to zyplayer-doc-wiki/src/main/resources/css/app.d1dc89b9.css index b9839cdf..db332816 100644 --- a/zyplayer-doc-wiki/src/main/resources/css/app.e1e856e7.css +++ b/zyplayer-doc-wiki/src/main/resources/css/app.d1dc89b9.css @@ -1 +1 @@ -::-webkit-scrollbar{width:6px;height:9px;-webkit-appearance:none}::-webkit-scrollbar-thumb{background:#ddd;border-radius:10px}::-webkit-scrollbar-track-piece{background:#eee}body,html{margin:0;padding:0}#app,.el-container,.el-menu,.global-layout-vue,body,html{height:100%}.el-header{background-color:#1d4e89!important;color:#333;line-height:40px;text-align:right;height:40px!important}.icon-collapse{float:left;font-size:25px;color:#aaa;margin-top:8px;cursor:pointer}.icon-collapse:hover{color:#eee}.head-icon{margin-right:15px;font-size:16px;cursor:pointer;color:#fff}.header-user-message .page-info-box{text-align:right;margin-top:10px}#app[data-v-3799a29f],body[data-v-3799a29f],html[data-v-3799a29f]{margin:0;padding:0;height:100%}pre[data-v-3799a29f]{margin:0;white-space:pre-wrap;font-size:14px;font-family:auto}.el-menu[data-v-3799a29f]{-webkit-box-sizing:border-box;box-sizing:border-box;border-right:0;margin-right:3px}.el-header[data-v-3799a29f]{background-color:#409eff;color:#333;line-height:40px;text-align:right;height:40px!important}.doc-body-box[data-v-3799a29f]{overflow-x:hidden;overflow-y:auto;width:100%;padding:10px;border-left:1px solid #f1f1f1;-webkit-box-sizing:border-box;box-sizing:border-box}.el-tree[data-v-3799a29f]{margin-right:3px}.logo[data-v-3799a29f]{border-bottom:1px solid #f1f1f1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:5px 10px;width:260px;height:40px;line-height:40px;font-size:25px;color:#666;text-align:center}.icon-collapse[data-v-3799a29f]{float:left;font-size:25px;color:#aaa;cursor:pointer;position:fixed}.icon-collapse[data-v-3799a29f]:hover{color:#ccc}.comment-box .head[data-v-3799a29f]{float:left;background-color:#ccc;border-radius:50%;margin-right:10px;width:45px;height:45px;line-height:45px;text-align:center;color:#fff}.build-info[data-v-3799a29f]{position:fixed;bottom:0;left:0;background:#fafafa;width:240px;text-align:center;padding:5px 0;color:#aaa;font-size:12px}.build-info span[data-v-3799a29f]{color:#4183c4;cursor:pointer} \ No newline at end of file +::-webkit-scrollbar{width:6px;height:9px;-webkit-appearance:none}::-webkit-scrollbar-thumb{background:#ddd;border-radius:10px}::-webkit-scrollbar-track-piece{background:#eee}body,html{margin:0;padding:0}#app,.el-container,.el-menu,.global-layout-vue,body,html{height:100%}.el-header{background-color:#1d4e89!important;color:#333;line-height:40px;text-align:right;height:40px!important}.icon-collapse{float:left;font-size:25px;color:#aaa;margin-top:8px;cursor:pointer}.icon-collapse:hover{color:#eee}.head-icon{margin-right:15px;font-size:16px;cursor:pointer;color:#fff}.header-user-message .page-info-box{text-align:right;margin-top:10px}#app[data-v-8f7ddbbc],body[data-v-8f7ddbbc],html[data-v-8f7ddbbc]{margin:0;padding:0;height:100%}pre[data-v-8f7ddbbc]{margin:0;white-space:pre-wrap;font-size:14px;font-family:auto}.el-menu[data-v-8f7ddbbc]{-webkit-box-sizing:border-box;box-sizing:border-box;border-right:0;margin-right:3px}.el-header[data-v-8f7ddbbc]{background-color:#409eff;color:#333;line-height:40px;text-align:right;height:40px!important}.doc-body-box[data-v-8f7ddbbc]{overflow-x:hidden;overflow-y:auto;width:100%;padding:10px;border-left:1px solid #f1f1f1;-webkit-box-sizing:border-box;box-sizing:border-box}.el-tree[data-v-8f7ddbbc]{margin-right:3px}.logo[data-v-8f7ddbbc]{border-bottom:1px solid #f1f1f1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:5px 10px;width:260px;height:40px;line-height:40px;font-size:25px;color:#666;text-align:center}.icon-collapse[data-v-8f7ddbbc]{float:left;font-size:25px;color:#aaa;cursor:pointer;position:fixed}.icon-collapse[data-v-8f7ddbbc]:hover{color:#ccc}.comment-box .head[data-v-8f7ddbbc]{float:left;background-color:#ccc;border-radius:50%;margin-right:10px;width:45px;height:45px;line-height:45px;text-align:center;color:#fff}.build-info[data-v-8f7ddbbc]{position:fixed;bottom:0;left:0;background:#fafafa;width:240px;text-align:center;padding:5px 0;color:#aaa;font-size:12px}.build-info span[data-v-8f7ddbbc]{color:#4183c4;cursor:pointer} \ No newline at end of file diff --git a/zyplayer-doc-wiki/src/main/resources/css/chunk-4b763d50.7e74e765.css b/zyplayer-doc-wiki/src/main/resources/css/chunk-4b763d50.edd147c5.css similarity index 90% rename from zyplayer-doc-wiki/src/main/resources/css/chunk-4b763d50.7e74e765.css rename to zyplayer-doc-wiki/src/main/resources/css/chunk-4b763d50.edd147c5.css index 8aee7b5c..c04b4cc7 100644 --- a/zyplayer-doc-wiki/src/main/resources/css/chunk-4b763d50.7e74e765.css +++ b/zyplayer-doc-wiki/src/main/resources/css/chunk-4b763d50.edd147c5.css @@ -1 +1 @@ -@font-face{font-family:fontello;src:url(../fonts/fontello.e73a0647.eot);src:url(../fonts/fontello.e73a0647.eot#iefix) format("embedded-opentype"),url(../fonts/fontello.8d4a4e6f.woff2) format("woff2"),url(../fonts/fontello.a782baa8.woff) format("woff"),url(../fonts/fontello.068ca2b3.ttf) format("truetype"),url(../img/fontello.9354499c.svg#fontello) format("svg");font-weight:400;font-style:normal}[class*=" fa-mavon-"]:before,[class^=fa-mavon-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-mavon-bold:before{content:"\E800"}.fa-mavon-italic:before{content:"\E801"}.fa-mavon-thumb-tack:before{content:"\E802"}.fa-mavon-link:before{content:"\E803"}.fa-mavon-picture-o:before{content:"\E804"}.fa-mavon-repeat:before{content:"\E805"}.fa-mavon-undo:before{content:"\E806"}.fa-mavon-trash-o:before{content:"\E807"}.fa-mavon-floppy-o:before{content:"\E808"}.fa-mavon-compress:before{content:"\E809"}.fa-mavon-eye:before{content:"\E80A"}.fa-mavon-eye-slash:before{content:"\E80B"}.fa-mavon-question-circle:before{content:"\E80C"}.fa-mavon-times:before{content:"\E80D"}.fa-mavon-align-left:before{content:"\E80F"}.fa-mavon-align-center:before{content:"\E810"}.fa-mavon-align-right:before{content:"\E811"}.fa-mavon-arrows-alt:before{content:"\F0B2"}.fa-mavon-bars:before{content:"\F0C9"}.fa-mavon-list-ul:before{content:"\F0CA"}.fa-mavon-list-ol:before{content:"\F0CB"}.fa-mavon-strikethrough:before{content:"\F0CC"}.fa-mavon-underline:before{content:"\F0CD"}.fa-mavon-table:before{content:"\F0CE"}.fa-mavon-columns:before{content:"\F0DB"}.fa-mavon-quote-left:before{content:"\F10D"}.fa-mavon-code:before{content:"\F121"}.fa-mavon-superscript:before{content:"\F12B"}.fa-mavon-subscript:before{content:"\F12C"}.fa-mavon-header:before{content:"\F1DC"}.fa-mavon-window-maximize:before{content:"\F2D0"}.markdown-body strong{font-weight:bolder}.markdown-body .hljs-center{text-align:center}.markdown-body .hljs-right{text-align:right}.markdown-body .hljs-left{text-align:left}.page-edit-vue .icon-collapse{float:left;font-size:25px;color:#aaa;margin-top:8px;cursor:pointer}.page-edit-vue .icon-collapse:hover{color:#eee}.page-edit-vue .wiki-title{font-size:20px}.page-edit-vue .wiki-author{font-size:14px;color:#888;padding:20px 0;height:40px;line-height:40px}.page-edit-vue .wiki-content{font-size:14px}.page-edit-vue .wiki-content.w-e-text{overflow-y:auto}.page-edit-vue .upload-page-file .el-upload-list{display:none}.page-edit-vue .is-link{color:#1e88e5;cursor:pointer}.page-edit-vue #newPageContentDiv .w-e-text-container{height:600px!important}.page-edit-vue .comment-box .head{float:left;background-color:#ccc;border-radius:50%;margin-right:10px;width:45px;height:45px;line-height:45px;text-align:center;color:#fff}.page-edit-vue .page-content-editor,.page-edit-vue .page-title-input{padding:10px 0} \ No newline at end of file +@font-face{font-family:fontello;src:url(../fonts/fontello.e73a0647.eot);src:url(../fonts/fontello.e73a0647.eot#iefix) format("embedded-opentype"),url(../fonts/fontello.8d4a4e6f.woff2) format("woff2"),url(../fonts/fontello.a782baa8.woff) format("woff"),url(../fonts/fontello.068ca2b3.ttf) format("truetype"),url(../img/fontello.9354499c.svg#fontello) format("svg");font-weight:400;font-style:normal}[class*=" fa-mavon-"]:before,[class^=fa-mavon-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-mavon-bold:before{content:"\E800"}.fa-mavon-italic:before{content:"\E801"}.fa-mavon-thumb-tack:before{content:"\E802"}.fa-mavon-link:before{content:"\E803"}.fa-mavon-picture-o:before{content:"\E804"}.fa-mavon-repeat:before{content:"\E805"}.fa-mavon-undo:before{content:"\E806"}.fa-mavon-trash-o:before{content:"\E807"}.fa-mavon-floppy-o:before{content:"\E808"}.fa-mavon-compress:before{content:"\E809"}.fa-mavon-eye:before{content:"\E80A"}.fa-mavon-eye-slash:before{content:"\E80B"}.fa-mavon-question-circle:before{content:"\E80C"}.fa-mavon-times:before{content:"\E80D"}.fa-mavon-align-left:before{content:"\E80F"}.fa-mavon-align-center:before{content:"\E810"}.fa-mavon-align-right:before{content:"\E811"}.fa-mavon-arrows-alt:before{content:"\F0B2"}.fa-mavon-bars:before{content:"\F0C9"}.fa-mavon-list-ul:before{content:"\F0CA"}.fa-mavon-list-ol:before{content:"\F0CB"}.fa-mavon-strikethrough:before{content:"\F0CC"}.fa-mavon-underline:before{content:"\F0CD"}.fa-mavon-table:before{content:"\F0CE"}.fa-mavon-columns:before{content:"\F0DB"}.fa-mavon-quote-left:before{content:"\F10D"}.fa-mavon-code:before{content:"\F121"}.fa-mavon-superscript:before{content:"\F12B"}.fa-mavon-subscript:before{content:"\F12C"}.fa-mavon-header:before{content:"\F1DC"}.fa-mavon-window-maximize:before{content:"\F2D0"}.markdown-body strong{font-weight:bolder}.markdown-body .hljs-center{text-align:center}.markdown-body .hljs-right{text-align:right}.markdown-body .hljs-left{text-align:left}.page-edit-vue .icon-collapse{float:left;font-size:25px;color:#aaa;margin-top:8px;cursor:pointer}.page-edit-vue .icon-collapse:hover{color:#eee}.page-edit-vue .wiki-title{font-size:20px}.page-edit-vue .wiki-author{font-size:14px;color:#888;padding:20px 0;height:40px;line-height:40px}.page-edit-vue .wiki-content{font-size:14px}.page-edit-vue .wiki-content.w-e-text{overflow-y:auto}.page-edit-vue .upload-page-file .el-upload-list{display:none}.page-edit-vue .is-link{color:#1e88e5;cursor:pointer}.page-edit-vue #newPageContentDiv .w-e-text-container{height:100%!important}.page-edit-vue .comment-box .head{float:left;background-color:#ccc;border-radius:50%;margin-right:10px;width:45px;height:45px;line-height:45px;text-align:center;color:#fff}.page-edit-vue .page-content-editor,.page-edit-vue .page-title-input{padding:10px 0} \ No newline at end of file diff --git a/zyplayer-doc-wiki/src/main/resources/css/chunk-5544a2b8.b3d0f39b.css b/zyplayer-doc-wiki/src/main/resources/css/chunk-5544a2b8.17d2b8a1.css similarity index 100% rename from zyplayer-doc-wiki/src/main/resources/css/chunk-5544a2b8.b3d0f39b.css rename to zyplayer-doc-wiki/src/main/resources/css/chunk-5544a2b8.17d2b8a1.css diff --git a/zyplayer-doc-wiki/src/main/resources/doc-wiki.html b/zyplayer-doc-wiki/src/main/resources/doc-wiki.html index e38ea736..de073838 100644 --- a/zyplayer-doc-wiki/src/main/resources/doc-wiki.html +++ b/zyplayer-doc-wiki/src/main/resources/doc-wiki.html @@ -1 +1 @@ -WIKI文档管理系统
\ No newline at end of file +WIKI文档管理系统
\ No newline at end of file diff --git a/zyplayer-doc-wiki/src/main/resources/js/app.f4439c4e.js b/zyplayer-doc-wiki/src/main/resources/js/app.1467f310.js similarity index 82% rename from zyplayer-doc-wiki/src/main/resources/js/app.f4439c4e.js rename to zyplayer-doc-wiki/src/main/resources/js/app.1467f310.js index cc596724..60200e9d 100644 --- a/zyplayer-doc-wiki/src/main/resources/js/app.f4439c4e.js +++ b/zyplayer-doc-wiki/src/main/resources/js/app.1467f310.js @@ -1 +1 @@ -(function(e){function t(t){for(var n,o,s=t[0],c=t[1],l=t[2],p=0,u=[];p")])],1)]}}])})],1),a("div",{staticClass:"page-info-box"},[a("el-pagination",{attrs:{"page-size":e.userMsgParam.pageSize,"current-page":e.userMsgParam.pageNum,layout:"prev, pager, next, total",total:e.userMsgTotalCount},on:{"current-change":e.handleCurrentChange}})],1)],1)],1),a("el-dropdown",{attrs:{trigger:"click"},on:{command:e.userSettingDropdown}},[a("i",{staticClass:"el-icon-setting head-icon"}),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"console"}},[e._v("控制台")]),a("el-dropdown-item",{attrs:{command:"aboutDoc",divided:""}},[e._v("关于")]),a("el-dropdown-item",{attrs:{command:"myInfo"}},[e._v("我的资料")]),a("el-dropdown-item",{attrs:{command:"userSignOut"}},[e._v("退出登录")])],1)],1)],1),a("el-main",{staticStyle:{padding:"0"}},[a("router-view",{attrs:{spaceId:e.choiceSpace,spaceInfo:e.getSpaceInfo(e.choiceSpace)},on:{loadPageList:e.loadPageList,changeExpandedKeys:e.changeWikiPageExpandedKeys,switchSpace:e.switchSpacePage}})],1)],1)],1),a("el-dialog",{attrs:{title:"创建空间",visible:e.newSpaceDialogVisible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(t){e.newSpaceDialogVisible=t}}},[a("el-form",{ref:"newSpaceForm",attrs:{"label-width":"100px",model:e.newSpaceForm,rules:e.newSpaceFormRules}},[a("el-form-item",{attrs:{label:"空间名:",prop:"name"}},[a("el-input",{model:{value:e.newSpaceForm.name,callback:function(t){e.$set(e.newSpaceForm,"name",t)},expression:"newSpaceForm.name"}})],1),a("el-form-item",{attrs:{label:"空间描述:",prop:"spaceExplain"}},[a("el-input",{model:{value:e.newSpaceForm.spaceExplain,callback:function(t){e.$set(e.newSpaceForm,"spaceExplain",t)},expression:"newSpaceForm.spaceExplain"}})],1),a("el-form-item",{attrs:{label:"空间开放:"}},[a("el-switch",{attrs:{"inactive-text":"需要登录","inactive-value":0,"active-text":"开放访问","active-value":1},model:{value:e.newSpaceForm.openDoc,callback:function(t){e.$set(e.newSpaceForm,"openDoc",t)},expression:"newSpaceForm.openDoc"}})],1),a("el-form-item",{attrs:{label:"目录加载:"}},[a("el-switch",{attrs:{"inactive-text":"预先加载","inactive-value":0,"active-text":"延迟加载","active-value":1},model:{value:e.newSpaceForm.treeLazyLoad,callback:function(t){e.$set(e.newSpaceForm,"treeLazyLoad",t)},expression:"newSpaceForm.treeLazyLoad"}})],1),a("el-form-item",{attrs:{label:"空间类型:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"选择类型"},model:{value:e.newSpaceForm.type,callback:function(t){e.$set(e.newSpaceForm,"type",t)},expression:"newSpaceForm.type"}},[a("el-option",{key:1,attrs:{label:"公共空间",value:1}},[a("span",{staticStyle:{float:"left"}},[e._v("公共空间")]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v("属于公共,登录用户可访问、编辑")])]),a("el-option",{key:2,attrs:{label:"个人空间",value:2}},[a("span",{staticStyle:{float:"left"}},[e._v("个人空间")]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v("属于个人,所有登录用户可访问")])]),a("el-option",{key:3,attrs:{label:"隐私空间",value:3}},[a("span",{staticStyle:{float:"left"}},[e._v("隐私空间")]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v("属于个人,仅创建者可访问")])])],1)],1),a("el-form-item",[e.newSpaceForm.id>0?a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onNewSpaceSubmit("newSpaceForm")}}},[e._v("保存修改")]):a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onNewSpaceSubmit("newSpaceForm")}}},[e._v("立即创建")]),a("el-button",{on:{click:e.onNewSpaceCancel}},[e._v("取消")])],1)],1)],1),a("el-dialog",{attrs:{title:"管理空间",visible:e.manageSpaceDialogVisible,"close-on-click-modal":!1,width:"80%"},on:{"update:visible":function(t){e.manageSpaceDialogVisible=t}}},[a("el-table",{staticStyle:{width:"100%","margin-bottom":"5px"},attrs:{data:e.spaceList,border:"","max-height":"500"}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"60"}}),a("el-table-column",{attrs:{prop:"name",label:"名字"}}),a("el-table-column",{attrs:{prop:"spaceExplain",label:"说明"}}),a("el-table-column",{attrs:{label:"开放地址"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.openDoc?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.showOpenSpace(t.row.uuid)}}},[e._v(e._s(t.row.name))]):a("span",[e._v("暂未开放")])]}}])}),a("el-table-column",{attrs:{prop:"createUserName",label:"创建人"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(a){return e.editSpaceInfo(t.row)}}},[e._v("编辑")]),a("el-button",{attrs:{size:"small",type:"danger"},on:{click:function(a){return e.deleteSpaceInfo(t.row)}}},[e._v("删除")])]}}])})],1)],1),a("el-dialog",{attrs:{title:"关于zyplayer-doc-wiki",visible:e.aboutDialogVisible,width:"600px"},on:{"update:visible":function(t){e.aboutDialogVisible=t}}},[a("el-form",[a("el-form-item",{attrs:{label:"开源地址:"}},[a("a",{attrs:{target:"_blank",href:"https://gitee.com/zyplayer/zyplayer-doc"}},[e._v("zyplayer-doc")])]),a("el-form-item",{attrs:{label:"开发人员:"}},[a("a",{attrs:{target:"_blank",href:"http://zyplayer.com"}},[e._v("暮光:城中城")])]),e.upgradeInfo.lastVersion?[a("el-form-item",{attrs:{label:"当前版本:"}},[e._v(e._s(e.upgradeInfo.nowVersion)+"、最新版本:"+e._s(e.upgradeInfo.lastVersion)+","),a("a",{attrs:{target:"_blank",href:e.upgradeInfo.upgradeUrl}},[e._v("去升级")])]),a("el-form-item",{attrs:{label:"升级内容:"}},[e._v(e._s(e.upgradeInfo.upgradeContent))])]:e._e(),a("el-form-item",{attrs:{label:""}},[e._v(" zyplayer-doc是一款开源的在线文档工具,现有WIKI文档、数据库文档、swagger文档、dubbo文档、ElasticSearch文档等,不止文档。期待与你一起来迭代完善,欢迎加群讨论,QQ群号:466363173 ")])],2)],1)],1)}),g=[],m=(a("4de4"),a("4160"),a("c975"),a("a15b"),a("4ec9"),a("e25e"),a("3ca3"),a("159b"),a("ddb0"),a("9f03")),y=a("0a79"),b={data:function(){return{leftCollapse:!0,aboutDialogVisible:!1,rightContentLoading:!1,pathIndex:[],defaultProps:{children:"children",label:"name"},spaceOptions:[],spaceList:[],choiceSpace:"",nowSpaceShow:{},newSpaceDialogVisible:!1,manageSpaceDialogVisible:!1,newSpaceForm:{id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1},newSpaceFormRules:{name:[{required:!0,message:"请输入空间名",trigger:"blur"},{min:2,max:25,message:"长度在 2 到 25 个字符",trigger:"blur"}]},nowPageId:"",treePathDataMap:new Map,searchKeywords:"",wikiPageList:[],wikiPage:{},wikiPageExpandedKeys:[],upgradeInfo:{},userMessageList:[],haveNotReadUserMessage:!1,userMessagePopVisible:!1,userMsgTotalCount:0,userMsgParam:{sysType:2,pageNum:1,pageSize:20}}},computed:{},mounted:function(){this.loadSpaceList(),this.loadUserMessageList(),this.checkSystemUpgrade()},methods:{loadPageList:function(e){e=e||{},this.doGetPageList(e.parentId,e.node)},createWiki:function(){this.choiceSpace>0?this.$router.push({path:"/page/edit",query:{parentId:this.nowPageId}}):this.$message.warning("请先选择或创建空间")},changeWikiPageExpandedKeys:function(e){this.wikiPageExpandedKeys=[e]},searchByKeywords:function(){this.$refs.wikiPageTree.filter(this.searchKeywords)},searchByKeywordsNewPage:function(){var e=this.$router.resolve({path:"/page/search",query:{keywords:this.searchKeywords}});window.open(e.href,"_blank")},handleNodeClick:function(e){console.log("点击节点:",e),this.nowPageId=e.id,this.$router.push({path:"/page/show",query:{pageId:e.id}})},handleNodeExpand:function(e){e.children.length>0&&e.children[0].needLoad&&(console.log("加载节点:",e),this.doGetPageList(e.id,e))},handlePageDrop:function(e,t,a,n){var o=this;console.log("tree drop: ",e.data,t.data,a);var i={id:e.data.id,parentId:t.data.parentId};"inner"==a?i.parentId=t.data.id:"before"==a?i.beforeSeq=t.data.seqNo:"after"==a&&(i.afterSeq=t.data.seqNo),y["a"].pageChangeParent(i).then((function(e){o.doGetPageList(null)}))},loadUserMessageList:function(){var e=this;m["a"].getUserMessageList(this.userMsgParam).then((function(t){e.userMessageList=t.data||[],e.userMsgTotalCount=t.total||0,e.haveNotReadUserMessage=e.userMessageList.filter((function(e){return 0==e.msgStatus})).length>0}))},showUserMessage:function(e){var t=this;0==e.msgStatus&&m["a"].readUserMessage({ids:e.id}).then((function(){t.loadUserMessageList()})),e.msgType>=2&&e.msgType<=12&&(this.$router.push({path:"/page/show",query:{pageId:e.dataId}}),this.userMessagePopVisible=!1)},readAllUserMessage:function(){var e=this,t=[];this.userMessageList.filter((function(e){return 0==e.msgStatus})).forEach((function(e){t.push(e.id)})),t.length<=0||m["a"].readUserMessage({ids:t.join(",")}).then((function(){e.$message.success("标记成功"),e.loadUserMessageList()}))},handleCurrentChange:function(e){this.userMsgParam.pageNum=e,this.loadUserMessageList()},filterPageNode:function(e,t){return!e||-1!==t.name.indexOf(e)},showOpenSpace:function(e){var t=this.$router.resolve({path:"/page/share/home",query:{space:e}});window.open(t.href,"_blank")},editSpaceInfo:function(e){this.newSpaceForm={id:e.id,name:e.name,spaceExplain:e.spaceExplain,treeLazyLoad:e.treeLazyLoad,openDoc:e.openDoc,type:e.type},this.newSpaceDialogVisible=!0},deleteSpaceInfo:function(e){var t=this;this.$confirm("确定要删除此空间及下面的所有文档吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:e.id,delFlag:1};y["a"].updateSpace(a).then((function(){t.loadSpaceList()}))}))},spaceChangeEvents:function(e){if(0==e)this.newSpaceForm={id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1},this.newSpaceDialogVisible=!0;else if(-1==e)this.manageSpaceDialogVisible=!0;else{this.choiceSpace=e;for(var t=0;t0){var o=e.spaceList[0].id;e.nowSpaceShow=e.spaceList[0],e.choiceSpace=o,e.nowPageId="",e.doGetPageList(null);try{"/home"==e.$router.app._route.path&&e.$router.push({path:"/home",query:{spaceId:o}})}catch(i){console.log(i)}}}))},doGetPageList:function(e,t){var a=this,n={spaceId:this.choiceSpace,parentId:e||0};0==this.nowSpaceShow.treeLazyLoad&&(n.parentId=null),y["a"].pageList(n).then((function(n){var o=n.data||[],i=[];if(0==a.nowSpaceShow.treeLazyLoad)i=o;else for(var r=0;r0?t.children=i:a.wikiPageList=i}))},userSettingDropdown:function(e){console.log("command:"+e),"userSignOut"==e?this.userSignOut():"aboutDoc"==e?this.aboutDialogVisible=!0:"myInfo"==e?this.$router.push({path:"/user/myInfo"}):"console"==e?window.location="./":this.$message.warning("暂未开放")},userSignOut:function(){m["a"].userLogout().then((function(){location.reload()}))},getSpaceInfo:function(e){for(var t=0;t0?t.loadSpaceList():(t.spaceList.push(e.data),t.spaceOptions.push({label:e.data.name,value:e.data.id}),t.nowSpaceShow=e.data,t.choiceSpace=e.data.id,t.doGetPageList(null)),t.newSpaceForm={id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1},t.newSpaceDialogVisible=!1}))}}))},onNewSpaceCancel:function(){this.newSpaceDialogVisible=!1},checkSystemUpgrade:function(){var e=this;m["a"].systemUpgradeInfo({}).then((function(t){t.data&&(e.upgradeInfo=t.data,console.log("zyplayer-doc发现新版本:\n升级地址:"+t.data.upgradeUrl+"\n当前版本:"+t.data.nowVersion+"\n最新版本:"+t.data.lastVersion+"\n升级内容:"+t.data.upgradeContent))}))},switchSpacePage:function(e){e=parseInt(e),this.choiceSpace!=e&&(this.choiceSpace=e,this.doGetPageList(null))}}},w=b,v=(a("149b"),Object(p["a"])(w,h,g,!1,null,null,null)),k=v.exports,S=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{height:"100%"}},[a("el-container",[a("el-aside",{directives:[{name:"show",rawName:"v-show",value:e.leftCollapse,expression:"leftCollapse"}],staticStyle:{"background-color":"#fafafa"},attrs:{width:"300px"}},[a("div",{staticClass:"logo"},[e._v(e._s(e.nowSpaceShow.name))]),a("div",{staticStyle:{padding:"10px","box-sizing":"border-box",background:"#fafafa"}},[a("el-input",{staticStyle:{margin:"10px 0"},attrs:{placeholder:"搜索文档"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchByKeywords(t)}},model:{value:e.searchKeywords,callback:function(t){e.searchKeywords=t},expression:"searchKeywords"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.searchByKeywords},slot:"append"})],1),a("el-tree",{ref:"wikiPageTree",staticStyle:{"background-color":"#fafafa","padding-bottom":"30px"},attrs:{props:e.defaultProps,data:e.wikiPageList,"filter-node-method":e.filterPageNode,"highlight-current":"","expand-on-click-node":!1,"default-expanded-keys":e.wikiPageExpandedKeys,"node-key":"id"},on:{"node-click":e.handleNodeClick}}),a("div",{staticClass:"build-info"},[e._v("本文档使用"),a("span",{on:{click:function(t){e.aboutDialogVisible=!0}}},[e._v("zyplayer-doc")]),e._v("构建")])],1)]),a("el-container",[a("el-main",{staticClass:"doc-body-box"},[a("router-view")],1)],1)],1),a("el-dialog",{attrs:{title:"关于zyplayer-doc-wiki",visible:e.aboutDialogVisible,width:"600px"},on:{"update:visible":function(t){e.aboutDialogVisible=t}}},[a("el-form",[a("el-form-item",{attrs:{label:"项目地址:"}},[a("a",{attrs:{target:"_blank",href:"https://gitee.com/zyplayer/zyplayer-doc"}},[e._v("zyplayer-doc")])]),a("el-form-item",{attrs:{label:"开发人员:"}},[a("a",{attrs:{target:"_blank",href:"http://zyplayer.com"}},[e._v("暮光:城中城")])]),a("el-form-item",{attrs:{label:""}},[e._v(" 欢迎加群讨论,QQ群号:466363173,欢迎提交需求,欢迎使用和加入开发! ")])],1)],1)],1)},x=[],L={data:function(){return{leftCollapse:!0,aboutDialogVisible:!1,defaultProps:{children:"children",label:"name"},spaceUuid:"",nowPageId:"",nowSpaceShow:{},searchKeywords:"",wikiPageList:[],wikiPageExpandedKeys:[]}},mounted:function(){this.spaceUuid=this.$route.query.space||"",this.getSpaceInfo(),this.doGetPageList(null)},methods:{filterPageNode:function(e,t){return!e||-1!==t.name.indexOf(e)},handleNodeClick:function(e){this.nowPageId!=e.id&&(console.log("点击节点:",e),this.nowPageId=e.id,this.$router.push({path:"/page/share/view",query:{pageId:e.id,space:this.spaceUuid}}))},searchByKeywords:function(){this.$refs.wikiPageTree.filter(this.searchKeywords)},doGetPageList:function(){var e=this;y["a"].openPageList({space:this.spaceUuid}).then((function(t){e.wikiPageList=t.data||[],e.nowPageId=""}))},getSpaceInfo:function(){var e=this;y["a"].openSpaceInfo({space:this.spaceUuid}).then((function(t){e.nowSpaceShow=t.data}))}}},P=L,I=(a("e1ab"),Object(p["a"])(P,S,x,!1,null,"3799a29f",null)),_=I.exports,z=[{path:"/",redirect:"/home"},{path:"/page/search",name:"WIKI-全局搜索",component:function(){return a.e("chunk-34407190").then(a.bind(null,"f890"))}},{path:"/common/noAuth",name:"WIKI-没有权限",component:function(){return a.e("chunk-2d207ece").then(a.bind(null,"a339"))}},{path:"/page/editorTest",name:"编辑内容",component:function(){return a.e("chunk-5544a2b8").then(a.bind(null,"ed40"))}},{path:"/",name:"页面管理",component:k,children:[{path:"/home",name:"WIKI文档管理",component:function(){return a.e("chunk-578c28a7").then(a.bind(null,"b3d7"))}},{path:"/user/myInfo",name:"WIKI-我的信息",component:function(){return a.e("chunk-32cc5643").then(a.bind(null,"408e"))}},{path:"/page/show",name:"WIKI-内容展示",component:function(){return Promise.all([a.e("chunk-2d20f55a"),a.e("chunk-07e56bb7")]).then(a.bind(null,"fb9f"))}},{path:"/page/edit",name:"WIKI-编辑内容",component:function(){return Promise.all([a.e("chunk-2d20f55a"),a.e("chunk-4b763d50")]).then(a.bind(null,"73f0"))}}]},{path:"/",name:"页面管理",component:_,children:[{path:"/page/share/home",name:"WIKI-开放文档",component:function(){return a.e("chunk-5dc97978").then(a.bind(null,"6d37"))}},{path:"/page/share/view",name:"WIKI-内容展示",component:function(){return Promise.all([a.e("chunk-2d20f55a"),a.e("chunk-009efa60")]).then(a.bind(null,"f33f"))}}]}],O=z,C=a("2f62"),j={namespaced:!0,state:{pageTabNameMap:{}},getters:{getPageTabNameMap:function(e){return e.pageTabNameMap}},mutations:{addTableName:function(e,t){var a=Object.assign({},e.pageTabNameMap);a[t.key]=t.val,e.pageTabNameMap=a}}};n["default"].use(C["a"]);var M=new C["a"].Store({modules:{global:j}}),D=a("bc3a"),E=a.n(D),N=a("a7fe"),U=a.n(N);n["default"].use(i.a),n["default"].use(f["a"]),n["default"].use(U.a,E.a),n["default"].prototype.$store=M;var K=new f["a"]({routes:O});K.beforeEach((function(e,t,a){e.name&&(document.title=e.name),a()}));var F=new n["default"]({el:"#app",router:K,render:function(e){return e(d)}});t["default"]=F},"85ec":function(e,t,a){},"9f03":function(e,t,a){"use strict";var n=a("4328"),o=a.n(n),i=a("d978");t["a"]={systemUpgradeInfo:function(e){return Object(i["a"])({url:"/system/info/upgrade",method:"post",data:o.a.stringify(e)})},userLogin:function(e){return Object(i["a"])({url:"/login",method:"post",data:o.a.stringify(e)})},userLogout:function(){return Object(i["a"])({url:"/logout",method:"post",data:o.a.stringify({})})},getSelfUserInfo:function(){return Object(i["a"])({url:"/user/info/selfInfo",method:"post",data:o.a.stringify({})})},getUserBaseInfo:function(e){return Object(i["a"])({url:"/zyplayer-doc-wiki/common/user/base",method:"post",data:o.a.stringify(e)})},getUserMessageList:function(e){return Object(i["a"])({url:"/user/message/list",method:"post",data:o.a.stringify(e)})},readUserMessage:function(e){return Object(i["a"])({url:"/user/message/read",method:"post",data:o.a.stringify(e)})},deleteUserMessage:function(e){return Object(i["a"])({url:"/user/message/delete",method:"post",data:o.a.stringify(e)})}}},d978:function(e,t,a){"use strict";a("d3b7");var n=a("bc3a"),o=a.n(n),i=a("56d7"),r=o.a.create({baseURL:"./",timeout:1e4,headers:{"Content-type":"application/x-www-form-urlencoded"},withCredentials:!0}),s={"/zyplayer-doc-db/executor/execute":!0};r.interceptors.request.use((function(e){return e.needValidateResult=!0,s[e.url]&&(e.needValidateResult=!1),e}),(function(e){return console.log(e),Promise.reject(e)})),r.interceptors.response.use((function(e){if(e.message)i["default"].$message.error("请求错误:"+e.message);else{if(!e.config.needValidateResult||200==e.data.errCode)return e.data;if(400==e.data.errCode){i["default"].$message.error("请先登录");var t=encodeURIComponent(window.location.href);window.location="./#/user/login?redirect="+t}else 402==e.data.errCode?i["default"].$router.push("/common/noAuth"):200!==e.data.errCode&&i["default"].$message.error(e.data.errMsg||"未知错误")}return Promise.reject("请求错误")}),(function(e){return console.log("err"+e),i["default"].$message.info("请求错误:"+e.message),Promise.reject(e)})),t["a"]=r},e1ab:function(e,t,a){"use strict";var n=a("0eff"),o=a.n(n);o.a}}); \ No newline at end of file +(function(e){function t(t){for(var n,o,s=t[0],c=t[1],l=t[2],p=0,d=[];p")])],1)]}}])})],1),a("div",{staticClass:"page-info-box"},[a("el-pagination",{attrs:{"page-size":e.userMsgParam.pageSize,"current-page":e.userMsgParam.pageNum,layout:"prev, pager, next, total",total:e.userMsgTotalCount},on:{"current-change":e.handleCurrentChange}})],1)],1)],1),a("el-dropdown",{attrs:{trigger:"click"},on:{command:e.userSettingDropdown}},[a("i",{staticClass:"el-icon-setting head-icon"}),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"console"}},[e._v("控制台")]),a("el-dropdown-item",{attrs:{command:"aboutDoc",divided:""}},[e._v("关于")]),a("el-dropdown-item",{attrs:{command:"myInfo"}},[e._v("我的资料")]),a("el-dropdown-item",{attrs:{command:"userSignOut"}},[e._v("退出登录")])],1)],1)],1),a("el-main",{staticStyle:{padding:"0"}},[a("router-view",{attrs:{spaceId:e.choiceSpace,spaceInfo:e.getSpaceInfo(e.choiceSpace)},on:{loadPageList:e.loadPageList,changeExpandedKeys:e.changeWikiPageExpandedKeys,switchSpace:e.switchSpacePage}})],1)],1)],1),a("el-dialog",{attrs:{title:"创建空间",visible:e.newSpaceDialogVisible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(t){e.newSpaceDialogVisible=t}}},[a("el-form",{ref:"newSpaceForm",attrs:{"label-width":"100px",model:e.newSpaceForm,rules:e.newSpaceFormRules}},[a("el-form-item",{attrs:{label:"空间名:",prop:"name"}},[a("el-input",{model:{value:e.newSpaceForm.name,callback:function(t){e.$set(e.newSpaceForm,"name",t)},expression:"newSpaceForm.name"}})],1),a("el-form-item",{attrs:{label:"空间描述:",prop:"spaceExplain"}},[a("el-input",{model:{value:e.newSpaceForm.spaceExplain,callback:function(t){e.$set(e.newSpaceForm,"spaceExplain",t)},expression:"newSpaceForm.spaceExplain"}})],1),a("el-form-item",{attrs:{label:"空间开放:"}},[a("el-switch",{attrs:{"inactive-text":"需要登录","inactive-value":0,"active-text":"开放访问","active-value":1},model:{value:e.newSpaceForm.openDoc,callback:function(t){e.$set(e.newSpaceForm,"openDoc",t)},expression:"newSpaceForm.openDoc"}})],1),a("el-form-item",{attrs:{label:"目录加载:"}},[a("el-switch",{attrs:{"inactive-text":"预先加载","inactive-value":0,"active-text":"延迟加载","active-value":1},model:{value:e.newSpaceForm.treeLazyLoad,callback:function(t){e.$set(e.newSpaceForm,"treeLazyLoad",t)},expression:"newSpaceForm.treeLazyLoad"}})],1),a("el-form-item",{attrs:{label:"空间类型:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"选择类型"},model:{value:e.newSpaceForm.type,callback:function(t){e.$set(e.newSpaceForm,"type",t)},expression:"newSpaceForm.type"}},[a("el-option",{key:1,attrs:{label:"公共空间",value:1}},[a("span",{staticStyle:{float:"left"}},[e._v("公共空间")]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v("属于公共,登录用户可访问、编辑")])]),a("el-option",{key:2,attrs:{label:"个人空间",value:2}},[a("span",{staticStyle:{float:"left"}},[e._v("个人空间")]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v("属于个人,所有登录用户可访问")])]),a("el-option",{key:3,attrs:{label:"隐私空间",value:3}},[a("span",{staticStyle:{float:"left"}},[e._v("隐私空间")]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v("属于个人,仅创建者可访问")])])],1)],1),a("el-form-item",[e.newSpaceForm.id>0?a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onNewSpaceSubmit("newSpaceForm")}}},[e._v("保存修改")]):a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onNewSpaceSubmit("newSpaceForm")}}},[e._v("立即创建")]),a("el-button",{on:{click:e.onNewSpaceCancel}},[e._v("取消")])],1)],1)],1),a("el-dialog",{attrs:{title:"管理空间",visible:e.manageSpaceDialogVisible,"close-on-click-modal":!1,width:"80%"},on:{"update:visible":function(t){e.manageSpaceDialogVisible=t}}},[a("el-table",{staticStyle:{width:"100%","margin-bottom":"5px"},attrs:{data:e.spaceList,border:"","max-height":"500"}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"60"}}),a("el-table-column",{attrs:{prop:"name",label:"名字"}}),a("el-table-column",{attrs:{prop:"spaceExplain",label:"说明"}}),a("el-table-column",{attrs:{label:"开放地址"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.openDoc?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.showOpenSpace(t.row.uuid)}}},[e._v(e._s(t.row.name))]):a("span",[e._v("暂未开放")])]}}])}),a("el-table-column",{attrs:{prop:"createUserName",label:"创建人"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(a){return e.editSpaceInfo(t.row)}}},[e._v("编辑")]),a("el-button",{attrs:{size:"small",type:"danger"},on:{click:function(a){return e.deleteSpaceInfo(t.row)}}},[e._v("删除")])]}}])})],1)],1),a("el-dialog",{attrs:{title:"关于zyplayer-doc-wiki",visible:e.aboutDialogVisible,width:"600px"},on:{"update:visible":function(t){e.aboutDialogVisible=t}}},[a("el-form",[a("el-form-item",{attrs:{label:"开源地址:"}},[a("a",{attrs:{target:"_blank",href:"https://gitee.com/zyplayer/zyplayer-doc"}},[e._v("zyplayer-doc")])]),a("el-form-item",{attrs:{label:"开发人员:"}},[a("a",{attrs:{target:"_blank",href:"http://zyplayer.com"}},[e._v("暮光:城中城")])]),e.upgradeInfo.lastVersion?[a("el-form-item",{attrs:{label:"当前版本:"}},[e._v(e._s(e.upgradeInfo.nowVersion)+"、最新版本:"+e._s(e.upgradeInfo.lastVersion)+","),a("a",{attrs:{target:"_blank",href:e.upgradeInfo.upgradeUrl}},[e._v("去升级")])]),a("el-form-item",{attrs:{label:"升级内容:"}},[e._v(e._s(e.upgradeInfo.upgradeContent))])]:e._e(),a("el-form-item",{attrs:{label:""}},[e._v(" zyplayer-doc是一款开源的在线文档工具,现有WIKI文档、数据库文档、swagger文档、dubbo文档、ElasticSearch文档等,不止文档。期待与你一起来迭代完善,欢迎加群讨论,QQ群号:466363173 ")])],2)],1)],1)}),g=[],m=(a("4de4"),a("4160"),a("c975"),a("a15b"),a("4ec9"),a("e25e"),a("3ca3"),a("159b"),a("ddb0"),a("9f03")),y=a("0a79"),b={data:function(){return{leftCollapse:!0,aboutDialogVisible:!1,rightContentLoading:!1,pathIndex:[],defaultProps:{children:"children",label:"name"},spaceOptions:[],spaceList:[],choiceSpace:"",nowSpaceShow:{},newSpaceDialogVisible:!1,manageSpaceDialogVisible:!1,newSpaceForm:{id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1},newSpaceFormRules:{name:[{required:!0,message:"请输入空间名",trigger:"blur"},{min:2,max:25,message:"长度在 2 到 25 个字符",trigger:"blur"}]},nowPageId:"",treePathDataMap:new Map,searchKeywords:"",wikiPageList:[],wikiPage:{},wikiPageExpandedKeys:[],upgradeInfo:{},userMessageList:[],haveNotReadUserMessage:!1,userMessagePopVisible:!1,userMsgTotalCount:0,userMsgParam:{sysType:2,pageNum:1,pageSize:20}}},computed:{},mounted:function(){this.loadSpaceList(),this.loadUserMessageList(),this.checkSystemUpgrade()},methods:{loadPageList:function(e){e=e||{},this.doGetPageList(e.parentId,e.node)},createWiki:function(){this.choiceSpace>0?this.$router.push({path:"/page/edit",query:{parentId:this.nowPageId}}):this.$message.warning("请先选择或创建空间")},changeWikiPageExpandedKeys:function(e){this.wikiPageExpandedKeys=[e]},searchByKeywords:function(){this.$refs.wikiPageTree.filter(this.searchKeywords)},searchByKeywordsNewPage:function(){var e=this.$router.resolve({path:"/page/search",query:{keywords:this.searchKeywords}});window.open(e.href,"_blank")},handleNodeClick:function(e){console.log("点击节点:",e),this.nowPageId=e.id,this.$router.push({path:"/page/show",query:{pageId:e.id}})},handleNodeExpand:function(e){e.children.length>0&&e.children[0].needLoad&&(console.log("加载节点:",e),this.doGetPageList(e.id,e))},handlePageDrop:function(e,t,a,n){var o=this;console.log("tree drop: ",e.data,t.data,a);var i={id:e.data.id,parentId:t.data.parentId};"inner"==a?i.parentId=t.data.id:"before"==a?i.beforeSeq=t.data.seqNo:"after"==a&&(i.afterSeq=t.data.seqNo),y["a"].pageChangeParent(i).then((function(e){o.doGetPageList(null)}))},loadUserMessageList:function(){var e=this;m["a"].getUserMessageList(this.userMsgParam).then((function(t){e.userMessageList=t.data||[],e.userMsgTotalCount=t.total||0,e.haveNotReadUserMessage=e.userMessageList.filter((function(e){return 0==e.msgStatus})).length>0}))},showUserMessage:function(e){var t=this;0==e.msgStatus&&m["a"].readUserMessage({ids:e.id}).then((function(){t.loadUserMessageList()})),e.msgType>=2&&e.msgType<=12&&(this.$router.push({path:"/page/show",query:{pageId:e.dataId}}),this.userMessagePopVisible=!1)},readAllUserMessage:function(){var e=this,t=[];this.userMessageList.filter((function(e){return 0==e.msgStatus})).forEach((function(e){t.push(e.id)})),t.length<=0||m["a"].readUserMessage({ids:t.join(",")}).then((function(){e.$message.success("标记成功"),e.loadUserMessageList()}))},handleCurrentChange:function(e){this.userMsgParam.pageNum=e,this.loadUserMessageList()},filterPageNode:function(e,t){return!e||-1!==t.name.indexOf(e)},showOpenSpace:function(e){var t=this.$router.resolve({path:"/page/share/home",query:{space:e}});window.open(t.href,"_blank")},editSpaceInfo:function(e){this.newSpaceForm={id:e.id,name:e.name,spaceExplain:e.spaceExplain,treeLazyLoad:e.treeLazyLoad,openDoc:e.openDoc,type:e.type},this.newSpaceDialogVisible=!0},deleteSpaceInfo:function(e){var t=this;this.$confirm("确定要删除此空间及下面的所有文档吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:e.id,delFlag:1};y["a"].updateSpace(a).then((function(){t.loadSpaceList()}))}))},spaceChangeEvents:function(e){if(0==e)this.newSpaceForm={id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1},this.newSpaceDialogVisible=!0;else if(-1==e)this.manageSpaceDialogVisible=!0;else{this.choiceSpace=e;for(var t=0;t0){var o=e.spaceList[0].id;e.nowSpaceShow=e.spaceList[0],e.choiceSpace=o,e.nowPageId="",e.doGetPageList(null);try{"/home"==e.$router.app._route.path&&e.$router.push({path:"/home",query:{spaceId:o}})}catch(i){console.log(i)}}}))},doGetPageList:function(e,t){var a=this,n={spaceId:this.choiceSpace,parentId:e||0};0==this.nowSpaceShow.treeLazyLoad&&(n.parentId=null),y["a"].pageList(n).then((function(n){var o=n.data||[],i=[];if(0==a.nowSpaceShow.treeLazyLoad)i=o;else for(var r=0;r0?t.children=i:a.wikiPageList=i}))},userSettingDropdown:function(e){console.log("command:"+e),"userSignOut"==e?this.userSignOut():"aboutDoc"==e?this.aboutDialogVisible=!0:"myInfo"==e?this.$router.push({path:"/user/myInfo"}):"console"==e?window.location="./":this.$message.warning("暂未开放")},userSignOut:function(){m["a"].userLogout().then((function(){location.reload()}))},getSpaceInfo:function(e){for(var t=0;t0?t.loadSpaceList():(t.spaceList.push(e.data),t.spaceOptions.push({label:e.data.name,value:e.data.id}),t.nowSpaceShow=e.data,t.choiceSpace=e.data.id,t.doGetPageList(null)),t.newSpaceForm={id:"",name:"",spaceExplain:"",treeLazyLoad:0,openDoc:0,uuid:"",type:1},t.newSpaceDialogVisible=!1}))}}))},onNewSpaceCancel:function(){this.newSpaceDialogVisible=!1},checkSystemUpgrade:function(){var e=this;m["a"].systemUpgradeInfo({}).then((function(t){t.data&&(e.upgradeInfo=t.data,console.log("zyplayer-doc发现新版本:\n升级地址:"+t.data.upgradeUrl+"\n当前版本:"+t.data.nowVersion+"\n最新版本:"+t.data.lastVersion+"\n升级内容:"+t.data.upgradeContent))}))},switchSpacePage:function(e){e=parseInt(e),this.choiceSpace!=e&&(this.choiceSpace=e,this.doGetPageList(null))}}},w=b,v=(a("149b"),Object(p["a"])(w,f,g,!1,null,null,null)),k=v.exports,S=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{height:"100%"}},[a("el-container",[a("el-aside",{directives:[{name:"show",rawName:"v-show",value:e.leftCollapse,expression:"leftCollapse"}],staticStyle:{"background-color":"#fafafa"},attrs:{width:"300px"}},[a("div",{staticClass:"logo"},[e._v(e._s(e.nowSpaceShow.name))]),a("div",{staticStyle:{padding:"10px","box-sizing":"border-box",background:"#fafafa"}},[a("el-input",{staticStyle:{margin:"10px 0"},attrs:{placeholder:"搜索文档"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchByKeywords(t)}},model:{value:e.searchKeywords,callback:function(t){e.searchKeywords=t},expression:"searchKeywords"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.searchByKeywords},slot:"append"})],1),a("el-tree",{ref:"wikiPageTree",staticStyle:{"background-color":"#fafafa","padding-bottom":"30px"},attrs:{props:e.defaultProps,data:e.wikiPageList,"filter-node-method":e.filterPageNode,"highlight-current":"","expand-on-click-node":!1,"default-expanded-keys":e.wikiPageExpandedKeys,"node-key":"id"},on:{"node-click":e.handleNodeClick}}),a("div",{staticClass:"build-info"},[e._v("本文档使用"),a("span",{on:{click:function(t){e.aboutDialogVisible=!0}}},[e._v("zyplayer-doc")]),e._v("构建")])],1)]),a("el-container",[a("el-main",{staticClass:"doc-body-box"},[a("router-view")],1)],1)],1),a("el-dialog",{attrs:{title:"关于zyplayer-doc-wiki",visible:e.aboutDialogVisible,width:"600px"},on:{"update:visible":function(t){e.aboutDialogVisible=t}}},[a("el-form",[a("el-form-item",{attrs:{label:"项目地址:"}},[a("a",{attrs:{target:"_blank",href:"https://gitee.com/zyplayer/zyplayer-doc"}},[e._v("zyplayer-doc")])]),a("el-form-item",{attrs:{label:"开发人员:"}},[a("a",{attrs:{target:"_blank",href:"http://zyplayer.com"}},[e._v("暮光:城中城")])]),a("el-form-item",{attrs:{label:""}},[e._v(" 欢迎加群讨论,QQ群号:466363173,欢迎提交需求,欢迎使用和加入开发! ")])],1)],1)],1)},x=[],L={data:function(){return{leftCollapse:!0,aboutDialogVisible:!1,defaultProps:{children:"children",label:"name"},spaceUuid:"",nowPageId:"",nowSpaceShow:{},searchKeywords:"",wikiPageList:[],wikiPageExpandedKeys:[]}},mounted:function(){this.spaceUuid=this.$route.query.space||"",this.getSpaceInfo(),this.doGetPageList(null)},methods:{filterPageNode:function(e,t){return!e||-1!==t.name.indexOf(e)},handleNodeClick:function(e){this.nowPageId!=e.id&&(console.log("点击节点:",e),this.nowPageId=e.id,this.$router.push({path:"/page/share/view",query:{pageId:e.id,space:this.spaceUuid}}))},searchByKeywords:function(){this.$refs.wikiPageTree.filter(this.searchKeywords)},doGetPageList:function(){var e=this;y["a"].openPageList({space:this.spaceUuid}).then((function(t){e.wikiPageList=t.data||[],e.nowPageId=""}))},getSpaceInfo:function(){var e=this;y["a"].openSpaceInfo({space:this.spaceUuid}).then((function(t){e.nowSpaceShow=t.data}))}}},P=L,I=(a("b091"),Object(p["a"])(P,S,x,!1,null,"8f7ddbbc",null)),_=I.exports,z=[{path:"/",redirect:"/home"},{path:"/page/search",name:"WIKI-全局搜索",component:function(){return a.e("chunk-34407190").then(a.bind(null,"f890"))}},{path:"/common/noAuth",name:"WIKI-没有权限",component:function(){return a.e("chunk-2d207ece").then(a.bind(null,"a339"))}},{path:"/page/editorTest",name:"编辑内容",component:function(){return a.e("chunk-5544a2b8").then(a.bind(null,"ed40"))}},{path:"/",name:"页面管理",component:k,children:[{path:"/home",name:"WIKI文档管理",component:function(){return a.e("chunk-578c28a7").then(a.bind(null,"b3d7"))}},{path:"/user/myInfo",name:"WIKI-我的信息",component:function(){return a.e("chunk-32cc5643").then(a.bind(null,"408e"))}},{path:"/page/show",name:"WIKI-内容展示",component:function(){return Promise.all([a.e("chunk-2d20f55a"),a.e("chunk-07e56bb7")]).then(a.bind(null,"fb9f"))}},{path:"/page/edit",name:"WIKI-编辑内容",component:function(){return Promise.all([a.e("chunk-2d20f55a"),a.e("chunk-4b763d50")]).then(a.bind(null,"73f0"))}}]},{path:"/",name:"页面管理",component:_,children:[{path:"/page/share/home",name:"WIKI-开放文档",component:function(){return a.e("chunk-5dc97978").then(a.bind(null,"6d37"))}},{path:"/page/share/view",name:"WIKI-内容展示",component:function(){return Promise.all([a.e("chunk-2d20f55a"),a.e("chunk-009efa60")]).then(a.bind(null,"f33f"))}}]}],O=z,C=a("2f62"),j={namespaced:!0,state:{pageTabNameMap:{}},getters:{getPageTabNameMap:function(e){return e.pageTabNameMap}},mutations:{addTableName:function(e,t){var a=Object.assign({},e.pageTabNameMap);a[t.key]=t.val,e.pageTabNameMap=a}}};n["default"].use(C["a"]);var M=new C["a"].Store({modules:{global:j}}),D=a("bc3a"),E=a.n(D),N=a("a7fe"),U=a.n(N);n["default"].use(i.a),n["default"].use(h["a"]),n["default"].use(U.a,E.a),n["default"].prototype.$store=M;var K=new h["a"]({routes:O});K.beforeEach((function(e,t,a){e.name&&(document.title=e.name),a()}));var F=new n["default"]({el:"#app",router:K,render:function(e){return e(u)}});t["default"]=F},"85ec":function(e,t,a){},"9f03":function(e,t,a){"use strict";var n=a("4328"),o=a.n(n),i=a("d978");t["a"]={systemUpgradeInfo:function(e){return Object(i["a"])({url:"/system/info/upgrade",method:"post",data:o.a.stringify(e)})},userLogin:function(e){return Object(i["a"])({url:"/login",method:"post",data:o.a.stringify(e)})},userLogout:function(){return Object(i["a"])({url:"/logout",method:"post",data:o.a.stringify({})})},getSelfUserInfo:function(){return Object(i["a"])({url:"/user/info/selfInfo",method:"post",data:o.a.stringify({})})},getUserBaseInfo:function(e){return Object(i["a"])({url:"/zyplayer-doc-wiki/common/user/base",method:"post",data:o.a.stringify(e)})},getUserMessageList:function(e){return Object(i["a"])({url:"/user/message/list",method:"post",data:o.a.stringify(e)})},readUserMessage:function(e){return Object(i["a"])({url:"/user/message/read",method:"post",data:o.a.stringify(e)})},deleteUserMessage:function(e){return Object(i["a"])({url:"/user/message/delete",method:"post",data:o.a.stringify(e)})}}},b091:function(e,t,a){"use strict";var n=a("0127"),o=a.n(n);o.a},d978:function(e,t,a){"use strict";a("d3b7");var n=a("bc3a"),o=a.n(n),i=a("56d7"),r=o.a.create({baseURL:"./",timeout:1e4,headers:{"Content-type":"application/x-www-form-urlencoded"},withCredentials:!0}),s={"/zyplayer-doc-db/executor/execute":!0};r.interceptors.request.use((function(e){return e.needValidateResult=!0,s[e.url]&&(e.needValidateResult=!1),e}),(function(e){return console.log(e),Promise.reject(e)})),r.interceptors.response.use((function(e){if(e.message)i["default"].$message.error("请求错误:"+e.message);else{if(!e.config.needValidateResult||200==e.data.errCode)return e.data;if(400==e.data.errCode){i["default"].$message.error("请先登录");var t=encodeURIComponent(window.location.href);window.location="./#/user/login?redirect="+t}else 402==e.data.errCode?i["default"].$router.push("/common/noAuth"):200!==e.data.errCode&&i["default"].$message.error(e.data.errMsg||"未知错误")}return Promise.reject("请求错误")}),(function(e){return console.log("err"+e),i["default"].$message.info("请求错误:"+e.message),Promise.reject(e)})),t["a"]=r}}); \ No newline at end of file diff --git a/zyplayer-doc-wiki/src/main/resources/js/chunk-07e56bb7.476081ea.js b/zyplayer-doc-wiki/src/main/resources/js/chunk-07e56bb7.ca7575bc.js similarity index 100% rename from zyplayer-doc-wiki/src/main/resources/js/chunk-07e56bb7.476081ea.js rename to zyplayer-doc-wiki/src/main/resources/js/chunk-07e56bb7.ca7575bc.js diff --git a/zyplayer-doc-wiki/src/main/resources/js/chunk-34407190.0d583c2d.js b/zyplayer-doc-wiki/src/main/resources/js/chunk-34407190.69ced152.js similarity index 100% rename from zyplayer-doc-wiki/src/main/resources/js/chunk-34407190.0d583c2d.js rename to zyplayer-doc-wiki/src/main/resources/js/chunk-34407190.69ced152.js diff --git a/zyplayer-doc-wiki/src/main/resources/js/chunk-4b763d50.67c6b108.js b/zyplayer-doc-wiki/src/main/resources/js/chunk-4b763d50.e8bf0362.js similarity index 94% rename from zyplayer-doc-wiki/src/main/resources/js/chunk-4b763d50.67c6b108.js rename to zyplayer-doc-wiki/src/main/resources/js/chunk-4b763d50.e8bf0362.js index 17c56afe..13014564 100644 --- a/zyplayer-doc-wiki/src/main/resources/js/chunk-4b763d50.67c6b108.js +++ b/zyplayer-doc-wiki/src/main/resources/js/chunk-4b763d50.e8bf0362.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b763d50"],{"1a0b":function(e,t,n){(function(t,n){e.exports=n()})(0,(function(){"use strict";var e=function(){"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i=0&&t.item(n)!==this);return n>-1})};function t(e){var t=void 0;return t=document.createElement("div"),t.innerHTML=e,t.children}function n(e){return!!e&&(e instanceof HTMLCollection||e instanceof NodeList)}function i(e){var t=document.querySelectorAll(e);return n(t)?t:[t]}var o=[];function a(e){if(e){if(e instanceof a)return e;this.selector=e;var o=e.nodeType,r=[];9===o?r=[e]:1===o?r=[e]:n(e)||e instanceof Array?r=e:"string"===typeof e&&(e=e.replace("/\n/mg","").trim(),r=0===e.indexOf("<")?t(e):i(e));var c=r.length;if(!c)return this;var A=void 0;for(A=0;A=t&&(e%=t),r(this[e])},first:function(){return this.get(0)},last:function(){var e=this.length;return this.get(e-1)},on:function(e,t,n){n||(n=t,t=null);var i=[];return i=e.split(/\s+/),this.forEach((function(e){i.forEach((function(i){i&&(o.push({elem:e,type:i,fn:n}),t?e.addEventListener(i,(function(e){var i=e.target;i.matches(t)&&n.call(i,e)})):e.addEventListener(i,n))}))}))},off:function(e,t){return this.forEach((function(n){n.removeEventListener(e,t)}))},attr:function(e,t){return null==t?this[0].getAttribute(e):this.forEach((function(n){n.setAttribute(e,t)}))},addClass:function(e){return e?this.forEach((function(t){var n=void 0;t.className?(n=t.className.split(/\s/),n=n.filter((function(e){return!!e.trim()})),n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")):t.className=e})):this},removeClass:function(e){return e?this.forEach((function(t){var n=void 0;t.className&&(n=t.className.split(/\s/),n=n.filter((function(t){return t=t.trim(),!(!t||t===e)})),t.className=n.join(" "))})):this},css:function(e,t){var n=e+":"+t+";";return this.forEach((function(t){var i=(t.getAttribute("style")||"").trim(),o=void 0,a=[];i?(o=i.split(";"),o.forEach((function(e){var t=e.split(":").map((function(e){return e.trim()}));2===t.length&&a.push(t[0]+":"+t[1])})),a=a.map((function(t){return 0===t.indexOf(e)?n:t})),a.indexOf(n)<0&&a.push(n),t.setAttribute("style",a.join("; "))):t.setAttribute("style",n)}))},show:function(){return this.css("display","block")},hide:function(){return this.css("display","none")},children:function(){var e=this[0];return e?r(e.children):null},childNodes:function(){var e=this[0];return e?r(e.childNodes):null},append:function(e){return this.forEach((function(t){e.forEach((function(e){t.appendChild(e)}))}))},remove:function(){return this.forEach((function(e){if(e.remove)e.remove();else{var t=e.parentElement;t&&t.removeChild(e)}}))},isContain:function(e){var t=this[0],n=e[0];return t.contains(n)},getSizeData:function(){var e=this[0];return e.getBoundingClientRect()},getNodeName:function(){var e=this[0];return e.nodeName},find:function(e){var t=this[0];return r(t.querySelectorAll(e))},text:function(e){if(e)return this.forEach((function(t){t.innerHTML=e}));var t=this[0];return t.innerHTML.replace(/<.*?>/g,(function(){return""}))},html:function(e){var t=this[0];return null==e?t.innerHTML:(t.innerHTML=e,this)},val:function(){var e=this[0];return e.value.trim()},focus:function(){return this.forEach((function(e){e.focus()}))},parent:function(){var e=this[0];return r(e.parentElement)},parentUntil:function(e,t){var n=document.querySelectorAll(e),i=n.length;if(!i)return null;var o=t||this[0];if("BODY"===o.nodeName)return null;var a=o.parentElement,c=void 0;for(c=0;c/gm,">").replace(/"/gm,""").replace(/(\r\n|\r|\n)/g,"
")}function p(e){return"function"===typeof e}function h(e){this.editor=e,this.$elem=r('
\n \n
'),this.type="click",this._active=!1}h.prototype={constructor:h,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("bold"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("bold")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var f=function(e,t){var n=e.config.langArgs||[],i=t;return n.forEach((function(e){var t=e.reg,n=e.val;t.test(i)&&(i=i.replace(t,(function(){return n})))})),i},g=function(){};function m(e,t){var n=this,i=e.editor;this.menu=e,this.opt=t;var o=r('
'),a=t.$title,c=void 0;a&&(c=a.html(),c=f(i,c),a.html(c),a.addClass("w-e-dp-title"),o.append(a));var A=t.list||[],s=t.type||"list",l=t.onClick||g,d=r('
    ');o.append(d),A.forEach((function(e){var t=e.$elem,o=t.html();o=f(i,o),t.html(o);var a=e.value,c=r('
  • ');t&&(c.append(t),d.append(c),c.on("click",(function(e){l(a),n.hideTimeoutId=setTimeout((function(){n.hide()}),0)})))})),o.on("mouseleave",(function(e){n.hideTimeoutId=setTimeout((function(){n.hide()}),0)})),this.$container=o,this._rendered=!1,this._show=!1}function w(e){var t=this;this.editor=e,this.$elem=r('
    '),this.type="droplist",this._active=!1,this.droplist=new m(this,{width:100,$title:r("

    设置标题

    "),type:"list",list:[{$elem:r("

    H1

    "),value:"

    "},{$elem:r("

    H2

    "),value:"

    "},{$elem:r("

    H3

    "),value:"

    "},{$elem:r("

    H4

    "),value:"

    "},{$elem:r("

    H5
    "),value:"
    "},{$elem:r("

    正文

    "),value:"

    "}],onClick:function(e){t._command(e)}})}function v(e){var t=this;this.editor=e,this.$elem=r('

    '),this.type="droplist",this._active=!1,this.droplist=new m(this,{width:160,$title:r("

    字号

    "),type:"list",list:[{$elem:r('x-small'),value:"1"},{$elem:r('small'),value:"2"},{$elem:r("normal"),value:"3"},{$elem:r('large'),value:"4"},{$elem:r('x-large'),value:"5"},{$elem:r('xx-large'),value:"6"}],onClick:function(e){t._command(e)}})}function E(e){var t=this;this.editor=e,this.$elem=r('
    '),this.type="droplist",this._active=!1;var n=e.config,i=n.fontNames||[];this.droplist=new m(this,{width:100,$title:r("

    字体

    "),type:"list",list:i.map((function(e){return{$elem:r(''+e+""),value:e}})),onClick:function(e){t._command(e)}})}m.prototype={constructor:m,show:function(){this.hideTimeoutId&&clearTimeout(this.hideTimeoutId);var e=this.menu,t=e.$elem,n=this.$container;if(!this._show){if(this._rendered)n.show();else{var i=t.getSizeData().height||0,o=this.opt.width||100;n.css("margin-top",i+"px").css("width",o+"px"),t.append(n),this._rendered=!0}this._show=!0}},hide:function(){this.showTimeoutId&&clearTimeout(this.showTimeoutId);var e=this.$container;this._show&&(e.hide(),this._show=!1)}},w.prototype={constructor:w,_command:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();t.$textElem.equal(n)||t.cmd.do("formatBlock",e)},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=/^h/i,o=t.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},v.prototype={constructor:v,_command:function(e){var t=this.editor;t.cmd.do("fontSize",e)}},E.prototype={constructor:E,_command:function(e){var t=this.editor;t.cmd.do("fontName",e)}};var b=function(){},y=[];function C(e,t){this.menu=e,this.opt=t}function B(e){this.editor=e,this.$elem=r('
    '),this.type="panel",this._active=!1}function x(e){this.editor=e,this.$elem=r('
    \n \n
    '),this.type="click",this._active=!1}function I(e){this.editor=e,this.$elem=r('
    \n \n
    '),this.type="click",this._active=!1}function k(e){this.editor=e,this.$elem=r('
    \n \n
    '),this.type="click",this._active=!1}function Q(e){this.editor=e,this.$elem=r('
    \n \n
    '),this.type="click",this._active=!1}function M(e){this.editor=e,this.$elem=r('
    \n \n
    '),this.type="click",this._active=!1}function S(e){var t=this;this.editor=e,this.$elem=r('
    '),this.type="droplist",this._active=!1,this.droplist=new m(this,{width:120,$title:r("

    设置列表

    "),type:"list",list:[{$elem:r(' 有序列表'),value:"insertOrderedList"},{$elem:r(' 无序列表'),value:"insertUnorderedList"}],onClick:function(e){t._command(e)}})}function D(e){var t=this;this.editor=e,this.$elem=r('
    '),this.type="droplist",this._active=!1,this.droplist=new m(this,{width:100,$title:r("

    对齐方式

    "),type:"list",list:[{$elem:r(' 靠左'),value:"justifyLeft"},{$elem:r(' 居中'),value:"justifyCenter"},{$elem:r(' 靠右'),value:"justifyRight"}],onClick:function(e){t._command(e)}})}function _(e){var t=this;this.editor=e,this.$elem=r('
    '),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new m(this,{width:120,$title:r("

    文字颜色

    "),type:"inline-block",list:i.map((function(e){return{$elem:r(''),value:e}})),onClick:function(e){t._command(e)}})}function T(e){var t=this;this.editor=e,this.$elem=r('
    '),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new m(this,{width:120,$title:r("

    背景色

    "),type:"inline-block",list:i.map((function(e){return{$elem:r(''),value:e}})),onClick:function(e){t._command(e)}})}function F(e){this.editor=e,this.$elem=r('
    \n \n
    '),this.type="click",this._active=!1}function N(e){this.editor=e,this.$elem=r('
    \n \n
    '),this.type="panel",this._active=!1}function P(e){this.editor=e,this.$elem=r('
    \n \n
    '),this.type="panel",this._active=!1}function R(e){this.editor=e,this.$elem=r('
    '),this.type="panel",this._active=!1}function U(e){this.editor=e,this.$elem=r('
    '),this.type="panel",this._active=!1}function Y(e){this.editor=e;var t=d("w-e-img");this.$elem=r('
    '),e.imgMenuId=t,this.type="panel",this._active=!1}C.prototype={constructor:C,show:function(){var e=this,t=this.menu;if(!(y.indexOf(t)>=0)){var n=t.editor,i=r("body"),o=n.$textContainerElem,a=this.opt,c=r('
    '),A=a.width||300;c.css("width",A+"px").css("margin-left",(0-A)/2+"px");var s=r('');c.append(s),s.on("click",(function(){e.hide()}));var l=r('
      '),d=r('
      ');c.append(l).append(d);var u=a.height;u&&d.css("height",u+"px").css("overflow-y","auto");var p=a.tabs||[],h=[],g=[];p.forEach((function(e,t){if(e){var i=e.title||"",o=e.tpl||"";i=f(n,i),o=f(n,o);var a=r('
    • '+i+"
    • ");l.append(a);var c=r(o);d.append(c),a._index=t,h.push(a),g.push(c),0===t?(a._active=!0,a.addClass("w-e-active")):c.hide(),a.on("click",(function(e){a._active||(h.forEach((function(e){e._active=!1,e.removeClass("w-e-active")})),g.forEach((function(e){e.hide()})),a._active=!0,a.addClass("w-e-active"),c.show())}))}})),c.on("click",(function(e){e.stopPropagation()})),i.on("click",(function(t){e.hide()})),o.append(c),p.forEach((function(t,n){if(t){var i=t.events||[];i.forEach((function(t){var i=t.selector,o=t.type,a=t.fn||b,r=g[n];r.find(i).on(o,(function(t){t.stopPropagation();var n=a(t);n&&e.hide()}))}))}}));var m=c.find("input[type=text],textarea");m.length&&m.get(0).focus(),this.$container=c,this._hideOtherPanels(),y.push(t)}},hide:function(){var e=this.menu,t=this.$container;t&&t.remove(),y=y.filter((function(t){return t!==e}))},_hideOtherPanels:function(){y.length&&y.forEach((function(e){var t=e.panel||{};t.hide&&t.hide()}))}},B.prototype={constructor:B,onClick:function(e){var t=this.editor,n=void 0;if(this._active){if(n=t.selection.getSelectionContainerElem(),!n)return;t.selection.createRangeByElem(n),t.selection.restoreSelection(),this._createPanel(n.text(),n.attr("href"))}else t.selection.isSelectionEmpty()?this._createPanel("",""):this._createPanel(t.selection.getSelectionText(),"")},_createPanel:function(e,t){var n=this,i=d("input-link"),o=d("input-text"),a=d("btn-ok"),c=d("btn-del"),A=this._active?"inline-block":"none",s=new C(this,{width:300,tabs:[{title:"链接",tpl:'
      \n \n \n
      \n \n \n
      \n
      ',events:[{selector:"#"+a,type:"click",fn:function(){var e=r("#"+i),t=r("#"+o),a=e.val(),c=t.val();return n._insertLink(c,a),!0}},{selector:"#"+c,type:"click",fn:function(){return n._delLink(),!0}}]}]});s.show(),this.panel=s},_delLink:function(){if(this._active){var e=this.editor,t=e.selection.getSelectionContainerElem();if(t){var n=e.selection.getSelectionText();e.cmd.do("insertHTML",""+n+"")}}},_insertLink:function(e,t){var n=this.editor,i=n.config,o=i.linkCheck,a=!0;o&&"function"===typeof o&&(a=o(e,t)),!0===a?n.cmd.do("insertHTML",''+e+""):alert(a)},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();i&&("A"===i.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active")))}},x.prototype={constructor:x,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("italic"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("italic")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},I.prototype={constructor:I,onClick:function(e){var t=this.editor;t.cmd.do("redo")}},k.prototype={constructor:k,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("strikeThrough"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("strikeThrough")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},Q.prototype={constructor:Q,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("underline"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("underline")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},M.prototype={constructor:M,onClick:function(e){var t=this.editor;t.cmd.do("undo")}},S.prototype={constructor:S,_command:function(e){var t=this.editor,n=t.$textElem;if(t.selection.restoreSelection(),!t.cmd.queryCommandState(e)){t.cmd.do(e);var i=t.selection.getSelectionContainerElem();if("LI"===i.getNodeName()&&(i=i.parent()),!1!==/^ol|ul$/i.test(i.getNodeName())&&!i.equal(n)){var o=i.parent();o.equal(n)||(i.insertAfter(o),o.remove())}}},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("insertUnOrderedList")||t.cmd.queryCommandState("insertOrderedList")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},D.prototype={constructor:D,_command:function(e){var t=this.editor;t.cmd.do(e)}},_.prototype={constructor:_,_command:function(e){var t=this.editor;t.cmd.do("foreColor",e)}},T.prototype={constructor:T,_command:function(e){var t=this.editor;t.cmd.do("backColor",e)}},F.prototype={constructor:F,onClick:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem(),i=n.getNodeName();if(A.isIE()){var o=void 0,a=void 0;if("P"===i)return o=n.text(),a=r("
      "+o+"
      "),a.insertAfter(n),void n.remove();"BLOCKQUOTE"===i&&(o=n.text(),a=r("

      "+o+"

      "),a.insertAfter(n),n.remove())}else"BLOCKQUOTE"===i?t.cmd.do("formatBlock","

      "):t.cmd.do("formatBlock","

      ")},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=/^BLOCKQUOTE$/i,o=t.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},N.prototype={constructor:N,onClick:function(e){var t=this.editor,n=t.selection.getSelectionStartElem(),i=t.selection.getSelectionEndElem(),o=t.selection.isSelectionEmpty(),a=t.selection.getSelectionText(),c=void 0;if(n.equal(i))return o?void(this._active?this._createPanel(n.html()):this._createPanel()):(c=r(""+a+""),t.cmd.do("insertElem",c),t.selection.createRangeByElem(c,!1),void t.selection.restoreSelection());t.selection.restoreSelection()},_createPanel:function(e){var t=this;e=e||"";var n=e?"edit":"new",i=d("texxt"),o=d("btn"),a=new C(this,{width:500,tabs:[{title:"插入代码",tpl:'
      \n \n
      \n \n
      \n
      ',events:[{selector:"#"+o,type:"click",fn:function(){var e=r("#"+i),o=e.val()||e.html();return o=u(o),"new"===n?t._insertCode(o):t._updateCode(o),!0}}]}]});a.show(),this.panel=a},_insertCode:function(e){var t=this.editor;t.cmd.do("insertHTML","
      "+e+"


      ")},_updateCode:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();n&&(n.html(e),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();if(i){var o=i.parent();"CODE"===i.getNodeName()&&"PRE"===o.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},P.prototype={constructor:P,onClick:function(){this._createPanel()},_createPanel:function(){var e=this,t=this.editor,n=t.config,i=n.emotions||[],o=[];i.forEach((function(t){var n=t.type,i=t.content||[],a="";"emoji"===n&&i.forEach((function(e){e&&(a+=''+e+"")})),"image"===n&&i.forEach((function(e){var t=e.src,n=e.alt;t&&(a+=''+n+'')})),o.push({title:t.title,tpl:'
      '+a+"
      ",events:[{selector:"span.w-e-item",type:"click",fn:function(t){var n=t.target,i=r(n),o=i.getNodeName(),a=void 0;return a="IMG"===o?i.parent().html():""+i.html()+"",e._insert(a),!0}}]})}));var a=new C(this,{width:300,height:200,tabs:o});a.show(),this.panel=a},_insert:function(e){var t=this.editor;t.cmd.do("insertHTML",e)}},R.prototype={constructor:R,onClick:function(){this._active?this._createEditPanel():this._createInsertPanel()},_createInsertPanel:function(){var e=this,t=d("btn"),n=d("row"),i=d("col"),o=new C(this,{width:250,tabs:[{title:"插入表格",tpl:'
      \n

      \n 创建\n \n 行\n \n 列的表格\n

      \n
      \n \n
      \n
      ',events:[{selector:"#"+t,type:"click",fn:function(){var t=parseInt(r("#"+n).val()),o=parseInt(r("#"+i).val());return t&&o&&t>0&&o>0&&e._insert(t,o),!0}}]}]});o.show(),this.panel=o},_insert:function(e,t){var n=void 0,i=void 0,o='';for(n=0;n",0===n)for(i=0;i ";else for(i=0;i ";o+=""}o+="


      ";var a=this.editor;a.cmd.do("insertHTML",o),a.cmd.do("enableObjectResizing",!1),a.cmd.do("enableInlineTableEditing",!1)},_createEditPanel:function(){var e=this,t=d("add-row"),n=d("add-col"),i=d("del-row"),o=d("del-col"),a=d("del-table"),r=new C(this,{width:320,tabs:[{title:"编辑表格",tpl:'
      \n
      \n \n \n \n \n
      \n
      \n \n \n
      ',events:[{selector:"#"+t,type:"click",fn:function(){return e._addRow(),!0}},{selector:"#"+n,type:"click",fn:function(){return e._addCol(),!0}},{selector:"#"+i,type:"click",fn:function(){return e._delRow(),!0}},{selector:"#"+o,type:"click",fn:function(){return e._delCol(),!0}},{selector:"#"+a,type:"click",fn:function(){return e._delTable(),!0}}]}]});r.show()},_getLocationData:function(){var e={},t=this.editor,n=t.selection.getSelectionContainerElem();if(n){var i=n.getNodeName();if("TD"===i||"TH"===i){var o=n.parent(),a=o.children(),r=a.length;a.forEach((function(t,i){if(t===n[0])return e.td={index:i,elem:t,length:r},!1}));var c=o.parent(),A=c.children(),s=A.length;return A.forEach((function(t,n){if(t===o[0])return e.tr={index:n,elem:t,length:s},!1})),e}}},_addRow:function(){var e=this._getLocationData();if(e){var t=e.tr,n=r(t.elem),i=e.td,o=i.length,a=document.createElement("tr"),c="",A=void 0;for(A=0;A ";a.innerHTML=c,r(a).insertAfter(n)}},_addCol:function(){var e=this._getLocationData();if(e){var t=e.tr,n=e.td,i=n.index,o=r(t.elem),a=o.parent(),c=a.children();c.forEach((function(e){var t=r(e),n=t.children(),o=n.get(i),a=o.getNodeName().toLowerCase(),c=document.createElement(a);r(c).insertAfter(o)}))}},_delRow:function(){var e=this._getLocationData();if(e){var t=e.tr,n=r(t.elem);n.remove()}},_delCol:function(){var e=this._getLocationData();if(e){var t=e.tr,n=e.td,i=n.index,o=r(t.elem),a=o.parent(),c=a.children();c.forEach((function(e){var t=r(e),n=t.children(),o=n.get(i);o.remove()}))}},_delTable:function(){var e=this.editor,t=e.selection.getSelectionContainerElem();if(t){var n=t.parentUntil("table");n&&n.remove()}},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();"TD"===o||"TH"===o?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},U.prototype={constructor:U,onClick:function(){this._createPanel()},_createPanel:function(){var e=this,t=d("text-val"),n=d("btn"),i=new C(this,{width:350,tabs:[{title:"插入视频",tpl:'
      \n \n
      \n \n
      \n
      ',events:[{selector:"#"+n,type:"click",fn:function(){var n=r("#"+t),i=n.val().trim();return i&&e._insert(i),!0}}]}]});i.show(),this.panel=i},_insert:function(e){var t=this.editor;t.cmd.do("insertHTML",e+"


      ")}},Y.prototype={constructor:Y,onClick:function(){var e=this.editor,t=e.config;t.qiniu||(this._active?this._createEditPanel():this._createInsertPanel())},_createEditPanel:function(){var e=this.editor,t=d("width-30"),n=d("width-50"),i=d("width-100"),o=d("del-btn"),a=[{title:"编辑图片",tpl:'
      \n
      \n 最大宽度:\n \n \n \n
      \n
      \n \n \n
      ',events:[{selector:"#"+t,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","30%"),!0}},{selector:"#"+n,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","50%"),!0}},{selector:"#"+i,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","100%"),!0}},{selector:"#"+o,type:"click",fn:function(){var t=e._selectedImg;return t&&t.remove(),!0}}]}],r=new C(this,{width:300,tabs:a});r.show(),this.panel=r},_createInsertPanel:function(){var e=this.editor,t=e.uploadImg,n=e.config,i=d("up-trigger"),o=d("up-file"),a=d("link-url"),c=d("link-btn"),A=[{title:"上传图片",tpl:'
      \n
      \n \n
      \n
      \n \n
      \n
      ',events:[{selector:"#"+i,type:"click",fn:function(){var e=r("#"+o),t=e[0];if(!t)return!0;t.click()}},{selector:"#"+o,type:"change",fn:function(){var e=r("#"+o),n=e[0];if(!n)return!0;var i=n.files;return i.length&&t.uploadImg(i),!0}}]},{title:"网络图片",tpl:'
      \n \n
      \n \n
      \n
      ',events:[{selector:"#"+c,type:"click",fn:function(){var e=r("#"+a),n=e.val().trim();return n&&t.insertLinkImg(n),!0}}]}],s=[];(n.uploadImgShowBase64||n.uploadImgServer||n.customUploadImg)&&window.FileReader&&s.push(A[0]),n.showLinkImg&&s.push(A[1]);var l=new C(this,{width:300,tabs:s});l.show(),this.panel=l},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t._selectedImg?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var L={};function H(e){this.editor=e,this.menus={}}function j(e){var t=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,n=void 0;return n=null==t?window.clipboardData&&window.clipboardData.getData("text"):t.getData("text/plain"),u(n)}function z(e,t,n){var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,o=void 0,a=void 0;if(null==i?o=window.clipboardData&&window.clipboardData.getData("text"):(o=i.getData("text/plain"),a=i.getData("text/html")),!a&&o&&(a="

      "+u(o)+"

      "),a){var r=a.split("");return 2===r.length&&(a=r[0]),a=a.replace(/<(meta|script|link).+?>/gim,""),a=a.replace(//gm,""),a=a.replace(/\s?data-.+?=('|").+?('|")/gim,""),n&&(a=a.replace(//gim,"")),a=t?a.replace(/\s?(class|style)=('|").*?('|")/gim,""):a.replace(/\s?class=('|").*?('|")/gim,""),a}}function G(e){var t=[],n=j(e);if(n)return t;var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData||{},o=i.items;return o?(s(o,(function(e,n){var i=n.type;/image/i.test(i)&&t.push(n.getAsFile())})),t):t}function J(e){var t=[],n=e.childNodes()||[];return n.forEach((function(e){var n=void 0,i=e.nodeType;if(3===i&&(n=e.textContent,n=u(n)),1===i){n={},n.tag=e.nodeName.toLowerCase();for(var o=[],a=e.attributes||{},c=a.length||0,A=0;A
      ')}L.bold=h,L.head=w,L.fontSize=v,L.fontName=E,L.link=B,L.italic=x,L.redo=I,L.strikeThrough=k,L.underline=Q,L.undo=M,L.list=S,L.justify=D,L.foreColor=_,L.backColor=T,L.quote=F,L.code=N,L.emoticon=P,L.table=R,L.video=U,L.image=Y,H.prototype={constructor:H,init:function(){var e=this,t=this.editor,n=t.config||{},i=n.menus||[];i.forEach((function(n){var i=L[n];i&&"function"===typeof i&&(e.menus[n]=new i(t))})),this._addToToolbar(),this._bindEvent()},_addToToolbar:function(){var e=this.editor,t=e.$toolbarElem,n=this.menus,i=e.config,o=i.zIndex+1;s(n,(function(e,n){var i=n.$elem;i&&(i.css("z-index",o),t.append(i))}))},_bindEvent:function(){var e=this.menus,t=this.editor;s(e,(function(e,n){var i=n.type;if(i){var o=n.$elem,a=n.droplist;n.panel;"click"===i&&n.onClick&&o.on("click",(function(e){null!=t.selection.getRange()&&n.onClick(e)})),"droplist"===i&&a&&o.on("mouseenter",(function(e){null!=t.selection.getRange()&&(a.showTimeoutId=setTimeout((function(){a.show()}),200))})).on("mouseleave",(function(e){a.hideTimeoutId=setTimeout((function(){a.hide()}),0)})),"panel"===i&&n.onClick&&o.on("click",(function(e){e.stopPropagation(),null!=t.selection.getRange()&&n.onClick(e)}))}}))},changeActive:function(){var e=this.menus;s(e,(function(e,t){t.tryChangeActive&&setTimeout((function(){t.tryChangeActive()}),100)}))}},$.prototype={constructor:$,init:function(){this._bindEvent()},clear:function(){this.html("


      ")},html:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.html(),i=i.replace(/\u200b/gm,""),i;n.html(e),t.initSelection()},getJSON:function(){var e=this.editor,t=e.$textElem;return J(t)},text:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.text(),i=i.replace(/\u200b/gm,""),i;n.text("

      "+e+"

      "),t.initSelection()},append:function(e){var t=this.editor,n=t.$textElem;n.append(r(e)),t.initSelection()},_bindEvent:function(){this._saveRangeRealTime(),this._enterKeyHandle(),this._clearHandle(),this._pasteHandle(),this._tabHandle(),this._imgHandle(),this._dragHandle()},_saveRangeRealTime:function(){var e=this.editor,t=e.$textElem;function n(t){e.selection.saveRange(),e.menus.changeActive()}t.on("keyup",n),t.on("mousedown",(function(e){t.on("mouseleave",n)})),t.on("mouseup",(function(e){n(),t.off("mouseleave",n)}))},_enterKeyHandle:function(){var e=this.editor,t=e.$textElem;function n(t){var n=r("


      ");n.insertBefore(t),e.selection.createRangeByElem(n,!0),e.selection.restoreSelection(),t.remove()}function i(i){var o=e.selection.getSelectionContainerElem(),a=o.parent();if("
      "!==a.html()){if(a.equal(t)){var r=o.getNodeName();"P"!==r&&(o.text()||n(o))}}else n(o)}function o(t){var n=e.selection.getSelectionContainerElem();if(n){var i=n.parent(),o=n.getNodeName(),a=i.getNodeName();if("CODE"===o&&"PRE"===a&&e.cmd.queryCommandSupported("insertHTML")){if(!0===e._willBreakCode){var c=r("


      ");return c.insertAfter(i),e.selection.createRangeByElem(c,!0),e.selection.restoreSelection(),e._willBreakCode=!1,void t.preventDefault()}var A=e.selection.getRange().startOffset;e.cmd.do("insertHTML","\n"),e.selection.saveRange(),e.selection.getRange().startOffset===A&&e.cmd.do("insertHTML","\n");var s=n.html().length;e.selection.getRange().startOffset+1===s&&(e._willBreakCode=!0),t.preventDefault()}}}t.on("keyup",(function(e){13===e.keyCode&&i(e)})),t.on("keydown",(function(t){13===t.keyCode?o(t):e._willBreakCode=!1}))},_clearHandle:function(){var e=this.editor,t=e.$textElem;t.on("keydown",(function(e){if(8===e.keyCode){var n=t.html().toLowerCase().trim();"


      "!==n||e.preventDefault()}})),t.on("keyup",(function(n){if(8===n.keyCode){var i=void 0,o=t.html().toLowerCase().trim();o&&"
      "!==o||(i=r("


      "),t.html(""),t.append(i),e.selection.createRangeByElem(i,!1,!0),e.selection.restoreSelection())}}))},_pasteHandle:function(){var e=this.editor,t=e.config,n=t.pasteFilterStyle,i=t.pasteTextHandle,o=t.pasteIgnoreImg,a=e.$textElem,r=0;function c(){var e=Date.now(),t=!1;return e-r>=100&&(t=!0),r=e,t}function s(){r=0}a.on("paste",(function(t){if(!A.isIE()&&(t.preventDefault(),c())){var a=z(t,n,o),r=j(t);r=r.replace(/\n/gm,"
      ");var l=e.selection.getSelectionContainerElem();if(l){var d=l.getNodeName();if("CODE"===d||"PRE"===d)return i&&p(i)&&(r=""+(i(r)||"")),void e.cmd.do("insertHTML","

      "+r+"

      ");if(a)try{i&&p(i)&&(a=""+(i(a)||"")),e.cmd.do("insertHTML",a)}catch(u){i&&p(i)&&(r=""+(i(r)||"")),e.cmd.do("insertHTML","

      "+r+"

      ")}else s()}}})),a.on("paste",(function(t){if(!A.isIE()&&(t.preventDefault(),c())){var n=G(t);if(n&&n.length){var i=e.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();if("CODE"!==o&&"PRE"!==o){var a=e.uploadImg;a.uploadImg(n)}}}}}))},_tabHandle:function(){var e=this.editor,t=e.$textElem;t.on("keydown",(function(t){if(9===t.keyCode&&e.cmd.queryCommandSupported("insertHTML")){var n=e.selection.getSelectionContainerElem();if(n){var i=n.parent(),o=n.getNodeName(),a=i.getNodeName();"CODE"===o&&"PRE"===a?e.cmd.do("insertHTML"," "):e.cmd.do("insertHTML","    "),t.preventDefault()}}}))},_imgHandle:function(){var e=this.editor,t=e.$textElem;t.on("click","img",(function(t){var n=this,i=r(n);"1"!==i.attr("data-w-e")&&(e._selectedImg=i,e.selection.createRangeByElem(i),e.selection.restoreSelection())})),t.on("click keyup",(function(t){t.target.matches("img")||(e._selectedImg=null)}))},_dragHandle:function(){var e=this.editor,t=r(document);t.on("dragleave drop dragenter dragover",(function(e){e.preventDefault()}));var n=e.$textElem;n.on("drop",(function(t){t.preventDefault();var n=t.dataTransfer&&t.dataTransfer.files;if(n&&n.length){var i=e.uploadImg;i.uploadImg(n)}}))}},O.prototype={constructor:O,do:function(e,t){var n=this.editor;if(n._useStyleWithCSS||(document.execCommand("styleWithCSS",null,!0),n._useStyleWithCSS=!0),n.selection.getRange()){n.selection.restoreSelection();var i="_"+e;this[i]?this[i](t):this._execCommand(e,t),n.menus.changeActive(),n.selection.saveRange(),n.selection.restoreSelection(),n.change&&n.change()}},_insertHTML:function(e){var t=this.editor,n=t.selection.getRange();this.queryCommandSupported("insertHTML")?this._execCommand("insertHTML",e):n.insertNode?(n.deleteContents(),n.insertNode(r(e)[0])):n.pasteHTML&&n.pasteHTML(e)},_insertElem:function(e){var t=this.editor,n=t.selection.getRange();n.insertNode&&(n.deleteContents(),n.insertNode(e[0]))},_execCommand:function(e,t){document.execCommand(e,!1,t)},queryCommandValue:function(e){return document.queryCommandValue(e)},queryCommandState:function(e){return document.queryCommandState(e)},queryCommandSupported:function(e){return document.queryCommandSupported(e)}},V.prototype={constructor:V,getRange:function(){return this._currentRange},saveRange:function(e){if(e)this._currentRange=e;else{var t=window.getSelection();if(0!==t.rangeCount){var n=t.getRangeAt(0),i=this.getSelectionContainerElem(n);if(i&&"false"!==i.attr("contenteditable")&&!i.parentUntil("[contenteditable=false]")){var o=this.editor,a=o.$textElem;a.isContain(i)&&(this._currentRange=n)}}}},collapseRange:function(e){null==e&&(e=!1);var t=this._currentRange;t&&t.collapse(e)},getSelectionText:function(){var e=this._currentRange;return e?this._currentRange.toString():""},getSelectionContainerElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.commonAncestorContainer,r(1===t.nodeType?t:t.parentNode)},getSelectionStartElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.startContainer,r(1===t.nodeType?t:t.parentNode)},getSelectionEndElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.endContainer,r(1===t.nodeType?t:t.parentNode)},isSelectionEmpty:function(){var e=this._currentRange;return!(!e||!e.startContainer||e.startContainer!==e.endContainer||e.startOffset!==e.endOffset)},restoreSelection:function(){var e=window.getSelection();e.removeAllRanges(),e.addRange(this._currentRange)},createEmptyRange:function(){var e=this.editor,t=this.getRange(),n=void 0;if(t&&this.isSelectionEmpty())try{A.isWebkit()?(e.cmd.do("insertHTML","​"),t.setEnd(t.endContainer,t.endOffset+1),this.saveRange(t)):(n=r(""),e.cmd.do("insertElem",n),this.createRangeByElem(n,!0))}catch(i){}},createRangeByElem:function(e,t,n){if(e.length){var i=e[0],o=document.createRange();n?o.selectNodeContents(i):o.selectNode(i),"boolean"===typeof t&&o.collapse(t),this.saveRange(o)}}},K.prototype={constructor:K,show:function(e){var t=this;if(!this._isShow){this._isShow=!0;var n=this.$bar;if(this._isRender)this._isRender=!0;else{var i=this.$textContainer;i.append(n)}Date.now()-this._time>100&&e<=1&&(n.css("width",100*e+"%"),this._time=Date.now());var o=this._timeoutId;o&&clearTimeout(o),o=setTimeout((function(){t._hide()}),500)}},_hide:function(){var e=this.$bar;e.remove(),this._time=0,this._isShow=!1,this._isRender=!1}};var q="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function W(e){this.editor=e}W.prototype={constructor:W,_alert:function(e,t){var n=this.editor,i=n.config.debug,o=n.config.customAlert;if(i)throw new Error("wangEditor: "+(t||e));o&&"function"===typeof o?o(e):alert(e)},insertLinkImg:function(e){var t=this;if(e){var n=this.editor,i=n.config,o=i.linkImgCheck,a=void 0;if(o&&"function"===typeof o&&(a=o(e),"string"===typeof a))alert(a);else{n.cmd.do("insertHTML",'');var r=document.createElement("img");r.onload=function(){var t=i.linkImgCallback;t&&"function"===typeof t&&t(e),r=null},r.onerror=function(){r=null,t._alert("插入图片错误",'wangEditor: 插入图片出错,图片链接是 "'+e+'",下载该链接失败')},r.onabort=function(){r=null},r.src=e}}},uploadImg:function(e){var t=this;if(e&&e.length){var n=this.editor,i=n.config,o=i.uploadImgServer,a=i.uploadImgShowBase64,r=i.uploadImgMaxSize,c=r/1024/1024,A=i.uploadImgMaxLength||1e4,d=i.uploadFileName||"",u=i.uploadImgParams||{},p=i.uploadImgParamsWithUrl,h=i.uploadImgHeaders||{},f=i.uploadImgHooks||{},g=i.uploadImgTimeout||3e3,m=i.withCredentials;null==m&&(m=!1);var w=i.customUploadImg;if(w||o||a){var v=[],E=[];if(l(e,(function(e){var t=e.name,n=e.size;t&&n&&(!1!==/\.(jpg|jpeg|png|bmp|gif|webp)$/i.test(t)?rA)this._alert("一次最多上传"+A+"张图片");else if(w&&"function"===typeof w)w(v,this.insertLinkImg.bind(this));else{var b=new FormData;if(l(v,(function(e){var t=d||e.name;b.append(t,e)})),o&&"string"===typeof o){var y=o.split("#");o=y[0];var C=y[1]||"";s(u,(function(e,t){p&&(o.indexOf("?")>0?o+="&":o+="?",o=o+e+"="+t),b.append(e,t)})),C&&(o+="#"+C);var B=new XMLHttpRequest;if(B.open("POST",o),B.timeout=g,B.ontimeout=function(){f.timeout&&"function"===typeof f.timeout&&f.timeout(B,n),t._alert("上传图片超时")},B.upload&&(B.upload.onprogress=function(e){var t=void 0,i=new K(n);e.lengthComputable&&(t=e.loaded/e.total,i.show(t))}),B.onreadystatechange=function(){var e=void 0;if(4===B.readyState){if(B.status<200||B.status>=300)return f.error&&"function"===typeof f.error&&f.error(B,n),void t._alert("上传图片发生错误","上传图片发生错误,服务器返回状态是 "+B.status);if(e=B.responseText,"object"!==("undefined"===typeof e?"undefined":q(e)))try{e=JSON.parse(e)}catch(o){return f.fail&&"function"===typeof f.fail&&f.fail(B,n,e),void t._alert("上传图片失败","上传图片返回结果错误,返回结果是: "+e)}if(f.customInsert||"0"==e.errno){if(f.customInsert&&"function"===typeof f.customInsert)f.customInsert(t.insertLinkImg.bind(t),e,n);else{var i=e.data||[];i.forEach((function(e){t.insertLinkImg(e)}))}f.success&&"function"===typeof f.success&&f.success(B,n,e)}else f.fail&&"function"===typeof f.fail&&f.fail(B,n,e),t._alert("上传图片失败","上传图片返回结果错误,返回结果 errno="+e.errno)}},f.before&&"function"===typeof f.before){var x=f.before(B,n,v);if(x&&"object"===("undefined"===typeof x?"undefined":q(x))&&x.prevent)return void this._alert(x.msg)}return s(h,(function(e,t){B.setRequestHeader(e,t)})),B.withCredentials=m,void B.send(b)}a&&l(e,(function(e){var n=t,i=new FileReader;i.readAsDataURL(e),i.onload=function(){n.insertLinkImg(this.result)}}))}}}}};var X=1;function Z(e,t){if(null==e)throw new Error("错误:初始化编辑器时候未传入任何参数,请查阅文档");this.id="wangEditor-"+X++,this.toolbarSelector=e,this.textSelector=t,this.customConfig={}}Z.prototype={constructor:Z,_initConfig:function(){var e={};this.config=Object.assign(e,c,this.customConfig);var t=this.config.lang||{},n=[];s(t,(function(e,t){n.push({reg:new RegExp(e,"img"),val:t})})),this.config.langArgs=n},_initDom:function(){var e=this,t=this.toolbarSelector,n=r(t),i=this.textSelector,o=this.config,a=o.zIndex,c=void 0,A=void 0,s=void 0,l=void 0;null==i?(c=r("
      "),A=r("
      "),l=n.children(),n.append(c).append(A),c.css("background-color","#f1f1f1").css("border","1px solid #ccc"),A.css("border","1px solid #ccc").css("border-top","none").css("height","300px")):(c=n,A=r(i),l=A.children()),s=r("
      "),s.attr("contenteditable","true").css("width","100%").css("height","100%"),l&&l.length?s.append(l):s.append(r("


      ")),A.append(s),c.addClass("w-e-toolbar"),A.addClass("w-e-text-container"),A.css("z-index",a),s.addClass("w-e-text");var u=d("toolbar-elem");c.attr("id",u);var p=d("text-elem");s.attr("id",p),this.$toolbarElem=c,this.$textContainerElem=A,this.$textElem=s,this.toolbarElemId=u,this.textElemId=p;var h=!0;A.on("compositionstart",(function(){h=!1})),A.on("compositionend",(function(){h=!0})),A.on("click keyup",(function(){h&&e.change&&e.change()})),c.on("click",(function(){this.change&&this.change()})),(o.onfocus||o.onblur)&&(this.isFocus=!1,r(document).on("click",(function(t){var n=s.isContain(r(t.target)),i=c.isContain(r(t.target)),o=c[0]==t.target;if(n)e.isFocus||e.onfocus&&e.onfocus(),e.isFocus=!0;else{if(i&&!o)return;e.isFocus&&e.onblur&&e.onblur(),e.isFocus=!1}})))},_initCommand:function(){this.cmd=new O(this)},_initSelectionAPI:function(){this.selection=new V(this)},_initUploadImg:function(){this.uploadImg=new W(this)},_initMenus:function(){this.menus=new H(this),this.menus.init()},_initText:function(){this.txt=new $(this),this.txt.init()},initSelection:function(e){var t=this.$textElem,n=t.children();if(!n.length)return t.append(r("


      ")),void this.initSelection();var i=n.last();if(e){var o=i.html().toLowerCase(),a=i.getNodeName();if("
      "!==o&&"
      "!==o||"P"!==a)return t.append(r("


      ")),void this.initSelection()}this.selection.createRangeByElem(i,!1,!0),this.selection.restoreSelection()},_bindEvent:function(){var e=0,t=this.txt.html(),n=this.config,i=n.onchangeTimeout;i=parseInt(i,10),(!i||i<=0)&&(i=200);var o=n.onchange;o&&"function"===typeof o&&(this.change=function(){var n=this.txt.html();n.length===t.length&&n===t||(e&&clearTimeout(e),e=setTimeout((function(){o(n),t=n}),i))});var a=n.onblur;a&&"function"===typeof a&&(this.onblur=function(){var e=this.txt.html();a(e)});var r=n.onfocus;r&&"function"===typeof r&&(this.onfocus=function(){r()})},create:function(){this._initConfig(),this._initDom(),this._initCommand(),this._initSelectionAPI(),this._initText(),this._initMenus(),this._initUploadImg(),this.initSelection(!0),this._bindEvent()},_offAllEvent:function(){r.offAll()}};try{document}catch(ie){throw new Error("请在浏览器环境下运行")}e();var ee='.w-e-toolbar,.w-e-text-container,.w-e-menu-panel { padding: 0; margin: 0; box-sizing: border-box;}.w-e-toolbar *,.w-e-text-container *,.w-e-menu-panel * { padding: 0; margin: 0; box-sizing: border-box;}.w-e-clear-fix:after { content: ""; display: table; clear: both;}.w-e-toolbar .w-e-droplist { position: absolute; left: 0; top: 0; background-color: #fff; border: 1px solid #f1f1f1; border-right-color: #ccc; border-bottom-color: #ccc;}.w-e-toolbar .w-e-droplist .w-e-dp-title { text-align: center; color: #999; line-height: 2; border-bottom: 1px solid #f1f1f1; font-size: 13px;}.w-e-toolbar .w-e-droplist ul.w-e-list { list-style: none; line-height: 1;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { color: #333; padding: 5px 0;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { background-color: #f1f1f1;}.w-e-toolbar .w-e-droplist ul.w-e-block { list-style: none; text-align: left; padding: 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { display: inline-block; *display: inline; *zoom: 1; padding: 3px 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { background-color: #f1f1f1;}@font-face { font-family: \'w-e-icon\'; src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABhQAAsAAAAAGAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPBGNtYXAAAAFoAAABBAAAAQQrSf4BZ2FzcAAAAmwAAAAIAAAACAAAABBnbHlmAAACdAAAEvAAABLwfpUWUWhlYWQAABVkAAAANgAAADYQp00kaGhlYQAAFZwAAAAkAAAAJAfEA+FobXR4AAAVwAAAAIQAAACEeAcD7GxvY2EAABZEAAAARAAAAERBSEX+bWF4cAAAFogAAAAgAAAAIAAsALZuYW1lAAAWqAAAAYYAAAG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ADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format(\'truetype\'); font-weight: normal; font-style: normal;}[class^="w-e-icon-"],[class*=" w-e-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: \'w-e-icon\' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.w-e-icon-close:before { content: "\\f00d";}.w-e-icon-upload2:before { content: "\\e9c6";}.w-e-icon-trash-o:before { content: "\\f014";}.w-e-icon-header:before { content: "\\f1dc";}.w-e-icon-pencil2:before { content: "\\e906";}.w-e-icon-paint-brush:before { content: "\\f1fc";}.w-e-icon-image:before { content: "\\e90d";}.w-e-icon-play:before { content: "\\e912";}.w-e-icon-location:before { content: "\\e947";}.w-e-icon-undo:before { content: "\\e965";}.w-e-icon-redo:before { content: "\\e966";}.w-e-icon-quotes-left:before { content: "\\e977";}.w-e-icon-list-numbered:before { content: "\\e9b9";}.w-e-icon-list2:before { content: "\\e9bb";}.w-e-icon-link:before { content: "\\e9cb";}.w-e-icon-happy:before { content: "\\e9df";}.w-e-icon-bold:before { content: "\\ea62";}.w-e-icon-underline:before { content: "\\ea63";}.w-e-icon-italic:before { content: "\\ea64";}.w-e-icon-strikethrough:before { content: "\\ea65";}.w-e-icon-table2:before { content: "\\ea71";}.w-e-icon-paragraph-left:before { content: "\\ea77";}.w-e-icon-paragraph-center:before { content: "\\ea78";}.w-e-icon-paragraph-right:before { content: "\\ea79";}.w-e-icon-terminal:before { content: "\\f120";}.w-e-icon-page-break:before { content: "\\ea68";}.w-e-icon-cancel-circle:before { content: "\\ea0d";}.w-e-icon-font:before { content: "\\ea5c";}.w-e-icon-text-heigh:before { content: "\\ea5f";}.w-e-toolbar { display: -webkit-box; display: -ms-flexbox; display: flex; padding: 0 5px; /* flex-wrap: wrap; */ /* 单个菜单 */}.w-e-toolbar .w-e-menu { position: relative; text-align: center; padding: 5px 10px; cursor: pointer;}.w-e-toolbar .w-e-menu i { color: #999;}.w-e-toolbar .w-e-menu:hover i { color: #333;}.w-e-toolbar .w-e-active i { color: #1e88e5;}.w-e-toolbar .w-e-active:hover i { color: #1e88e5;}.w-e-text-container .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; /* 为 emotion panel 定制的样式 */ /* 上传图片的 panel 定制样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover { color: #333;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: -webkit-box; display: -ms-flexbox; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px; /* 输入框的样式 */ /* 按钮的样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both;}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block; *display: inline; *zoom: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container { text-align: center;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn { display: inline-block; *display: inline; *zoom: 1; color: #999; cursor: pointer; font-size: 60px; line-height: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover { color: #333;}.w-e-text-container { position: relative;}.w-e-text-container .w-e-progress { position: absolute; background-color: #1e88e5; bottom: 0; left: 0; height: 1px;}.w-e-text { padding: 0 10px; overflow-y: scroll;}.w-e-text p,.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text table,.w-e-text pre { margin: 10px 0; line-height: 1.5;}.w-e-text ul,.w-e-text ol { margin: 10px 0 10px 20px;}.w-e-text blockquote { display: block; border-left: 8px solid #d0e5f2; padding: 5px 10px; margin: 10px 0; line-height: 1.4; font-size: 100%; background-color: #f1f1f1;}.w-e-text code { display: inline-block; *display: inline; *zoom: 1; background-color: #f1f1f1; border-radius: 3px; padding: 3px 5px; margin: 0 3px;}.w-e-text pre code { display: block;}.w-e-text table { border-top: 1px solid #ccc; border-left: 1px solid #ccc;}.w-e-text table td,.w-e-text table th { border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px;}.w-e-text table th { border-bottom: 2px solid #ccc; text-align: center;}.w-e-text:focus { outline: none;}.w-e-text img { cursor: pointer;}.w-e-text img:hover { box-shadow: 0 0 5px #333;}',te=document.createElement("style");te.type="text/css",te.innerHTML=ee,document.getElementsByTagName("HEAD").item(0).appendChild(te);var ne=window.wangEditor||Z;return ne}))},"5e96":function(e,t,n){"use strict";var i=n("c85a"),o=n.n(i);o.a},"64e1":function(e,t,n){},"73f0":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-edit-vue",staticStyle:{height:"100%"}},[n("el-row",{staticStyle:{height:"100%",overflow:"auto",padding:"20px","box-sizing":"border-box"},attrs:{type:"border-card"}},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:16}},[e.pageId?[n("span",[e._v("编辑方式:")]),n("el-select",{attrs:{disabled:!!e.pageId},on:{change:e.editorTypeChange},model:{value:e.wikiPageEdit.editorType,callback:function(t){e.$set(e.wikiPageEdit,"editorType",t)},expression:"wikiPageEdit.editorType"}},[n("el-option",{attrs:{label:"HTML",value:1}}),n("el-option",{attrs:{label:"Markdown",value:2}})],1)]:[n("span",{staticStyle:{"margin-right":"20px"}},[e._v("父级:"+e._s(e.parentWikiPage.name||"/"))]),e.parentId?n("el-tooltip",{staticClass:"item",attrs:{content:"在根目录创建文档"}},[n("el-button",{staticStyle:{padding:"0 10px"},attrs:{type:"text"},on:{click:e.changeToRootPath}},[e._v("根目录")])],1):e._e(),n("span",{staticStyle:{"margin-left":"50px"}},[e._v("编辑方式:")]),n("el-select",{attrs:{disabled:!!e.pageId},on:{change:e.editorTypeChange},model:{value:e.wikiPageEdit.editorType,callback:function(t){e.$set(e.wikiPageEdit,"editorType",t)},expression:"wikiPageEdit.editorType"}},[n("el-option",{attrs:{label:"HTML",value:1}}),n("el-option",{attrs:{label:"Markdown",value:2}})],1)]],2),n("el-col",{staticStyle:{"text-align":"right"},attrs:{span:8}},[n("el-button",{attrs:{type:"primary",icon:"el-icon-document-checked"},on:{click:function(t){return e.createWikiSave(1)}}},[e._v("保存并查看")]),n("el-button",{attrs:{type:"success",icon:"el-icon-check"},on:{click:function(t){return e.createWikiSave(0)}}},[e._v("仅保存")]),n("el-button",{attrs:{icon:"el-icon-back"},on:{click:e.createWikiCancel}},[e._v("取消")])],1)],1),n("el-input",{staticClass:"page-title-input",attrs:{placeholder:"请输入标题"},model:{value:e.wikiPageEdit.pageTitle,callback:function(t){e.$set(e.wikiPageEdit,"pageTitle",t)},expression:"wikiPageEdit.pageTitle"}}),n("mavon-editor",{directives:[{name:"show",rawName:"v-show",value:2===e.wikiPageEdit.editorType,expression:"wikiPageEdit.editorType===2"}],ref:"mavonEditor",staticClass:"page-content-editor",attrs:{toolbars:e.toolbars,placeholder:"请录入文档内容"},on:{save:function(t){return e.createWikiSave(0)},imgAdd:e.addMarkdownImage},model:{value:e.markdownContent,callback:function(t){e.markdownContent=t},expression:"markdownContent"}}),n("div",{directives:[{name:"show",rawName:"v-show",value:1===e.wikiPageEdit.editorType,expression:"wikiPageEdit.editorType===1"}],staticClass:"page-content-editor",attrs:{id:"newPageContentDiv"}})],1)],1)},o=[],a=(n("b0c0"),n("1a0b")),r=n.n(a),c=n("0a79"),A=n("b2d8"),s=(n("64e1"),n("bc3a")),l=n.n(s),d={props:["spaceId"],data:function(){return{editor:{},wikiPageEdit:{editorType:1,pageTitle:""},wikiPage:{},parentWikiPage:{},isUnlock:!1,pageId:"",parentId:"",markdownContent:"",toolbars:{bold:!0,italic:!0,header:!0,underline:!0,strikethrough:!0,mark:!0,superscript:!0,subscript:!0,quote:!0,ol:!0,ul:!0,link:!0,imagelink:!0,code:!0,table:!0,fullscreen:!0,readmodel:!0,undo:!0,redo:!0,trash:!0,save:!0,navigation:!0,alignleft:!0,aligncenter:!0,alignright:!0,subfield:!0,preview:!0},fileUploadUrl:".//zyplayer-doc-wiki/page/file/wangEditor/upload"}},components:{"mavon-editor":A["mavonEditor"]},destroyed:function(){this.unlockPage()},beforeRouteUpdate:function(e,t,n){this.initQueryParam(e),n()},mounted:function(){this.initEditor(),this.initQueryParam(this.$route);var e=this;window.onunload=function(){e.unlockPage()},window.onbeforeunload=function(){e.unlockPage()}},methods:{changeToRootPath:function(){this.parentId="",this.parentWikiPage={}},editorTypeChange:function(){},unlockPage:function(){this.isUnlock||(this.isUnlock=!0,c["a"].pageUnlock({pageId:this.pageId}))},createWikiCancel:function(){var e=this;this.$confirm("确定要取消编辑吗?您编辑的内容将不会被保存哦~","提示",{confirmButtonText:"确定",cancelButtonText:"继续编辑",type:"warning"}).then((function(){e.unlockPage(),e.$router.back()}))},createWikiSave:function(e){var t=this;if(this.wikiPageEdit.pageTitle){var n="",i="";2===this.wikiPageEdit.editorType?(n=this.markdownContent,i=this.markdownContent):(n=this.editor.txt.html(),i=this.editor.txt.text());var o=this.pageId>0?"":this.parentId,a={spaceId:this.spaceId,parentId:o,id:this.wikiPage.id,name:this.wikiPageEdit.pageTitle,editorType:this.wikiPageEdit.editorType,content:n,preview:i};c["a"].updatePage(a).then((function(n){t.$message.success("保存成功!"),t.$emit("loadPageList"),t.pageId=n.data.id,1==e?t.$router.push({path:"/page/show",query:{pageId:t.pageId}}):t.loadPageDetail(t.pageId)}))}else this.$message.warning("标题不能为空")},loadPageDetail:function(e){var t=this;c["a"].pageDetail({id:e}).then((function(e){t.wikiPage=e.data.wikiPage||{},t.pageContent=e.data.pageContent||{},t.pageFileList=e.data.fileList||[],t.wikiPageEdit.pageTitle=t.wikiPage.name,t.wikiPageEdit.editorType=t.wikiPage.editorType,2===t.wikiPageEdit.editorType?t.markdownContent=t.pageContent.content||"":t.editor.txt.html(t.pageContent.content||"")}))},loadParentPageDetail:function(e){var t=this;e&&c["a"].pageDetail({id:e}).then((function(e){t.parentWikiPage=e.data.wikiPage||{}}))},cleanPage:function(){this.wikiPage={},this.pageContent={},this.pageFileList=[],this.wikiPageEdit.pageTitle="",this.editor.txt&&this.editor.txt.html("")},initQueryParam:function(e){var t=this;this.pageId=e.query.pageId,this.parentId=e.query.parentId,this.pageId?(this.loadPageDetail(this.pageId),c["a"].pageLock({pageId:this.pageId}).catch((function(e){var n=t;t.$alert(e.errMsg||"未知错误","错误",{confirmButtonText:"确定",callback:function(){n.$router.back()}})}))):(this.loadParentPageDetail(this.parentId),this.cleanPage())},addMarkdownImage:function(e,t){var n=this,i=new FormData;i.append("files",t),l()({url:this.fileUploadUrl,method:"post",data:i,headers:{"Content-Type":"multipart/form-data"},timeout:1e4,withCredentials:!0}).then((function(t){var i=t.data.data||[];i.length>0?n.$refs.mavonEditor.$img2Url(e,i[0]):n.$message.warning("上传失败,返回数据为空")})).catch((function(e){n.$message.warning("上传失败:"+e.message)}))},initEditor:function(){this.editor=new r.a("#newPageContentDiv"),this.editor.customConfig.uploadImgServer=".//zyplayer-doc-wiki/page/file/wangEditor/upload",this.editor.customConfig.zIndex=100,this.editor.customConfig.uploadFileName="files",this.editor.customConfig.uploadImgMaxLength=1,this.editor.customConfig.pasteFilterStyle=!1,this.editor.customConfig.withCredentials=!0,this.editor.create()}}},u=d,p=(n("5e96"),n("2877")),h=Object(p["a"])(u,i,o,!1,null,null,null);t["default"]=h.exports},c85a:function(e,t,n){}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b763d50"],{"1a0b":function(e,t,n){(function(t,n){e.exports=n()})(0,(function(){"use strict";var e=function(){"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i=0&&t.item(n)!==this);return n>-1})};function t(e){var t=void 0;return t=document.createElement("div"),t.innerHTML=e,t.children}function n(e){return!!e&&(e instanceof HTMLCollection||e instanceof NodeList)}function i(e){var t=document.querySelectorAll(e);return n(t)?t:[t]}var o=[];function a(e){if(e){if(e instanceof a)return e;this.selector=e;var o=e.nodeType,r=[];9===o?r=[e]:1===o?r=[e]:n(e)||e instanceof Array?r=e:"string"===typeof e&&(e=e.replace("/\n/mg","").trim(),r=0===e.indexOf("<")?t(e):i(e));var c=r.length;if(!c)return this;var A=void 0;for(A=0;A=t&&(e%=t),r(this[e])},first:function(){return this.get(0)},last:function(){var e=this.length;return this.get(e-1)},on:function(e,t,n){n||(n=t,t=null);var i=[];return i=e.split(/\s+/),this.forEach((function(e){i.forEach((function(i){i&&(o.push({elem:e,type:i,fn:n}),t?e.addEventListener(i,(function(e){var i=e.target;i.matches(t)&&n.call(i,e)})):e.addEventListener(i,n))}))}))},off:function(e,t){return this.forEach((function(n){n.removeEventListener(e,t)}))},attr:function(e,t){return null==t?this[0].getAttribute(e):this.forEach((function(n){n.setAttribute(e,t)}))},addClass:function(e){return e?this.forEach((function(t){var n=void 0;t.className?(n=t.className.split(/\s/),n=n.filter((function(e){return!!e.trim()})),n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")):t.className=e})):this},removeClass:function(e){return e?this.forEach((function(t){var n=void 0;t.className&&(n=t.className.split(/\s/),n=n.filter((function(t){return t=t.trim(),!(!t||t===e)})),t.className=n.join(" "))})):this},css:function(e,t){var n=e+":"+t+";";return this.forEach((function(t){var i=(t.getAttribute("style")||"").trim(),o=void 0,a=[];i?(o=i.split(";"),o.forEach((function(e){var t=e.split(":").map((function(e){return e.trim()}));2===t.length&&a.push(t[0]+":"+t[1])})),a=a.map((function(t){return 0===t.indexOf(e)?n:t})),a.indexOf(n)<0&&a.push(n),t.setAttribute("style",a.join("; "))):t.setAttribute("style",n)}))},show:function(){return this.css("display","block")},hide:function(){return this.css("display","none")},children:function(){var e=this[0];return e?r(e.children):null},childNodes:function(){var e=this[0];return e?r(e.childNodes):null},append:function(e){return this.forEach((function(t){e.forEach((function(e){t.appendChild(e)}))}))},remove:function(){return this.forEach((function(e){if(e.remove)e.remove();else{var t=e.parentElement;t&&t.removeChild(e)}}))},isContain:function(e){var t=this[0],n=e[0];return t.contains(n)},getSizeData:function(){var e=this[0];return e.getBoundingClientRect()},getNodeName:function(){var e=this[0];return e.nodeName},find:function(e){var t=this[0];return r(t.querySelectorAll(e))},text:function(e){if(e)return this.forEach((function(t){t.innerHTML=e}));var t=this[0];return t.innerHTML.replace(/<.*?>/g,(function(){return""}))},html:function(e){var t=this[0];return null==e?t.innerHTML:(t.innerHTML=e,this)},val:function(){var e=this[0];return e.value.trim()},focus:function(){return this.forEach((function(e){e.focus()}))},parent:function(){var e=this[0];return r(e.parentElement)},parentUntil:function(e,t){var n=document.querySelectorAll(e),i=n.length;if(!i)return null;var o=t||this[0];if("BODY"===o.nodeName)return null;var a=o.parentElement,c=void 0;for(c=0;c/gm,">").replace(/"/gm,""").replace(/(\r\n|\r|\n)/g,"
      ")}function p(e){return"function"===typeof e}function h(e){this.editor=e,this.$elem=r('
      \n \n
      '),this.type="click",this._active=!1}h.prototype={constructor:h,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("bold"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("bold")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var f=function(e,t){var n=e.config.langArgs||[],i=t;return n.forEach((function(e){var t=e.reg,n=e.val;t.test(i)&&(i=i.replace(t,(function(){return n})))})),i},g=function(){};function m(e,t){var n=this,i=e.editor;this.menu=e,this.opt=t;var o=r('
      '),a=t.$title,c=void 0;a&&(c=a.html(),c=f(i,c),a.html(c),a.addClass("w-e-dp-title"),o.append(a));var A=t.list||[],s=t.type||"list",l=t.onClick||g,d=r('
        ');o.append(d),A.forEach((function(e){var t=e.$elem,o=t.html();o=f(i,o),t.html(o);var a=e.value,c=r('
      • ');t&&(c.append(t),d.append(c),c.on("click",(function(e){l(a),n.hideTimeoutId=setTimeout((function(){n.hide()}),0)})))})),o.on("mouseleave",(function(e){n.hideTimeoutId=setTimeout((function(){n.hide()}),0)})),this.$container=o,this._rendered=!1,this._show=!1}function w(e){var t=this;this.editor=e,this.$elem=r('
        '),this.type="droplist",this._active=!1,this.droplist=new m(this,{width:100,$title:r("

        设置标题

        "),type:"list",list:[{$elem:r("

        H1

        "),value:"

        "},{$elem:r("

        H2

        "),value:"

        "},{$elem:r("

        H3

        "),value:"

        "},{$elem:r("

        H4

        "),value:"

        "},{$elem:r("

        H5
        "),value:"
        "},{$elem:r("

        正文

        "),value:"

        "}],onClick:function(e){t._command(e)}})}function v(e){var t=this;this.editor=e,this.$elem=r('

        '),this.type="droplist",this._active=!1,this.droplist=new m(this,{width:160,$title:r("

        字号

        "),type:"list",list:[{$elem:r('x-small'),value:"1"},{$elem:r('small'),value:"2"},{$elem:r("normal"),value:"3"},{$elem:r('large'),value:"4"},{$elem:r('x-large'),value:"5"},{$elem:r('xx-large'),value:"6"}],onClick:function(e){t._command(e)}})}function E(e){var t=this;this.editor=e,this.$elem=r('
        '),this.type="droplist",this._active=!1;var n=e.config,i=n.fontNames||[];this.droplist=new m(this,{width:100,$title:r("

        字体

        "),type:"list",list:i.map((function(e){return{$elem:r(''+e+""),value:e}})),onClick:function(e){t._command(e)}})}m.prototype={constructor:m,show:function(){this.hideTimeoutId&&clearTimeout(this.hideTimeoutId);var e=this.menu,t=e.$elem,n=this.$container;if(!this._show){if(this._rendered)n.show();else{var i=t.getSizeData().height||0,o=this.opt.width||100;n.css("margin-top",i+"px").css("width",o+"px"),t.append(n),this._rendered=!0}this._show=!0}},hide:function(){this.showTimeoutId&&clearTimeout(this.showTimeoutId);var e=this.$container;this._show&&(e.hide(),this._show=!1)}},w.prototype={constructor:w,_command:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();t.$textElem.equal(n)||t.cmd.do("formatBlock",e)},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=/^h/i,o=t.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},v.prototype={constructor:v,_command:function(e){var t=this.editor;t.cmd.do("fontSize",e)}},E.prototype={constructor:E,_command:function(e){var t=this.editor;t.cmd.do("fontName",e)}};var b=function(){},y=[];function C(e,t){this.menu=e,this.opt=t}function B(e){this.editor=e,this.$elem=r('
        '),this.type="panel",this._active=!1}function x(e){this.editor=e,this.$elem=r('
        \n \n
        '),this.type="click",this._active=!1}function I(e){this.editor=e,this.$elem=r('
        \n \n
        '),this.type="click",this._active=!1}function k(e){this.editor=e,this.$elem=r('
        \n \n
        '),this.type="click",this._active=!1}function Q(e){this.editor=e,this.$elem=r('
        \n \n
        '),this.type="click",this._active=!1}function M(e){this.editor=e,this.$elem=r('
        \n \n
        '),this.type="click",this._active=!1}function S(e){var t=this;this.editor=e,this.$elem=r('
        '),this.type="droplist",this._active=!1,this.droplist=new m(this,{width:120,$title:r("

        设置列表

        "),type:"list",list:[{$elem:r(' 有序列表'),value:"insertOrderedList"},{$elem:r(' 无序列表'),value:"insertUnorderedList"}],onClick:function(e){t._command(e)}})}function D(e){var t=this;this.editor=e,this.$elem=r('
        '),this.type="droplist",this._active=!1,this.droplist=new m(this,{width:100,$title:r("

        对齐方式

        "),type:"list",list:[{$elem:r(' 靠左'),value:"justifyLeft"},{$elem:r(' 居中'),value:"justifyCenter"},{$elem:r(' 靠右'),value:"justifyRight"}],onClick:function(e){t._command(e)}})}function _(e){var t=this;this.editor=e,this.$elem=r('
        '),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new m(this,{width:120,$title:r("

        文字颜色

        "),type:"inline-block",list:i.map((function(e){return{$elem:r(''),value:e}})),onClick:function(e){t._command(e)}})}function T(e){var t=this;this.editor=e,this.$elem=r('
        '),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new m(this,{width:120,$title:r("

        背景色

        "),type:"inline-block",list:i.map((function(e){return{$elem:r(''),value:e}})),onClick:function(e){t._command(e)}})}function F(e){this.editor=e,this.$elem=r('
        \n \n
        '),this.type="click",this._active=!1}function N(e){this.editor=e,this.$elem=r('
        \n \n
        '),this.type="panel",this._active=!1}function P(e){this.editor=e,this.$elem=r('
        \n \n
        '),this.type="panel",this._active=!1}function R(e){this.editor=e,this.$elem=r('
        '),this.type="panel",this._active=!1}function U(e){this.editor=e,this.$elem=r('
        '),this.type="panel",this._active=!1}function Y(e){this.editor=e;var t=d("w-e-img");this.$elem=r('
        '),e.imgMenuId=t,this.type="panel",this._active=!1}C.prototype={constructor:C,show:function(){var e=this,t=this.menu;if(!(y.indexOf(t)>=0)){var n=t.editor,i=r("body"),o=n.$textContainerElem,a=this.opt,c=r('
        '),A=a.width||300;c.css("width",A+"px").css("margin-left",(0-A)/2+"px");var s=r('');c.append(s),s.on("click",(function(){e.hide()}));var l=r('
          '),d=r('
          ');c.append(l).append(d);var u=a.height;u&&d.css("height",u+"px").css("overflow-y","auto");var p=a.tabs||[],h=[],g=[];p.forEach((function(e,t){if(e){var i=e.title||"",o=e.tpl||"";i=f(n,i),o=f(n,o);var a=r('
        • '+i+"
        • ");l.append(a);var c=r(o);d.append(c),a._index=t,h.push(a),g.push(c),0===t?(a._active=!0,a.addClass("w-e-active")):c.hide(),a.on("click",(function(e){a._active||(h.forEach((function(e){e._active=!1,e.removeClass("w-e-active")})),g.forEach((function(e){e.hide()})),a._active=!0,a.addClass("w-e-active"),c.show())}))}})),c.on("click",(function(e){e.stopPropagation()})),i.on("click",(function(t){e.hide()})),o.append(c),p.forEach((function(t,n){if(t){var i=t.events||[];i.forEach((function(t){var i=t.selector,o=t.type,a=t.fn||b,r=g[n];r.find(i).on(o,(function(t){t.stopPropagation();var n=a(t);n&&e.hide()}))}))}}));var m=c.find("input[type=text],textarea");m.length&&m.get(0).focus(),this.$container=c,this._hideOtherPanels(),y.push(t)}},hide:function(){var e=this.menu,t=this.$container;t&&t.remove(),y=y.filter((function(t){return t!==e}))},_hideOtherPanels:function(){y.length&&y.forEach((function(e){var t=e.panel||{};t.hide&&t.hide()}))}},B.prototype={constructor:B,onClick:function(e){var t=this.editor,n=void 0;if(this._active){if(n=t.selection.getSelectionContainerElem(),!n)return;t.selection.createRangeByElem(n),t.selection.restoreSelection(),this._createPanel(n.text(),n.attr("href"))}else t.selection.isSelectionEmpty()?this._createPanel("",""):this._createPanel(t.selection.getSelectionText(),"")},_createPanel:function(e,t){var n=this,i=d("input-link"),o=d("input-text"),a=d("btn-ok"),c=d("btn-del"),A=this._active?"inline-block":"none",s=new C(this,{width:300,tabs:[{title:"链接",tpl:'
          \n \n \n
          \n \n \n
          \n
          ',events:[{selector:"#"+a,type:"click",fn:function(){var e=r("#"+i),t=r("#"+o),a=e.val(),c=t.val();return n._insertLink(c,a),!0}},{selector:"#"+c,type:"click",fn:function(){return n._delLink(),!0}}]}]});s.show(),this.panel=s},_delLink:function(){if(this._active){var e=this.editor,t=e.selection.getSelectionContainerElem();if(t){var n=e.selection.getSelectionText();e.cmd.do("insertHTML",""+n+"")}}},_insertLink:function(e,t){var n=this.editor,i=n.config,o=i.linkCheck,a=!0;o&&"function"===typeof o&&(a=o(e,t)),!0===a?n.cmd.do("insertHTML",''+e+""):alert(a)},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();i&&("A"===i.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active")))}},x.prototype={constructor:x,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("italic"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("italic")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},I.prototype={constructor:I,onClick:function(e){var t=this.editor;t.cmd.do("redo")}},k.prototype={constructor:k,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("strikeThrough"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("strikeThrough")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},Q.prototype={constructor:Q,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("underline"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("underline")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},M.prototype={constructor:M,onClick:function(e){var t=this.editor;t.cmd.do("undo")}},S.prototype={constructor:S,_command:function(e){var t=this.editor,n=t.$textElem;if(t.selection.restoreSelection(),!t.cmd.queryCommandState(e)){t.cmd.do(e);var i=t.selection.getSelectionContainerElem();if("LI"===i.getNodeName()&&(i=i.parent()),!1!==/^ol|ul$/i.test(i.getNodeName())&&!i.equal(n)){var o=i.parent();o.equal(n)||(i.insertAfter(o),o.remove())}}},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("insertUnOrderedList")||t.cmd.queryCommandState("insertOrderedList")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},D.prototype={constructor:D,_command:function(e){var t=this.editor;t.cmd.do(e)}},_.prototype={constructor:_,_command:function(e){var t=this.editor;t.cmd.do("foreColor",e)}},T.prototype={constructor:T,_command:function(e){var t=this.editor;t.cmd.do("backColor",e)}},F.prototype={constructor:F,onClick:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem(),i=n.getNodeName();if(A.isIE()){var o=void 0,a=void 0;if("P"===i)return o=n.text(),a=r("
          "+o+"
          "),a.insertAfter(n),void n.remove();"BLOCKQUOTE"===i&&(o=n.text(),a=r("

          "+o+"

          "),a.insertAfter(n),n.remove())}else"BLOCKQUOTE"===i?t.cmd.do("formatBlock","

          "):t.cmd.do("formatBlock","

          ")},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=/^BLOCKQUOTE$/i,o=t.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},N.prototype={constructor:N,onClick:function(e){var t=this.editor,n=t.selection.getSelectionStartElem(),i=t.selection.getSelectionEndElem(),o=t.selection.isSelectionEmpty(),a=t.selection.getSelectionText(),c=void 0;if(n.equal(i))return o?void(this._active?this._createPanel(n.html()):this._createPanel()):(c=r(""+a+""),t.cmd.do("insertElem",c),t.selection.createRangeByElem(c,!1),void t.selection.restoreSelection());t.selection.restoreSelection()},_createPanel:function(e){var t=this;e=e||"";var n=e?"edit":"new",i=d("texxt"),o=d("btn"),a=new C(this,{width:500,tabs:[{title:"插入代码",tpl:'
          \n \n
          \n \n
          \n
          ',events:[{selector:"#"+o,type:"click",fn:function(){var e=r("#"+i),o=e.val()||e.html();return o=u(o),"new"===n?t._insertCode(o):t._updateCode(o),!0}}]}]});a.show(),this.panel=a},_insertCode:function(e){var t=this.editor;t.cmd.do("insertHTML","
          "+e+"


          ")},_updateCode:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();n&&(n.html(e),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();if(i){var o=i.parent();"CODE"===i.getNodeName()&&"PRE"===o.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},P.prototype={constructor:P,onClick:function(){this._createPanel()},_createPanel:function(){var e=this,t=this.editor,n=t.config,i=n.emotions||[],o=[];i.forEach((function(t){var n=t.type,i=t.content||[],a="";"emoji"===n&&i.forEach((function(e){e&&(a+=''+e+"")})),"image"===n&&i.forEach((function(e){var t=e.src,n=e.alt;t&&(a+=''+n+'')})),o.push({title:t.title,tpl:'
          '+a+"
          ",events:[{selector:"span.w-e-item",type:"click",fn:function(t){var n=t.target,i=r(n),o=i.getNodeName(),a=void 0;return a="IMG"===o?i.parent().html():""+i.html()+"",e._insert(a),!0}}]})}));var a=new C(this,{width:300,height:200,tabs:o});a.show(),this.panel=a},_insert:function(e){var t=this.editor;t.cmd.do("insertHTML",e)}},R.prototype={constructor:R,onClick:function(){this._active?this._createEditPanel():this._createInsertPanel()},_createInsertPanel:function(){var e=this,t=d("btn"),n=d("row"),i=d("col"),o=new C(this,{width:250,tabs:[{title:"插入表格",tpl:'
          \n

          \n 创建\n \n 行\n \n 列的表格\n

          \n
          \n \n
          \n
          ',events:[{selector:"#"+t,type:"click",fn:function(){var t=parseInt(r("#"+n).val()),o=parseInt(r("#"+i).val());return t&&o&&t>0&&o>0&&e._insert(t,o),!0}}]}]});o.show(),this.panel=o},_insert:function(e,t){var n=void 0,i=void 0,o='';for(n=0;n",0===n)for(i=0;i ";else for(i=0;i ";o+=""}o+="


          ";var a=this.editor;a.cmd.do("insertHTML",o),a.cmd.do("enableObjectResizing",!1),a.cmd.do("enableInlineTableEditing",!1)},_createEditPanel:function(){var e=this,t=d("add-row"),n=d("add-col"),i=d("del-row"),o=d("del-col"),a=d("del-table"),r=new C(this,{width:320,tabs:[{title:"编辑表格",tpl:'
          \n
          \n \n \n \n \n
          \n
          \n \n \n
          ',events:[{selector:"#"+t,type:"click",fn:function(){return e._addRow(),!0}},{selector:"#"+n,type:"click",fn:function(){return e._addCol(),!0}},{selector:"#"+i,type:"click",fn:function(){return e._delRow(),!0}},{selector:"#"+o,type:"click",fn:function(){return e._delCol(),!0}},{selector:"#"+a,type:"click",fn:function(){return e._delTable(),!0}}]}]});r.show()},_getLocationData:function(){var e={},t=this.editor,n=t.selection.getSelectionContainerElem();if(n){var i=n.getNodeName();if("TD"===i||"TH"===i){var o=n.parent(),a=o.children(),r=a.length;a.forEach((function(t,i){if(t===n[0])return e.td={index:i,elem:t,length:r},!1}));var c=o.parent(),A=c.children(),s=A.length;return A.forEach((function(t,n){if(t===o[0])return e.tr={index:n,elem:t,length:s},!1})),e}}},_addRow:function(){var e=this._getLocationData();if(e){var t=e.tr,n=r(t.elem),i=e.td,o=i.length,a=document.createElement("tr"),c="",A=void 0;for(A=0;A ";a.innerHTML=c,r(a).insertAfter(n)}},_addCol:function(){var e=this._getLocationData();if(e){var t=e.tr,n=e.td,i=n.index,o=r(t.elem),a=o.parent(),c=a.children();c.forEach((function(e){var t=r(e),n=t.children(),o=n.get(i),a=o.getNodeName().toLowerCase(),c=document.createElement(a);r(c).insertAfter(o)}))}},_delRow:function(){var e=this._getLocationData();if(e){var t=e.tr,n=r(t.elem);n.remove()}},_delCol:function(){var e=this._getLocationData();if(e){var t=e.tr,n=e.td,i=n.index,o=r(t.elem),a=o.parent(),c=a.children();c.forEach((function(e){var t=r(e),n=t.children(),o=n.get(i);o.remove()}))}},_delTable:function(){var e=this.editor,t=e.selection.getSelectionContainerElem();if(t){var n=t.parentUntil("table");n&&n.remove()}},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();"TD"===o||"TH"===o?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},U.prototype={constructor:U,onClick:function(){this._createPanel()},_createPanel:function(){var e=this,t=d("text-val"),n=d("btn"),i=new C(this,{width:350,tabs:[{title:"插入视频",tpl:'
          \n \n
          \n \n
          \n
          ',events:[{selector:"#"+n,type:"click",fn:function(){var n=r("#"+t),i=n.val().trim();return i&&e._insert(i),!0}}]}]});i.show(),this.panel=i},_insert:function(e){var t=this.editor;t.cmd.do("insertHTML",e+"


          ")}},Y.prototype={constructor:Y,onClick:function(){var e=this.editor,t=e.config;t.qiniu||(this._active?this._createEditPanel():this._createInsertPanel())},_createEditPanel:function(){var e=this.editor,t=d("width-30"),n=d("width-50"),i=d("width-100"),o=d("del-btn"),a=[{title:"编辑图片",tpl:'
          \n
          \n 最大宽度:\n \n \n \n
          \n
          \n \n \n
          ',events:[{selector:"#"+t,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","30%"),!0}},{selector:"#"+n,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","50%"),!0}},{selector:"#"+i,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","100%"),!0}},{selector:"#"+o,type:"click",fn:function(){var t=e._selectedImg;return t&&t.remove(),!0}}]}],r=new C(this,{width:300,tabs:a});r.show(),this.panel=r},_createInsertPanel:function(){var e=this.editor,t=e.uploadImg,n=e.config,i=d("up-trigger"),o=d("up-file"),a=d("link-url"),c=d("link-btn"),A=[{title:"上传图片",tpl:'
          \n
          \n \n
          \n
          \n \n
          \n
          ',events:[{selector:"#"+i,type:"click",fn:function(){var e=r("#"+o),t=e[0];if(!t)return!0;t.click()}},{selector:"#"+o,type:"change",fn:function(){var e=r("#"+o),n=e[0];if(!n)return!0;var i=n.files;return i.length&&t.uploadImg(i),!0}}]},{title:"网络图片",tpl:'
          \n \n
          \n \n
          \n
          ',events:[{selector:"#"+c,type:"click",fn:function(){var e=r("#"+a),n=e.val().trim();return n&&t.insertLinkImg(n),!0}}]}],s=[];(n.uploadImgShowBase64||n.uploadImgServer||n.customUploadImg)&&window.FileReader&&s.push(A[0]),n.showLinkImg&&s.push(A[1]);var l=new C(this,{width:300,tabs:s});l.show(),this.panel=l},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t._selectedImg?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var L={};function H(e){this.editor=e,this.menus={}}function j(e){var t=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,n=void 0;return n=null==t?window.clipboardData&&window.clipboardData.getData("text"):t.getData("text/plain"),u(n)}function z(e,t,n){var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,o=void 0,a=void 0;if(null==i?o=window.clipboardData&&window.clipboardData.getData("text"):(o=i.getData("text/plain"),a=i.getData("text/html")),!a&&o&&(a="

          "+u(o)+"

          "),a){var r=a.split("");return 2===r.length&&(a=r[0]),a=a.replace(/<(meta|script|link).+?>/gim,""),a=a.replace(//gm,""),a=a.replace(/\s?data-.+?=('|").+?('|")/gim,""),n&&(a=a.replace(//gim,"")),a=t?a.replace(/\s?(class|style)=('|").*?('|")/gim,""):a.replace(/\s?class=('|").*?('|")/gim,""),a}}function G(e){var t=[],n=j(e);if(n)return t;var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData||{},o=i.items;return o?(s(o,(function(e,n){var i=n.type;/image/i.test(i)&&t.push(n.getAsFile())})),t):t}function J(e){var t=[],n=e.childNodes()||[];return n.forEach((function(e){var n=void 0,i=e.nodeType;if(3===i&&(n=e.textContent,n=u(n)),1===i){n={},n.tag=e.nodeName.toLowerCase();for(var o=[],a=e.attributes||{},c=a.length||0,A=0;A
          ')}L.bold=h,L.head=w,L.fontSize=v,L.fontName=E,L.link=B,L.italic=x,L.redo=I,L.strikeThrough=k,L.underline=Q,L.undo=M,L.list=S,L.justify=D,L.foreColor=_,L.backColor=T,L.quote=F,L.code=N,L.emoticon=P,L.table=R,L.video=U,L.image=Y,H.prototype={constructor:H,init:function(){var e=this,t=this.editor,n=t.config||{},i=n.menus||[];i.forEach((function(n){var i=L[n];i&&"function"===typeof i&&(e.menus[n]=new i(t))})),this._addToToolbar(),this._bindEvent()},_addToToolbar:function(){var e=this.editor,t=e.$toolbarElem,n=this.menus,i=e.config,o=i.zIndex+1;s(n,(function(e,n){var i=n.$elem;i&&(i.css("z-index",o),t.append(i))}))},_bindEvent:function(){var e=this.menus,t=this.editor;s(e,(function(e,n){var i=n.type;if(i){var o=n.$elem,a=n.droplist;n.panel;"click"===i&&n.onClick&&o.on("click",(function(e){null!=t.selection.getRange()&&n.onClick(e)})),"droplist"===i&&a&&o.on("mouseenter",(function(e){null!=t.selection.getRange()&&(a.showTimeoutId=setTimeout((function(){a.show()}),200))})).on("mouseleave",(function(e){a.hideTimeoutId=setTimeout((function(){a.hide()}),0)})),"panel"===i&&n.onClick&&o.on("click",(function(e){e.stopPropagation(),null!=t.selection.getRange()&&n.onClick(e)}))}}))},changeActive:function(){var e=this.menus;s(e,(function(e,t){t.tryChangeActive&&setTimeout((function(){t.tryChangeActive()}),100)}))}},$.prototype={constructor:$,init:function(){this._bindEvent()},clear:function(){this.html("


          ")},html:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.html(),i=i.replace(/\u200b/gm,""),i;n.html(e),t.initSelection()},getJSON:function(){var e=this.editor,t=e.$textElem;return J(t)},text:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.text(),i=i.replace(/\u200b/gm,""),i;n.text("

          "+e+"

          "),t.initSelection()},append:function(e){var t=this.editor,n=t.$textElem;n.append(r(e)),t.initSelection()},_bindEvent:function(){this._saveRangeRealTime(),this._enterKeyHandle(),this._clearHandle(),this._pasteHandle(),this._tabHandle(),this._imgHandle(),this._dragHandle()},_saveRangeRealTime:function(){var e=this.editor,t=e.$textElem;function n(t){e.selection.saveRange(),e.menus.changeActive()}t.on("keyup",n),t.on("mousedown",(function(e){t.on("mouseleave",n)})),t.on("mouseup",(function(e){n(),t.off("mouseleave",n)}))},_enterKeyHandle:function(){var e=this.editor,t=e.$textElem;function n(t){var n=r("


          ");n.insertBefore(t),e.selection.createRangeByElem(n,!0),e.selection.restoreSelection(),t.remove()}function i(i){var o=e.selection.getSelectionContainerElem(),a=o.parent();if("
          "!==a.html()){if(a.equal(t)){var r=o.getNodeName();"P"!==r&&(o.text()||n(o))}}else n(o)}function o(t){var n=e.selection.getSelectionContainerElem();if(n){var i=n.parent(),o=n.getNodeName(),a=i.getNodeName();if("CODE"===o&&"PRE"===a&&e.cmd.queryCommandSupported("insertHTML")){if(!0===e._willBreakCode){var c=r("


          ");return c.insertAfter(i),e.selection.createRangeByElem(c,!0),e.selection.restoreSelection(),e._willBreakCode=!1,void t.preventDefault()}var A=e.selection.getRange().startOffset;e.cmd.do("insertHTML","\n"),e.selection.saveRange(),e.selection.getRange().startOffset===A&&e.cmd.do("insertHTML","\n");var s=n.html().length;e.selection.getRange().startOffset+1===s&&(e._willBreakCode=!0),t.preventDefault()}}}t.on("keyup",(function(e){13===e.keyCode&&i(e)})),t.on("keydown",(function(t){13===t.keyCode?o(t):e._willBreakCode=!1}))},_clearHandle:function(){var e=this.editor,t=e.$textElem;t.on("keydown",(function(e){if(8===e.keyCode){var n=t.html().toLowerCase().trim();"


          "!==n||e.preventDefault()}})),t.on("keyup",(function(n){if(8===n.keyCode){var i=void 0,o=t.html().toLowerCase().trim();o&&"
          "!==o||(i=r("


          "),t.html(""),t.append(i),e.selection.createRangeByElem(i,!1,!0),e.selection.restoreSelection())}}))},_pasteHandle:function(){var e=this.editor,t=e.config,n=t.pasteFilterStyle,i=t.pasteTextHandle,o=t.pasteIgnoreImg,a=e.$textElem,r=0;function c(){var e=Date.now(),t=!1;return e-r>=100&&(t=!0),r=e,t}function s(){r=0}a.on("paste",(function(t){if(!A.isIE()&&(t.preventDefault(),c())){var a=z(t,n,o),r=j(t);r=r.replace(/\n/gm,"
          ");var l=e.selection.getSelectionContainerElem();if(l){var d=l.getNodeName();if("CODE"===d||"PRE"===d)return i&&p(i)&&(r=""+(i(r)||"")),void e.cmd.do("insertHTML","

          "+r+"

          ");if(a)try{i&&p(i)&&(a=""+(i(a)||"")),e.cmd.do("insertHTML",a)}catch(u){i&&p(i)&&(r=""+(i(r)||"")),e.cmd.do("insertHTML","

          "+r+"

          ")}else s()}}})),a.on("paste",(function(t){if(!A.isIE()&&(t.preventDefault(),c())){var n=G(t);if(n&&n.length){var i=e.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();if("CODE"!==o&&"PRE"!==o){var a=e.uploadImg;a.uploadImg(n)}}}}}))},_tabHandle:function(){var e=this.editor,t=e.$textElem;t.on("keydown",(function(t){if(9===t.keyCode&&e.cmd.queryCommandSupported("insertHTML")){var n=e.selection.getSelectionContainerElem();if(n){var i=n.parent(),o=n.getNodeName(),a=i.getNodeName();"CODE"===o&&"PRE"===a?e.cmd.do("insertHTML"," "):e.cmd.do("insertHTML","    "),t.preventDefault()}}}))},_imgHandle:function(){var e=this.editor,t=e.$textElem;t.on("click","img",(function(t){var n=this,i=r(n);"1"!==i.attr("data-w-e")&&(e._selectedImg=i,e.selection.createRangeByElem(i),e.selection.restoreSelection())})),t.on("click keyup",(function(t){t.target.matches("img")||(e._selectedImg=null)}))},_dragHandle:function(){var e=this.editor,t=r(document);t.on("dragleave drop dragenter dragover",(function(e){e.preventDefault()}));var n=e.$textElem;n.on("drop",(function(t){t.preventDefault();var n=t.dataTransfer&&t.dataTransfer.files;if(n&&n.length){var i=e.uploadImg;i.uploadImg(n)}}))}},O.prototype={constructor:O,do:function(e,t){var n=this.editor;if(n._useStyleWithCSS||(document.execCommand("styleWithCSS",null,!0),n._useStyleWithCSS=!0),n.selection.getRange()){n.selection.restoreSelection();var i="_"+e;this[i]?this[i](t):this._execCommand(e,t),n.menus.changeActive(),n.selection.saveRange(),n.selection.restoreSelection(),n.change&&n.change()}},_insertHTML:function(e){var t=this.editor,n=t.selection.getRange();this.queryCommandSupported("insertHTML")?this._execCommand("insertHTML",e):n.insertNode?(n.deleteContents(),n.insertNode(r(e)[0])):n.pasteHTML&&n.pasteHTML(e)},_insertElem:function(e){var t=this.editor,n=t.selection.getRange();n.insertNode&&(n.deleteContents(),n.insertNode(e[0]))},_execCommand:function(e,t){document.execCommand(e,!1,t)},queryCommandValue:function(e){return document.queryCommandValue(e)},queryCommandState:function(e){return document.queryCommandState(e)},queryCommandSupported:function(e){return document.queryCommandSupported(e)}},V.prototype={constructor:V,getRange:function(){return this._currentRange},saveRange:function(e){if(e)this._currentRange=e;else{var t=window.getSelection();if(0!==t.rangeCount){var n=t.getRangeAt(0),i=this.getSelectionContainerElem(n);if(i&&"false"!==i.attr("contenteditable")&&!i.parentUntil("[contenteditable=false]")){var o=this.editor,a=o.$textElem;a.isContain(i)&&(this._currentRange=n)}}}},collapseRange:function(e){null==e&&(e=!1);var t=this._currentRange;t&&t.collapse(e)},getSelectionText:function(){var e=this._currentRange;return e?this._currentRange.toString():""},getSelectionContainerElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.commonAncestorContainer,r(1===t.nodeType?t:t.parentNode)},getSelectionStartElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.startContainer,r(1===t.nodeType?t:t.parentNode)},getSelectionEndElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.endContainer,r(1===t.nodeType?t:t.parentNode)},isSelectionEmpty:function(){var e=this._currentRange;return!(!e||!e.startContainer||e.startContainer!==e.endContainer||e.startOffset!==e.endOffset)},restoreSelection:function(){var e=window.getSelection();e.removeAllRanges(),e.addRange(this._currentRange)},createEmptyRange:function(){var e=this.editor,t=this.getRange(),n=void 0;if(t&&this.isSelectionEmpty())try{A.isWebkit()?(e.cmd.do("insertHTML","​"),t.setEnd(t.endContainer,t.endOffset+1),this.saveRange(t)):(n=r(""),e.cmd.do("insertElem",n),this.createRangeByElem(n,!0))}catch(i){}},createRangeByElem:function(e,t,n){if(e.length){var i=e[0],o=document.createRange();n?o.selectNodeContents(i):o.selectNode(i),"boolean"===typeof t&&o.collapse(t),this.saveRange(o)}}},K.prototype={constructor:K,show:function(e){var t=this;if(!this._isShow){this._isShow=!0;var n=this.$bar;if(this._isRender)this._isRender=!0;else{var i=this.$textContainer;i.append(n)}Date.now()-this._time>100&&e<=1&&(n.css("width",100*e+"%"),this._time=Date.now());var o=this._timeoutId;o&&clearTimeout(o),o=setTimeout((function(){t._hide()}),500)}},_hide:function(){var e=this.$bar;e.remove(),this._time=0,this._isShow=!1,this._isRender=!1}};var q="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function W(e){this.editor=e}W.prototype={constructor:W,_alert:function(e,t){var n=this.editor,i=n.config.debug,o=n.config.customAlert;if(i)throw new Error("wangEditor: "+(t||e));o&&"function"===typeof o?o(e):alert(e)},insertLinkImg:function(e){var t=this;if(e){var n=this.editor,i=n.config,o=i.linkImgCheck,a=void 0;if(o&&"function"===typeof o&&(a=o(e),"string"===typeof a))alert(a);else{n.cmd.do("insertHTML",'');var r=document.createElement("img");r.onload=function(){var t=i.linkImgCallback;t&&"function"===typeof t&&t(e),r=null},r.onerror=function(){r=null,t._alert("插入图片错误",'wangEditor: 插入图片出错,图片链接是 "'+e+'",下载该链接失败')},r.onabort=function(){r=null},r.src=e}}},uploadImg:function(e){var t=this;if(e&&e.length){var n=this.editor,i=n.config,o=i.uploadImgServer,a=i.uploadImgShowBase64,r=i.uploadImgMaxSize,c=r/1024/1024,A=i.uploadImgMaxLength||1e4,d=i.uploadFileName||"",u=i.uploadImgParams||{},p=i.uploadImgParamsWithUrl,h=i.uploadImgHeaders||{},f=i.uploadImgHooks||{},g=i.uploadImgTimeout||3e3,m=i.withCredentials;null==m&&(m=!1);var w=i.customUploadImg;if(w||o||a){var v=[],E=[];if(l(e,(function(e){var t=e.name,n=e.size;t&&n&&(!1!==/\.(jpg|jpeg|png|bmp|gif|webp)$/i.test(t)?rA)this._alert("一次最多上传"+A+"张图片");else if(w&&"function"===typeof w)w(v,this.insertLinkImg.bind(this));else{var b=new FormData;if(l(v,(function(e){var t=d||e.name;b.append(t,e)})),o&&"string"===typeof o){var y=o.split("#");o=y[0];var C=y[1]||"";s(u,(function(e,t){p&&(o.indexOf("?")>0?o+="&":o+="?",o=o+e+"="+t),b.append(e,t)})),C&&(o+="#"+C);var B=new XMLHttpRequest;if(B.open("POST",o),B.timeout=g,B.ontimeout=function(){f.timeout&&"function"===typeof f.timeout&&f.timeout(B,n),t._alert("上传图片超时")},B.upload&&(B.upload.onprogress=function(e){var t=void 0,i=new K(n);e.lengthComputable&&(t=e.loaded/e.total,i.show(t))}),B.onreadystatechange=function(){var e=void 0;if(4===B.readyState){if(B.status<200||B.status>=300)return f.error&&"function"===typeof f.error&&f.error(B,n),void t._alert("上传图片发生错误","上传图片发生错误,服务器返回状态是 "+B.status);if(e=B.responseText,"object"!==("undefined"===typeof e?"undefined":q(e)))try{e=JSON.parse(e)}catch(o){return f.fail&&"function"===typeof f.fail&&f.fail(B,n,e),void t._alert("上传图片失败","上传图片返回结果错误,返回结果是: "+e)}if(f.customInsert||"0"==e.errno){if(f.customInsert&&"function"===typeof f.customInsert)f.customInsert(t.insertLinkImg.bind(t),e,n);else{var i=e.data||[];i.forEach((function(e){t.insertLinkImg(e)}))}f.success&&"function"===typeof f.success&&f.success(B,n,e)}else f.fail&&"function"===typeof f.fail&&f.fail(B,n,e),t._alert("上传图片失败","上传图片返回结果错误,返回结果 errno="+e.errno)}},f.before&&"function"===typeof f.before){var x=f.before(B,n,v);if(x&&"object"===("undefined"===typeof x?"undefined":q(x))&&x.prevent)return void this._alert(x.msg)}return s(h,(function(e,t){B.setRequestHeader(e,t)})),B.withCredentials=m,void B.send(b)}a&&l(e,(function(e){var n=t,i=new FileReader;i.readAsDataURL(e),i.onload=function(){n.insertLinkImg(this.result)}}))}}}}};var X=1;function Z(e,t){if(null==e)throw new Error("错误:初始化编辑器时候未传入任何参数,请查阅文档");this.id="wangEditor-"+X++,this.toolbarSelector=e,this.textSelector=t,this.customConfig={}}Z.prototype={constructor:Z,_initConfig:function(){var e={};this.config=Object.assign(e,c,this.customConfig);var t=this.config.lang||{},n=[];s(t,(function(e,t){n.push({reg:new RegExp(e,"img"),val:t})})),this.config.langArgs=n},_initDom:function(){var e=this,t=this.toolbarSelector,n=r(t),i=this.textSelector,o=this.config,a=o.zIndex,c=void 0,A=void 0,s=void 0,l=void 0;null==i?(c=r("
          "),A=r("
          "),l=n.children(),n.append(c).append(A),c.css("background-color","#f1f1f1").css("border","1px solid #ccc"),A.css("border","1px solid #ccc").css("border-top","none").css("height","300px")):(c=n,A=r(i),l=A.children()),s=r("
          "),s.attr("contenteditable","true").css("width","100%").css("height","100%"),l&&l.length?s.append(l):s.append(r("


          ")),A.append(s),c.addClass("w-e-toolbar"),A.addClass("w-e-text-container"),A.css("z-index",a),s.addClass("w-e-text");var u=d("toolbar-elem");c.attr("id",u);var p=d("text-elem");s.attr("id",p),this.$toolbarElem=c,this.$textContainerElem=A,this.$textElem=s,this.toolbarElemId=u,this.textElemId=p;var h=!0;A.on("compositionstart",(function(){h=!1})),A.on("compositionend",(function(){h=!0})),A.on("click keyup",(function(){h&&e.change&&e.change()})),c.on("click",(function(){this.change&&this.change()})),(o.onfocus||o.onblur)&&(this.isFocus=!1,r(document).on("click",(function(t){var n=s.isContain(r(t.target)),i=c.isContain(r(t.target)),o=c[0]==t.target;if(n)e.isFocus||e.onfocus&&e.onfocus(),e.isFocus=!0;else{if(i&&!o)return;e.isFocus&&e.onblur&&e.onblur(),e.isFocus=!1}})))},_initCommand:function(){this.cmd=new O(this)},_initSelectionAPI:function(){this.selection=new V(this)},_initUploadImg:function(){this.uploadImg=new W(this)},_initMenus:function(){this.menus=new H(this),this.menus.init()},_initText:function(){this.txt=new $(this),this.txt.init()},initSelection:function(e){var t=this.$textElem,n=t.children();if(!n.length)return t.append(r("


          ")),void this.initSelection();var i=n.last();if(e){var o=i.html().toLowerCase(),a=i.getNodeName();if("
          "!==o&&"
          "!==o||"P"!==a)return t.append(r("


          ")),void this.initSelection()}this.selection.createRangeByElem(i,!1,!0),this.selection.restoreSelection()},_bindEvent:function(){var e=0,t=this.txt.html(),n=this.config,i=n.onchangeTimeout;i=parseInt(i,10),(!i||i<=0)&&(i=200);var o=n.onchange;o&&"function"===typeof o&&(this.change=function(){var n=this.txt.html();n.length===t.length&&n===t||(e&&clearTimeout(e),e=setTimeout((function(){o(n),t=n}),i))});var a=n.onblur;a&&"function"===typeof a&&(this.onblur=function(){var e=this.txt.html();a(e)});var r=n.onfocus;r&&"function"===typeof r&&(this.onfocus=function(){r()})},create:function(){this._initConfig(),this._initDom(),this._initCommand(),this._initSelectionAPI(),this._initText(),this._initMenus(),this._initUploadImg(),this.initSelection(!0),this._bindEvent()},_offAllEvent:function(){r.offAll()}};try{document}catch(ie){throw new Error("请在浏览器环境下运行")}e();var ee='.w-e-toolbar,.w-e-text-container,.w-e-menu-panel { padding: 0; margin: 0; box-sizing: border-box;}.w-e-toolbar *,.w-e-text-container *,.w-e-menu-panel * { padding: 0; margin: 0; box-sizing: border-box;}.w-e-clear-fix:after { content: ""; display: table; clear: both;}.w-e-toolbar .w-e-droplist { position: absolute; left: 0; top: 0; background-color: #fff; border: 1px solid #f1f1f1; border-right-color: #ccc; border-bottom-color: #ccc;}.w-e-toolbar .w-e-droplist .w-e-dp-title { text-align: center; color: #999; line-height: 2; border-bottom: 1px solid #f1f1f1; font-size: 13px;}.w-e-toolbar .w-e-droplist ul.w-e-list { list-style: none; line-height: 1;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { color: #333; padding: 5px 0;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { background-color: #f1f1f1;}.w-e-toolbar .w-e-droplist ul.w-e-block { list-style: none; text-align: left; padding: 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { display: inline-block; *display: inline; *zoom: 1; padding: 3px 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { background-color: #f1f1f1;}@font-face { font-family: \'w-e-icon\'; src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABhQAAsAAAAAGAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPBGNtYXAAAAFoAAABBAAAAQQrSf4BZ2FzcAAAAmwAAAAIAAAACAAAABBnbHlmAAACdAAAEvAAABLwfpUWUWhlYWQAABVkAAAANgAAADYQp00kaGhlYQAAFZwAAAAkAAAAJAfEA+FobXR4AAAVwAAAAIQAAACEeAcD7GxvY2EAABZEAAAARAAAAERBSEX+bWF4cAAAFogAAAAgAAAAIAAsALZuYW1lAAAWqAAAAYYAAAGGmUoJ+3Bvc3QAABgwAAAAIAAAACAAAwAAAAMD3gGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8fwDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAOgAAAA2ACAABAAWAAEAIOkG6Q3pEulH6Wbpd+m56bvpxunL6d/qDepc6l/qZepo6nHqefAN8BTxIPHc8fz//f//AAAAAAAg6QbpDekS6UfpZel36bnpu+nG6cvp3+oN6lzqX+pi6mjqcep38A3wFPEg8dzx/P/9//8AAf/jFv4W+Bb0FsAWoxaTFlIWURZHFkMWMBYDFbUVsxWxFa8VpxWiEA8QCQ7+DkMOJAADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACAAD/wAQAA8AABAATAAABNwEn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AQAAAAEAAAABAAAAAQAAMAEAAAABAAAAAQAAAAEAABABAAAAAQAAAAEAAAeBAAAAAQAAAAEAABlBAAAAAQAAMAEAADABAAAgAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAMlAD8DJQAAA74ABwQAACMD/wAAAAAAAAAKABQAHgBMAJQA+AE2AXwBwgI2AnQCvgLoA34EHgSIBMoE8gU0BXAFiAXgBiIGagaSBroG5AcoB+AIKgkcCXgAAQAAACEAtAAKAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format(\'truetype\'); font-weight: normal; font-style: normal;}[class^="w-e-icon-"],[class*=" w-e-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: \'w-e-icon\' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.w-e-icon-close:before { content: "\\f00d";}.w-e-icon-upload2:before { content: "\\e9c6";}.w-e-icon-trash-o:before { content: "\\f014";}.w-e-icon-header:before { content: "\\f1dc";}.w-e-icon-pencil2:before { content: "\\e906";}.w-e-icon-paint-brush:before { content: "\\f1fc";}.w-e-icon-image:before { content: "\\e90d";}.w-e-icon-play:before { content: "\\e912";}.w-e-icon-location:before { content: "\\e947";}.w-e-icon-undo:before { content: "\\e965";}.w-e-icon-redo:before { content: "\\e966";}.w-e-icon-quotes-left:before { content: "\\e977";}.w-e-icon-list-numbered:before { content: "\\e9b9";}.w-e-icon-list2:before { content: "\\e9bb";}.w-e-icon-link:before { content: "\\e9cb";}.w-e-icon-happy:before { content: "\\e9df";}.w-e-icon-bold:before { content: "\\ea62";}.w-e-icon-underline:before { content: "\\ea63";}.w-e-icon-italic:before { content: "\\ea64";}.w-e-icon-strikethrough:before { content: "\\ea65";}.w-e-icon-table2:before { content: "\\ea71";}.w-e-icon-paragraph-left:before { content: "\\ea77";}.w-e-icon-paragraph-center:before { content: "\\ea78";}.w-e-icon-paragraph-right:before { content: "\\ea79";}.w-e-icon-terminal:before { content: "\\f120";}.w-e-icon-page-break:before { content: "\\ea68";}.w-e-icon-cancel-circle:before { content: "\\ea0d";}.w-e-icon-font:before { content: "\\ea5c";}.w-e-icon-text-heigh:before { content: "\\ea5f";}.w-e-toolbar { display: -webkit-box; display: -ms-flexbox; display: flex; padding: 0 5px; /* flex-wrap: wrap; */ /* 单个菜单 */}.w-e-toolbar .w-e-menu { position: relative; text-align: center; padding: 5px 10px; cursor: pointer;}.w-e-toolbar .w-e-menu i { color: #999;}.w-e-toolbar .w-e-menu:hover i { color: #333;}.w-e-toolbar .w-e-active i { color: #1e88e5;}.w-e-toolbar .w-e-active:hover i { color: #1e88e5;}.w-e-text-container .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; /* 为 emotion panel 定制的样式 */ /* 上传图片的 panel 定制样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover { color: #333;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: -webkit-box; display: -ms-flexbox; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px; /* 输入框的样式 */ /* 按钮的样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both;}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block; *display: inline; *zoom: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container { text-align: center;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn { display: inline-block; *display: inline; *zoom: 1; color: #999; cursor: pointer; font-size: 60px; line-height: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover { color: #333;}.w-e-text-container { position: relative;}.w-e-text-container .w-e-progress { position: absolute; background-color: #1e88e5; bottom: 0; left: 0; height: 1px;}.w-e-text { padding: 0 10px; overflow-y: scroll;}.w-e-text p,.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text table,.w-e-text pre { margin: 10px 0; line-height: 1.5;}.w-e-text ul,.w-e-text ol { margin: 10px 0 10px 20px;}.w-e-text blockquote { display: block; border-left: 8px solid #d0e5f2; padding: 5px 10px; margin: 10px 0; line-height: 1.4; font-size: 100%; background-color: #f1f1f1;}.w-e-text code { display: inline-block; *display: inline; *zoom: 1; background-color: #f1f1f1; border-radius: 3px; padding: 3px 5px; margin: 0 3px;}.w-e-text pre code { display: block;}.w-e-text table { border-top: 1px solid #ccc; border-left: 1px solid #ccc;}.w-e-text table td,.w-e-text table th { border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px;}.w-e-text table th { border-bottom: 2px solid #ccc; text-align: center;}.w-e-text:focus { outline: none;}.w-e-text img { cursor: pointer;}.w-e-text img:hover { box-shadow: 0 0 5px #333;}',te=document.createElement("style");te.type="text/css",te.innerHTML=ee,document.getElementsByTagName("HEAD").item(0).appendChild(te);var ne=window.wangEditor||Z;return ne}))},"5e96":function(e,t,n){"use strict";var i=n("c85a"),o=n.n(i);o.a},"64e1":function(e,t,n){},"73f0":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-edit-vue",staticStyle:{height:"100%"}},[n("el-row",{staticStyle:{height:"100%",overflow:"auto",padding:"20px","box-sizing":"border-box"},attrs:{type:"border-card"}},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:16}},[e.pageId?[n("span",[e._v("编辑方式:")]),n("el-select",{attrs:{disabled:!!e.pageId},on:{change:e.editorTypeChange},model:{value:e.wikiPageEdit.editorType,callback:function(t){e.$set(e.wikiPageEdit,"editorType",t)},expression:"wikiPageEdit.editorType"}},[n("el-option",{attrs:{label:"HTML",value:1}}),n("el-option",{attrs:{label:"Markdown",value:2}})],1)]:[n("span",{staticStyle:{"margin-right":"20px"}},[e._v("父级:"+e._s(e.parentWikiPage.name||"/"))]),e.parentId?n("el-tooltip",{staticClass:"item",attrs:{content:"在根目录创建文档"}},[n("el-button",{staticStyle:{padding:"0 10px"},attrs:{type:"text"},on:{click:e.changeToRootPath}},[e._v("根目录")])],1):e._e(),n("span",{staticStyle:{"margin-left":"50px"}},[e._v("编辑方式:")]),n("el-select",{attrs:{disabled:!!e.pageId},on:{change:e.editorTypeChange},model:{value:e.wikiPageEdit.editorType,callback:function(t){e.$set(e.wikiPageEdit,"editorType",t)},expression:"wikiPageEdit.editorType"}},[n("el-option",{attrs:{label:"HTML",value:1}}),n("el-option",{attrs:{label:"Markdown",value:2}})],1)]],2),n("el-col",{staticStyle:{"text-align":"right"},attrs:{span:8}},[n("el-button",{attrs:{type:"primary",icon:"el-icon-document-checked"},on:{click:function(t){return e.createWikiSave(1)}}},[e._v("保存并查看")]),n("el-button",{attrs:{type:"success",icon:"el-icon-check"},on:{click:function(t){return e.createWikiSave(0)}}},[e._v("仅保存")]),n("el-button",{attrs:{icon:"el-icon-back"},on:{click:e.createWikiCancel}},[e._v("取消")])],1)],1),n("el-input",{staticClass:"page-title-input",attrs:{placeholder:"请输入标题"},model:{value:e.wikiPageEdit.pageTitle,callback:function(t){e.$set(e.wikiPageEdit,"pageTitle",t)},expression:"wikiPageEdit.pageTitle"}}),n("mavon-editor",{directives:[{name:"show",rawName:"v-show",value:2===e.wikiPageEdit.editorType,expression:"wikiPageEdit.editorType===2"}],ref:"mavonEditor",staticClass:"page-content-editor",attrs:{toolbars:e.toolbars,placeholder:"请录入文档内容"},on:{save:function(t){return e.createWikiSave(0)},imgAdd:e.addMarkdownImage},model:{value:e.markdownContent,callback:function(t){e.markdownContent=t},expression:"markdownContent"}}),n("div",{directives:[{name:"show",rawName:"v-show",value:1===e.wikiPageEdit.editorType,expression:"wikiPageEdit.editorType===1"}],staticClass:"page-content-editor",staticStyle:{height:"calc(100vh - 250px)"},attrs:{id:"newPageContentDiv"}})],1)],1)},o=[],a=(n("b0c0"),n("1a0b")),r=n.n(a),c=n("0a79"),A=n("b2d8"),s=(n("64e1"),n("bc3a")),l=n.n(s),d={props:["spaceId"],data:function(){return{editor:{},wikiPageEdit:{editorType:1,pageTitle:""},wikiPage:{},parentWikiPage:{},isUnlock:!1,pageId:"",parentId:"",markdownContent:"",toolbars:{bold:!0,italic:!0,header:!0,underline:!0,strikethrough:!0,mark:!0,superscript:!0,subscript:!0,quote:!0,ol:!0,ul:!0,link:!0,imagelink:!0,code:!0,table:!0,fullscreen:!0,readmodel:!0,undo:!0,redo:!0,trash:!0,save:!0,navigation:!0,alignleft:!0,aligncenter:!0,alignright:!0,subfield:!0,preview:!0},fileUploadUrl:".//zyplayer-doc-wiki/page/file/wangEditor/upload"}},components:{"mavon-editor":A["mavonEditor"]},destroyed:function(){this.unlockPage()},beforeRouteUpdate:function(e,t,n){this.initQueryParam(e),n()},mounted:function(){this.initEditor(),this.initQueryParam(this.$route);var e=this;window.onunload=function(){e.unlockPage()},window.onbeforeunload=function(){e.unlockPage()}},methods:{changeToRootPath:function(){this.parentId="",this.parentWikiPage={}},editorTypeChange:function(){},unlockPage:function(){this.isUnlock||(this.isUnlock=!0,c["a"].pageUnlock({pageId:this.pageId}))},createWikiCancel:function(){var e=this;this.$confirm("确定要取消编辑吗?您编辑的内容将不会被保存哦~","提示",{confirmButtonText:"确定",cancelButtonText:"继续编辑",type:"warning"}).then((function(){e.unlockPage(),e.$router.back()}))},createWikiSave:function(e){var t=this;if(this.wikiPageEdit.pageTitle){var n="",i="";2===this.wikiPageEdit.editorType?(n=this.markdownContent,i=this.markdownContent):(n=this.editor.txt.html(),i=this.editor.txt.text());var o=this.pageId>0?"":this.parentId,a={spaceId:this.spaceId,parentId:o,id:this.wikiPage.id,name:this.wikiPageEdit.pageTitle,editorType:this.wikiPageEdit.editorType,content:n,preview:i};c["a"].updatePage(a).then((function(n){t.$message.success("保存成功!"),t.$emit("loadPageList"),t.pageId=n.data.id,1==e?t.$router.push({path:"/page/show",query:{pageId:t.pageId}}):t.loadPageDetail(t.pageId)}))}else this.$message.warning("标题不能为空")},loadPageDetail:function(e){var t=this;c["a"].pageDetail({id:e}).then((function(e){t.wikiPage=e.data.wikiPage||{},t.pageContent=e.data.pageContent||{},t.pageFileList=e.data.fileList||[],t.wikiPageEdit.pageTitle=t.wikiPage.name,t.wikiPageEdit.editorType=t.wikiPage.editorType,2===t.wikiPageEdit.editorType?t.markdownContent=t.pageContent.content||"":t.editor.txt.html(t.pageContent.content||"")}))},loadParentPageDetail:function(e){var t=this;e&&c["a"].pageDetail({id:e}).then((function(e){t.parentWikiPage=e.data.wikiPage||{}}))},cleanPage:function(){this.wikiPage={},this.pageContent={},this.pageFileList=[],this.wikiPageEdit.pageTitle="",this.editor.txt&&this.editor.txt.html("")},initQueryParam:function(e){var t=this;this.pageId=e.query.pageId,this.parentId=e.query.parentId,this.pageId?(this.loadPageDetail(this.pageId),c["a"].pageLock({pageId:this.pageId}).catch((function(e){var n=t;t.$alert(e.errMsg||"未知错误","错误",{confirmButtonText:"确定",callback:function(){n.$router.back()}})}))):(this.loadParentPageDetail(this.parentId),this.cleanPage())},addMarkdownImage:function(e,t){var n=this,i=new FormData;i.append("files",t),l()({url:this.fileUploadUrl,method:"post",data:i,headers:{"Content-Type":"multipart/form-data"},timeout:1e4,withCredentials:!0}).then((function(t){var i=t.data.data||[];i.length>0?n.$refs.mavonEditor.$img2Url(e,i[0]):n.$message.warning("上传失败,返回数据为空")})).catch((function(e){n.$message.warning("上传失败:"+e.message)}))},initEditor:function(){this.editor=new r.a("#newPageContentDiv"),this.editor.customConfig.uploadImgServer=".//zyplayer-doc-wiki/page/file/wangEditor/upload",this.editor.customConfig.zIndex=100,this.editor.customConfig.uploadFileName="files",this.editor.customConfig.uploadImgMaxLength=1,this.editor.customConfig.pasteFilterStyle=!1,this.editor.customConfig.withCredentials=!0,this.editor.create()}}},u=d,p=(n("5e96"),n("2877")),h=Object(p["a"])(u,i,o,!1,null,null,null);t["default"]=h.exports},c85a:function(e,t,n){}}]); \ No newline at end of file diff --git a/zyplayer-doc-wiki/src/main/resources/js/chunk-5544a2b8.6714a421.js b/zyplayer-doc-wiki/src/main/resources/js/chunk-5544a2b8.774dc497.js similarity index 100% rename from zyplayer-doc-wiki/src/main/resources/js/chunk-5544a2b8.6714a421.js rename to zyplayer-doc-wiki/src/main/resources/js/chunk-5544a2b8.774dc497.js diff --git a/zyplayer-doc-wiki/src/main/resources/js/chunk-578c28a7.6a10864d.js b/zyplayer-doc-wiki/src/main/resources/js/chunk-578c28a7.54a578cc.js similarity index 100% rename from zyplayer-doc-wiki/src/main/resources/js/chunk-578c28a7.6a10864d.js rename to zyplayer-doc-wiki/src/main/resources/js/chunk-578c28a7.54a578cc.js diff --git a/zyplayer-doc-wiki/src/main/resources/js/chunk-5dc97978.14484106.js b/zyplayer-doc-wiki/src/main/resources/js/chunk-5dc97978.1238356c.js similarity index 100% rename from zyplayer-doc-wiki/src/main/resources/js/chunk-5dc97978.14484106.js rename to zyplayer-doc-wiki/src/main/resources/js/chunk-5dc97978.1238356c.js