From a320554f415c94b8b258ddd44ba6959380a5019d Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Sun, 14 Aug 2022 10:22:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=89=93=E5=8C=85=E8=B5=84?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- static/dist/css/app.060bb640.css | 1 - static/dist/css/app.1e0575d4.css | 1 + static/dist/css/chunk-005cb6a0.dc09594a.css | 1 + static/dist/css/chunk-0724359d.ea56cb2d.css | 1 - static/dist/css/chunk-17b45428.bae004f3.css | 1 - ...61772a.css => chunk-1d0b0df0.c661772a.css} | 0 ...164f9a.css => chunk-3db39e52.8f164f9a.css} | 0 ...61772a.css => chunk-48aea94b.c661772a.css} | 0 static/dist/css/chunk-49af4496.9c6560f1.css | 1 - static/dist/css/chunk-4de77fa6.a1cb6ee7.css | 1 + static/dist/css/chunk-4e78cf04.cad8d30d.css | 1 + ...86476f.css => chunk-6142efe4.9186476f.css} | 0 static/dist/css/chunk-6cd973f2.bae004f3.css | 1 - static/dist/css/chunk-7ee89c2d.bce6719c.css | 1 + ...61772a.css => chunk-8401588e.c661772a.css} | 0 static/dist/css/chunk-8871e318.90919cc8.css | 1 - static/dist/css/chunk-a3803854.f1ab5bd7.css | 1 - static/dist/css/chunk-b26634d8.bace433e.css | 1 + static/dist/css/chunk-ba900cec.e1e1530d.css | 1 + static/dist/css/chunk-c7eee472.a1cb6ee7.css | 1 + static/dist/css/chunk-vendors.a4d0c941.css | 8 - static/dist/css/chunk-vendors.cc7481c6.css | 8 + static/dist/css/user.020d47d3.css | 2 +- static/dist/index.html | 2 +- static/dist/js/app.10b9f513.js | 1 - static/dist/js/app.450810ec.js | 1 - static/dist/js/app.9f1a58b4.js | 1 + static/dist/js/app.cfc3d16a.js | 1 - static/dist/js/app.e7d25f8f.js | 1 - static/dist/js/chunk-005cb6a0.b02f8773.js | 1 + static/dist/js/chunk-0724359d.46bd2e2e.js | 1 - static/dist/js/chunk-17b45428.6ac9a691.js | 1 - static/dist/js/chunk-1d0b0df0.202359c3.js | 1 + static/dist/js/chunk-26a6fcf4.b4f950fb.js | 1 - static/dist/js/chunk-2cad3ca0.d35d9085.js | 1 - static/dist/js/chunk-3797ee47.d9262f3d.js | 1 - static/dist/js/chunk-3a86c7e2.eacd742a.js | 9 + static/dist/js/chunk-3db39e52.8008f91a.js | 1 + ...a11c0eba.js => chunk-48aea94b.0c46d36e.js} | 2 +- static/dist/js/chunk-48b51be7.b6c2191e.js | 1 - static/dist/js/chunk-49af4496.c656d366.js | 8 - ...68e2c98c.js => chunk-4de77fa6.b838892d.js} | 2 +- static/dist/js/chunk-4e78cf04.ce3ae15e.js | 1 + static/dist/js/chunk-6142efe4.5d0cff8f.js | 1 + static/dist/js/chunk-7ee89c2d.88e340a1.js | 1 + static/dist/js/chunk-8401588e.8410feb8.js | 1 + static/dist/js/chunk-8871e318.3472d164.js | 9 - static/dist/js/chunk-a3803854.c3fbb7c2.js | 1 - static/dist/js/chunk-b26634d8.d56db2c6.js | 8 + static/dist/js/chunk-ba900cec.6c11f943.js | 8 + static/dist/js/chunk-c7eee472.bbfacff1.js | 1 + static/dist/js/chunk-vendors.1462ec98.js | 329 ++++++++++++++++++ static/dist/js/chunk-vendors.9cad2091.js | 329 ------------------ static/dist/js/chunk-vendors.c19a0b34.js | 329 ------------------ static/dist/js/chunk-vendors.cfde0a8a.js | 329 ------------------ static/dist/js/chunk-vendors.d687932c.js | 329 ------------------ static/dist/js/user.01312123.js | 8 - static/dist/js/user.0ba37607.js | 8 + 59 files changed, 392 insertions(+), 1372 deletions(-) delete mode 100644 static/dist/css/app.060bb640.css create mode 100644 static/dist/css/app.1e0575d4.css create mode 100644 static/dist/css/chunk-005cb6a0.dc09594a.css delete mode 100644 static/dist/css/chunk-0724359d.ea56cb2d.css delete mode 100644 static/dist/css/chunk-17b45428.bae004f3.css rename static/dist/css/{chunk-2cad3ca0.c661772a.css => chunk-1d0b0df0.c661772a.css} (100%) rename static/dist/css/{chunk-26a6fcf4.8f164f9a.css => chunk-3db39e52.8f164f9a.css} (100%) rename static/dist/css/{chunk-48b51be7.c661772a.css => chunk-48aea94b.c661772a.css} (100%) delete mode 100644 static/dist/css/chunk-49af4496.9c6560f1.css create mode 100644 static/dist/css/chunk-4de77fa6.a1cb6ee7.css create mode 100644 static/dist/css/chunk-4e78cf04.cad8d30d.css rename static/dist/css/{chunk-3797ee47.9186476f.css => chunk-6142efe4.9186476f.css} (100%) delete mode 100644 static/dist/css/chunk-6cd973f2.bae004f3.css create mode 100644 static/dist/css/chunk-7ee89c2d.bce6719c.css rename static/dist/css/{chunk-7458b742.c661772a.css => chunk-8401588e.c661772a.css} (100%) delete mode 100644 static/dist/css/chunk-8871e318.90919cc8.css delete mode 100644 static/dist/css/chunk-a3803854.f1ab5bd7.css create mode 100644 static/dist/css/chunk-b26634d8.bace433e.css create mode 100644 static/dist/css/chunk-ba900cec.e1e1530d.css create mode 100644 static/dist/css/chunk-c7eee472.a1cb6ee7.css delete mode 100644 static/dist/css/chunk-vendors.a4d0c941.css create mode 100644 static/dist/css/chunk-vendors.cc7481c6.css delete mode 100644 static/dist/js/app.10b9f513.js delete mode 100644 static/dist/js/app.450810ec.js create mode 100644 static/dist/js/app.9f1a58b4.js delete mode 100644 static/dist/js/app.cfc3d16a.js delete mode 100644 static/dist/js/app.e7d25f8f.js create mode 100644 static/dist/js/chunk-005cb6a0.b02f8773.js delete mode 100644 static/dist/js/chunk-0724359d.46bd2e2e.js delete mode 100644 static/dist/js/chunk-17b45428.6ac9a691.js create mode 100644 static/dist/js/chunk-1d0b0df0.202359c3.js delete mode 100644 static/dist/js/chunk-26a6fcf4.b4f950fb.js delete mode 100644 static/dist/js/chunk-2cad3ca0.d35d9085.js delete mode 100644 static/dist/js/chunk-3797ee47.d9262f3d.js create mode 100644 static/dist/js/chunk-3a86c7e2.eacd742a.js create mode 100644 static/dist/js/chunk-3db39e52.8008f91a.js rename static/dist/js/{chunk-7458b742.a11c0eba.js => chunk-48aea94b.0c46d36e.js} (67%) delete mode 100644 static/dist/js/chunk-48b51be7.b6c2191e.js delete mode 100644 static/dist/js/chunk-49af4496.c656d366.js rename static/dist/js/{chunk-6cd973f2.68e2c98c.js => chunk-4de77fa6.b838892d.js} (64%) create mode 100644 static/dist/js/chunk-4e78cf04.ce3ae15e.js create mode 100644 static/dist/js/chunk-6142efe4.5d0cff8f.js create mode 100644 static/dist/js/chunk-7ee89c2d.88e340a1.js create mode 100644 static/dist/js/chunk-8401588e.8410feb8.js delete mode 100644 static/dist/js/chunk-8871e318.3472d164.js delete mode 100644 static/dist/js/chunk-a3803854.c3fbb7c2.js create mode 100644 static/dist/js/chunk-b26634d8.d56db2c6.js create mode 100644 static/dist/js/chunk-ba900cec.6c11f943.js create mode 100644 static/dist/js/chunk-c7eee472.bbfacff1.js create mode 100644 static/dist/js/chunk-vendors.1462ec98.js delete mode 100644 static/dist/js/chunk-vendors.9cad2091.js delete mode 100644 static/dist/js/chunk-vendors.c19a0b34.js delete mode 100644 static/dist/js/chunk-vendors.cfde0a8a.js delete mode 100644 static/dist/js/chunk-vendors.d687932c.js delete mode 100644 static/dist/js/user.01312123.js create mode 100644 static/dist/js/user.0ba37607.js diff --git a/index.html b/index.html index a128900..88de678 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
设置标题
"),type:"list",list:[{$elem:o("正文
"),value:""}],onClick:function(t){e._command(t)}})}function w(t){var e=this;this.editor=t,this.$elem=o('
'),this.type="droplist",this._active=!1,this.droplist=new v(this,{width:160,$title:o("字号
"),type:"list",list:[{$elem:o('x-small'),value:"1"},{$elem:o('small'),value:"2"},{$elem:o("normal"),value:"3"},{$elem:o('large'),value:"4"},{$elem:o('x-large'),value:"5"},{$elem:o('xx-large'),value:"6"}],onClick:function(t){e._command(t)}})}function k(t){var e=this;this.editor=t,this.$elem=o(' '),this.type="droplist",this._active=!1;var i=t.config,n=i.fontNames||[];this.droplist=new v(this,{width:100,$title:o("字体
"),type:"list",list:n.map((function(t){return{$elem:o(''+t+""),value:t}})),onClick:function(t){e._command(t)}})}v.prototype={constructor:v,show:function(){this.hideTimeoutId&&clearTimeout(this.hideTimeoutId);var t=this.menu,e=t.$elem,i=this.$container;if(!this._show){if(this._rendered)i.show();else{var n=e.getSizeData().height||0,a=this.opt.width||100;i.css("margin-top",n+"px").css("width",a+"px"),e.append(i),this._rendered=!0}this._show=!0}},hide:function(){this.showTimeoutId&&clearTimeout(this.showTimeoutId);var t=this.$container;this._show&&(t.hide(),this._show=!1)}},g.prototype={constructor:g,_command:function(t){var e=this.editor,i=e.selection.getSelectionContainerElem();e.$textElem.equal(i)||e.cmd.do("formatBlock",t)},tryChangeActive:function(t){var e=this.editor,i=this.$elem,n=/^h/i,a=e.cmd.queryCommandValue("formatBlock");n.test(a)?(this._active=!0,i.addClass("w-e-active")):(this._active=!1,i.removeClass("w-e-active"))}},w.prototype={constructor:w,_command:function(t){var e=this.editor;e.cmd.do("fontSize",t)}},k.prototype={constructor:k,_command:function(t){var e=this.editor;e.cmd.do("fontName",t)}};var b=function(){},C=[];function y(t,e){this.menu=t,this.opt=e}function x(t){this.editor=t,this.$elem=o(' '),this.type="panel",this._active=!1}function _(t){this.editor=t,this.$elem=o(' '),this.type="click",this._active=!1}function E(t){this.editor=t,this.$elem=o(' '),this.type="click",this._active=!1}function T(t){this.editor=t,this.$elem=o(' '),this.type="click",this._active=!1}function M(t){this.editor=t,this.$elem=o(' '),this.type="click",this._active=!1}function B(t){this.editor=t,this.$elem=o(' '),this.type="click",this._active=!1}function I(t){var e=this;this.editor=t,this.$elem=o(' '),this.type="droplist",this._active=!1,this.droplist=new v(this,{width:120,$title:o("设置列表
"),type:"list",list:[{$elem:o(' 有序列表'),value:"insertOrderedList"},{$elem:o(' 无序列表'),value:"insertUnorderedList"}],onClick:function(t){e._command(t)}})}function S(t){var e=this;this.editor=t,this.$elem=o(' '),this.type="droplist",this._active=!1,this.droplist=new v(this,{width:100,$title:o("对齐方式
"),type:"list",list:[{$elem:o(' 靠左'),value:"justifyLeft"},{$elem:o(' 居中'),value:"justifyCenter"},{$elem:o(' 靠右'),value:"justifyRight"}],onClick:function(t){e._command(t)}})}function D(t){var e=this;this.editor=t,this.$elem=o(' '),this.type="droplist";var i=t.config,n=i.colors||[];this._active=!1,this.droplist=new v(this,{width:120,$title:o("文字颜色
"),type:"inline-block",list:n.map((function(t){return{$elem:o(''),value:t}})),onClick:function(t){e._command(t)}})}function L(t){var e=this;this.editor=t,this.$elem=o(' '),this.type="droplist";var i=t.config,n=i.colors||[];this._active=!1,this.droplist=new v(this,{width:120,$title:o("背景色
"),type:"inline-block",list:n.map((function(t){return{$elem:o(''),value:t}})),onClick:function(t){e._command(t)}})}function N(t){this.editor=t,this.$elem=o(' '),this.type="click",this._active=!1}function Q(t){this.editor=t,this.$elem=o(' '),this.type="panel",this._active=!1}function j(t){this.editor=t,this.$elem=o(' '),this.type="panel",this._active=!1}function F(t){this.editor=t,this.$elem=o(' '),this.type="panel",this._active=!1}function O(t){this.editor=t,this.$elem=o(' '),this.type="panel",this._active=!1}function P(t){this.editor=t;var e=u("w-e-img");this.$elem=o(' '),t.imgMenuId=e,this.type="panel",this._active=!1}y.prototype={constructor:y,show:function(){var t=this,e=this.menu;if(!(C.indexOf(e)>=0)){var i=e.editor,n=o("body"),a=i.$textContainerElem,s=this.opt,r=o(''),c=s.width||300;r.css("width",c+"px").css("margin-left",(0-c)/2+"px");var l=o('');r.append(l),l.on("click",(function(){t.hide()}));var d=o('"+a+""),s.insertAfter(i),void i.remove();"BLOCKQUOTE"===n&&(a=i.text(),s=o("
"+a+"
"),s.insertAfter(i),i.remove())}else"BLOCKQUOTE"===n?e.cmd.do("formatBlock",""):e.cmd.do("formatBlock","
")},tryChangeActive:function(t){var e=this.editor,i=this.$elem,n=/^BLOCKQUOTE$/i,a=e.cmd.queryCommandValue("formatBlock");n.test(a)?(this._active=!0,i.addClass("w-e-active")):(this._active=!1,i.removeClass("w-e-active"))}},Q.prototype={constructor:Q,onClick:function(t){var e=this.editor,i=e.selection.getSelectionStartElem(),n=e.selection.getSelectionEndElem(),a=e.selection.isSelectionEmpty(),s=e.selection.getSelectionText(),r=void 0;if(i.equal(n))return a?void(this._active?this._createPanel(i.html()):this._createPanel()):(r=o(""+s+"
"),e.cmd.do("insertElem",r),e.selection.createRangeByElem(r,!1),void e.selection.restoreSelection());e.selection.restoreSelection()},_createPanel:function(t){var e=this;t=t||"";var i=t?"edit":"new",n=u("texxt"),a=u("btn"),s=new y(this,{width:500,tabs:[{title:"插入代码",tpl:'\n \n\n',events:[{selector:"#"+a,type:"click",fn:function(){var t=o("#"+n),a=t.val()||t.html();return a=m(a),"new"===i?e._insertCode(a):e._updateCode(a),!0}}]}]});s.show(),this.panel=s},_insertCode:function(t){var e=this.editor;e.cmd.do("insertHTML",""+t+"
")},_updateCode:function(t){var e=this.editor,i=e.selection.getSelectionContainerElem();i&&(i.html(t),e.selection.restoreSelection())},tryChangeActive:function(t){var e=this.editor,i=this.$elem,n=e.selection.getSelectionContainerElem();if(n){var a=n.parent();"CODE"===n.getNodeName()&&"PRE"===a.getNodeName()?(this._active=!0,i.addClass("w-e-active")):(this._active=!1,i.removeClass("w-e-active"))}}},j.prototype={constructor:j,onClick:function(){this._createPanel()},_createPanel:function(){var t=this,e=this.editor,i=e.config,n=i.emotions||[],a=[];n.forEach((function(e){var i=e.type,n=e.content||[],s="";"emoji"===i&&n.forEach((function(t){t&&(s+=''+t+"")})),"image"===i&&n.forEach((function(t){var e=t.src,i=t.alt;e&&(s+='
')})),a.push({title:e.title,tpl:'
'+s+"",events:[{selector:"span.w-e-item",type:"click",fn:function(e){var i=e.target,n=o(i),a=n.getNodeName(),s=void 0;return s="IMG"===a?n.parent().html():""+n.html()+"",t._insert(s),!0}}]})}));var s=new y(this,{width:300,height:200,tabs:a});s.show(),this.panel=s},_insert:function(t){var e=this.editor;e.cmd.do("insertHTML",t)}},F.prototype={constructor:F,onClick:function(){this._active?this._createEditPanel():this._createInsertPanel()},_createInsertPanel:function(){var t=this,e=u("btn"),i=u("row"),n=u("col"),a=new y(this,{width:250,tabs:[{title:"插入表格",tpl:'\n',events:[{selector:"#"+e,type:"click",fn:function(){var e=parseInt(o("#"+i).val()),a=parseInt(o("#"+n).val());return e&&a&&e>0&&a>0&&t._insert(e,a),!0}}]}]});a.show(),this.panel=a},_insert:function(t,e){var i=void 0,n=void 0,a='\n 创建\n \n 行\n \n 列的表格\n
\n \n';for(i=0;i
",0===i)for(n=0;n ";else for(n=0;n ";a+=""}a+=" ";var s=this.editor;s.cmd.do("insertHTML",a),s.cmd.do("enableObjectResizing",!1),s.cmd.do("enableInlineTableEditing",!1)},_createEditPanel:function(){var t=this,e=u("add-row"),i=u("add-col"),n=u("del-row"),a=u("del-col"),s=u("del-table"),o=new y(this,{width:320,tabs:[{title:"编辑表格",tpl:' \n ',events:[{selector:"#"+e,type:"click",fn:function(){return t._addRow(),!0}},{selector:"#"+i,type:"click",fn:function(){return t._addCol(),!0}},{selector:"#"+n,type:"click",fn:function(){return t._delRow(),!0}},{selector:"#"+a,type:"click",fn:function(){return t._delCol(),!0}},{selector:"#"+s,type:"click",fn:function(){return t._delTable(),!0}}]}]});o.show()},_getLocationData:function(){var t={},e=this.editor,i=e.selection.getSelectionContainerElem();if(i){var n=i.getNodeName();if("TD"===n||"TH"===n){var a=i.parent(),s=a.children(),o=s.length;s.forEach((function(e,n){if(e===i[0])return t.td={index:n,elem:e,length:o},!1}));var r=a.parent(),c=r.children(),l=c.length;return c.forEach((function(e,i){if(e===a[0])return t.tr={index:i,elem:e,length:l},!1})),t}}},_addRow:function(){var t=this._getLocationData();if(t){var e=t.tr,i=o(e.elem),n=t.td,a=n.length,s=document.createElement("tr"),r="",c=void 0;for(c=0;c