"use strict";(self["webpackChunk_object_Object_"]=self["webpackChunk_object_Object_"]||[]).push([[139],{63591:function(e,a,t){t.r(a),t.d(a,{default:function(){return k}});var n=t(73396);const l={class:"editor-wrapper editor-wrapper-view"},i={class:"editor-container"},r={class:"editor-content"},u={ref:"container",class:"am-engine-view"};function c(e,a,t,c,s,o){const d=(0,n.up)("manual-article"),v=(0,n.up)("am-outline"),g=(0,n.up)("am-loading");return(0,n.wg)(),(0,n.j4)(g,{loading:e.loading},{default:(0,n.w5)((()=>[(0,n._)("div",l,[(0,n._)("div",i,[(0,n._)("div",r,[!e.isMobile&&e.engine?((0,n.wg)(),(0,n.j4)(d,{key:0,list:e.listData,onChange:e.handleChange},null,8,["list","onChange"])):(0,n.kq)("",!0),(0,n._)("div",u,null,512),!e.isMobile&&e.engine?((0,n.wg)(),(0,n.j4)(v,{key:1,engine:e.engine},null,8,["engine"])):(0,n.kq)("",!0)])])])])),_:1},8,["loading"])}var s=t(44870),o=t(83438),d=t(43629),v=t(43693),g=t(93654),p=t(24607),h=t(657),f=t(22483),m=t(8286);const w=h.Gr.filter((e=>e.pluginName.indexOf("uploader")<0&&["mark-range"].indexOf(e.pluginName)<0));var y=(0,n.aZ)({name:"engine-view",components:{AmLoading:v.Z,AmOutline:g.Z,ManualArticle:p.Z},setup(){const e=(0,s.iH)(null),a=(0,s.iH)(null),t=(0,s.iH)(!0),l=(0,s.iH)(),i=(0,s.iH)(),r=(0,s.iH)([]);(0,n.YP)([()=>l.value],(()=>v())),(0,n.YP)([()=>i.value,()=>r.value],(()=>g())),(0,n.bv)((()=>{const e=(0,f.yj)();e&&e.query&&(l.value=Number(e.query.id),i.value=Number(e.query.articleId))}));const u=n=>{if(e.value){a.value&&a.value.destroy();const l=new d.G7(e.value,{plugins:w,cards:h._u,config:{table:{overflow:{maxLeftWidth:()=>0,maxRightWidth:()=>{if(d.tq)return 0;const e=(0,d.$)(".editor-wrapper-view"),a=(0,d.$)(".am-engine-view"),t=e.get()?.getBoundingClientRect(),n=a.get()?.getBoundingClientRect(),l=(t?.width||0)-(n?.width||0);return l<=0?100:l}}}}});l.messageSuccess=e=>{o.ZP.success(e)},l.messageError=e=>{o.ZP.error(e)},l.render(n),t.value=!1,a.value=l}};(0,n.Ah)((()=>{a.value&&a.value.destroy()}));const c=e=>{i.value=e},v=async()=>{if(l.value){const e=await(0,m.GX)(l.value);r.value=e||[]}},g=()=>{const e=r.value.find((e=>e.id===i.value)),a=e?.content||"";u(a)};return{loading:t,isMobile:d.tq,container:e,engine:a,listData:r,handleChange:c,getManualArticleList:v}}}),_=t(40089);const b=(0,_.Z)(y,[["render",c],["__scopeId","data-v-3587986c"]]);var k=b},24607:function(e,a,t){t.d(a,{Z:function(){return y}});var n=t(73396),l=t(87139);const i=e=>((0,n.dD)("data-v-3f66adee"),e=e(),(0,n.Cn)(),e),r={class:"manual-article"},u=i((()=>(0,n._)("h2",null,"手册目录",-1))),c={class:"article-tree"},s={key:0,style:{color:"#1890ff"}};function o(e,a,t,i,o,d){const v=(0,n.up)("InputSearch"),g=(0,n.up)("Tree");return(0,n.wg)(),(0,n.iD)("div",r,[u,(0,n.Wm)(v,{value:e.searchValue,"onUpdate:value":a[0]||(a[0]=a=>e.searchValue=a),placeholder:"请输入搜索内容","enter-button":"",onSearch:e.handleSearch},null,8,["value","onSearch"]),(0,n._)("div",c,[(0,n.Wm)(g,{selectedKeys:e.selectedKeys,"onUpdate:selectedKeys":a[1]||(a[1]=a=>e.selectedKeys=a),"tree-data":e.treeData,onSelect:e.selectArticle,fieldNames:{key:"id"}},{title:(0,n.w5)((({title:e,key:a})=>["0-0-1-0"===a?((0,n.wg)(),(0,n.iD)("span",s,(0,l.zw)(e),1)):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,l.zw)(e),1)],64))])),_:1},8,["selectedKeys","tree-data","onSelect"])])])}var d=t(44870),v=t(89044),g=t(185),p=t(22483),h=t(42024),f=(0,n.aZ)({name:"manual-article",components:{InputSearch:v.Z,Tree:g.ZP},props:["list"],emits:["change"],setup(e,{emit:a}){const t=(0,p.yj)(),l=(0,d.iH)(""),i=(0,d.iH)([]),r=(0,d.iH)([]),u=(0,d.iH)([]);(0,n.YP)((()=>e.list),(e=>c(e))),(0,n.bv)((()=>{if(t.query&&t.query.id&&t.query.articleId){const e=Number(t.query.articleId);u.value=[e]}}));const c=e=>{i.value=e,r.value=(0,h.OH)(e,"parentId")},s=e=>{const a=(0,d.IU)(i.value).filter((a=>a.title.toLowerCase().indexOf(e.toLowerCase())>=0));r.value=(0,h.OH)(a,"parentId")},o=e=>{a("change",e[0])};return{searchValue:l,treeData:r,selectedKeys:u,handleSearch:s,selectArticle:o}}}),m=t(40089);const w=(0,m.Z)(f,[["render",o],["__scopeId","data-v-3f66adee"]]);var y=w}}]);
//# sourceMappingURL=editor-view.7fddc9c4.js.map