import{d as N,f as i,o as C,u as e,U as g,a2 as D,a3 as I,k as s,af as c,G as h,a4 as k,a5 as K}from"./vue-vendor-CxLCUzY4.js";const V={style:{"min-width":"800px"}},B={style:{"margin-left":"100px","font-weight":"bolder"}},L=["src"],G=N({__name:"ImgTurnPage",setup(E){const r=i([{title:"第一页",key:"0-0",children:[{title:"1页",key:"0-0-0",imgUrl:"https://static.jeecg.com/upload/test/1_1588149743473.jpg"},{title:"2页",key:"0-0-1",imgUrl:"https://static.jeecg.com/upload/test/u27356337152749454924fm27gp0_1588149731821.jpg"}]},{title:"第二页",key:"0-1",children:[{title:"1页",key:"0-1-0",imgUrl:"https://static.jeecg.com/upload/test/u24454681402491956848fm27gp0_1588149712663.jpg"},{title:"2页",key:"0-1-1",imgUrl:"https://static.jeecg.com/upload/test/u8891206113801177793fm27gp0_1588149704459.jpg"}]},{title:"第三页",key:"0-2",children:[{title:"1页",key:"0-2-0",imgUrl:"https://static.jeecg.com/upload/test/1374962_1587621329085.jpg"}]}]),m=i([]),u=i([]),l=i(0),f=i(""),_=i(""),o=i([]);C(x);function x(){for(var a=0,t=0;t<e(r).length;t++)for(var n=0;n<e(r)[t].children.length;n++)o.value.push({key:e(r)[t].children[n].key,pkey:e(r)[t].key,sort:a++,imgUrl:e(r)[t].children[n].imgUrl,navName:e(r)[t].title+"/"+e(r)[t].children[n].title});p(o.value[e(l)])}function U(a,t){for(var n=0;n<e(o).length;n++)if(e(o)[n].key===a[0]){l.value=e(o)[n].sort,p(e(o)[n]);break}}function w(a){u.value=[],a!==null&&a!==""&&(u.value[0]=a[1])}function b(){e(l)===0?l.value=e(o).length-1:l.value=l.value-1,p(e(o)[e(l)])}function j(){e(l)===e(o).length-1?l.value=0:l.value=e(l)+1,p(e(o)[e(l)])}function p(a){m.value=[],f.value=a.imgUrl,m.value[0]=a.key,u.value[0]=a.pkey,_.value=a.navName}return(a,t)=>{const n=g("a-tree"),d=g("a-col"),y=g("a-button"),v=g("a-row");return D(),I("div",V,[s(v,null,{default:c(()=>[s(d,{span:6},{default:c(()=>[s(n,{showLine:"",treeData:r.value,expandedKeys:[u.value[0]],selectedKeys:m.value,style:{height:"500px","border-right":"2px solid #c1c1c1","overflow-y":"auto"},onExpand:w,onSelect:U},null,8,["treeData","expandedKeys","selectedKeys"])]),_:1}),s(d,{span:18},{default:c(()=>[s(v,{style:{"margin-top":"10px","padding-left":"2%"}},{default:c(()=>[s(d,{span:24,style:{"margin-bottom":"10px"}},{default:c(()=>[s(y,{onClick:b,preIcon:"ant-design:left-outlined",type:"primary"},{default:c(()=>t[0]||(t[0]=[h("上一页")])),_:1}),s(y,{onClick:j,preIcon:"ant-design:right-outlined",style:{"margin-left":"8px"},type:"primary"},{default:c(()=>t[1]||(t[1]=[h("下一页")])),_:1}),k("span",B,K(_.value),1)]),_:1}),s(d,{span:24},{default:c(()=>[k("img",{src:f.value,preview:""},null,8,L)]),_:1})]),_:1})]),_:1})]),_:1})])}}});export{G as default};
