From ff87f29333692ce257d12903e1183d5701bd409b Mon Sep 17 00:00:00 2001 From: zhbaor Date: Fri, 7 Mar 2025 21:25:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AFBasementSkill=E5=8A=A0?= =?UTF-8?q?=E5=9B=9Ecursor:=20pointer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/dist/assets/BasementSkill.js | 2 +- ui/src/pages/BasementSkill.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/dist/assets/BasementSkill.js b/ui/dist/assets/BasementSkill.js index 038f761..3c39146 100644 --- a/ui/dist/assets/BasementSkill.js +++ b/ui/dist/assets/BasementSkill.js @@ -128,4 +128,4 @@ PERFORMANCE OF THIS SOFTWARE. * better-scroll / pull-up * (c) 2016-2023 ustbhuangyi * Released under the MIT License. - */var Ve=typeof window<"u",Mt=Ve&&navigator.userAgent.toLowerCase();Mt&&Mt.indexOf("android")>0;(function(){if(typeof Mt=="string"){var e=/os (\d\d?_\d(_\d)?)/,A=e.exec(Mt);if(!A)return!1;var t=A[1].split("_").map(function(r){return parseInt(r,10)});return t[0]===13&&t[1]>=4}return!1})();var Wg=!1;if(Ve){var Zg="test-passive";try{var Ks={};Object.defineProperty(Ks,"passive",{get:function(){Wg=!0}}),window.addEventListener(Zg,function(){},Ks)}catch{}}var zg=function(e,A){for(var t in A)e[t]=A[t];return e},Zi=Ve&&document.createElement("div").style,ue=function(){if(!Ve)return!1;for(var e=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],A=0,t=e;A0&&(r.maxScrollPos=-1)})},e.prototype.registerHooks=function(A,t,r){A.on(t,r,this),this.hooksFn.push([A,t,r])},e.prototype.watch=function(){this.watching||(this.watching=!0,this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkPullUp))},e.prototype.unwatch=function(){this.watching=!1,this.scroll.off(this.scroll.eventTypes.scroll,this.checkPullUp)},e.prototype.checkPullUp=function(A){var t=this,r=this.options.threshold;this.scroll.movingDirectionY===1&&A.y<=this.scroll.maxScrollY+r&&(this.pulling=!0,this.scroll.once(this.scroll.eventTypes.scrollEnd,function(){t.pulling=!1}),this.unwatch(),this.scroll.trigger(Ls))},e.prototype.finishPullUp=function(){var A=this;this.scroll.scroller.scrollBehaviorY.setMovingDirection(0),this.pulling?this.scroll.once(this.scroll.eventTypes.scrollEnd,function(){A.watch()}):this.watch()},e.prototype.openPullUp=function(A){A===void 0&&(A={}),this.handleOptions(A),this.watch()},e.prototype.closePullUp=function(){this.unwatch()},e.prototype.autoPullUpLoad=function(){var A=this.options.threshold,t=this.scroll.scroller.scrollBehaviorY;if(!(this.pulling||!this.watching)){var r=-1,n=t.maxScrollPos+A+r;this.scroll.scroller.scrollBehaviorY.setMovingDirection(r),this.scroll.scrollTo(this.scroll.x,n,this.scroll.options.bounceTime)}},e.pluginName="pullUpLoad",e}();const ew=["rowspan"],tw=["rowspan"],rw=["innerHTML"],nw={key:0},sw={key:0},iw=["innerHTML"],ww={__name:"BasementSkill",setup(e){const A=Y(null),t=Y(null),r=()=>{A.value&&(Ue.use(xg),Ue.use(_g),Ue.use(Jg),Ue.use(Aw),t.value=new Ue(A.value,{probeType:3,click:!0,pullUpLoad:!0,observeDOM:!0,mouseWheel:{speed:20,invert:!1,easeTime:300},scrollY:!0,scrollbar:!0}),t.value.on("pullingUp",()=>{f()}))},n=Y([]),s=Y(1),i=Y(!0),o=Y(""),a=Y(""),B=Y(""),c=Y(!1),l=Y(!1),u=Y(null),h=async(F=1)=>{try{const g=await to.get("/building_skill_waterfall",{params:{page:F,name_select:o.value,des_select:a.value,room_select:B.value,showOnlyMatchedSkills:c.value}}),{data:E,has_more:S}=g.data;n.value=E,i.value=S,ro(()=>{var x,I;(x=t.value)==null||x.refresh(),i.value&&((I=t.value)==null||I.finishPullUp())})}catch(g){console.error("Error fetching data:",g)}};Ao(()=>{h().then(()=>{r()})});const f=()=>{s.value++,h(s.value)},w=Ct(()=>n.value.map((F,g)=>({key:`${g}`,value:g,avatar:F.name,span:F.span,childSkill:F.child_skill}))),m=F=>{window.open(`https://prts.wiki/w/${F}`,"_blank")},U=F=>{const g=v(F);if(g){const E=g.dataset.id;u.value=E,l.value=!0}},p=F=>F.replace(/^[^0-9a-zA-Z]/,"").replace(/[^0-9a-zA-Z]/g,"-"),T=F=>F.replace(/^\W/,"").replace(/\W/g,"_"),H=F=>{const g=F.replace(/<([^<>]+)>([^<>]+)<\/>/g,(E,S,x)=>{if(S.startsWith("@cc."))return`{{span class="riic-rt ${p(S)}"}}${x}{{/span}}`;if(S.startsWith("$cc."))return`{{span class="riic-term" data-id="${T(S)}"}}${x}{{/span}}`}).replace(/\n/g,"
");return/<[^<>]+>[^<>]+<\/>/.test(g)?H(g):g.replace(/{{/g,"<").replace(/}}/g,">")},v=F=>{var g,E;for(const S of((g=F.composedPath)==null?void 0:g.call(F))||[])if((E=S.classList)!=null&&E.contains("riic-term"))return S},d=F=>{const g=F.reduce((E,S)=>{const x=S.skill_key;return E[x]||(E[x]=[]),E[x].push(S),E},{});return Object.values(g)},K=F=>d(F.childSkill).reduce((E,S)=>E+S.length,0);return(F,g)=>{const E=oo,S=ao,x=io,I=co,X=lo,JA=Bo,z=so,eA=no;return aA(),eo(x,{vertical:"",align:"center",style:{width:"100%"}},{default:oA(()=>[g[12]||(g[12]=M("h3",null,"做了筛选名称,筛选描述,没做其他的效果显示,会有的.jpg",-1)),W(x,{align:"center",size:30},{default:oA(()=>[g[7]||(g[7]=M("div",null,"干员名称搜索:",-1)),W(E,{value:o.value,"onUpdate:value":g[0]||(g[0]=N=>o.value=N),type:"text",placeholder:"名称搜索",style:{flex:"1"},onInput:h},null,8,["value"]),g[8]||(g[8]=M("div",null,"描述搜索(如用拼音,全拼):",-1)),W(E,{value:a.value,"onUpdate:value":g[1]||(g[1]=N=>a.value=N),type:"text",placeholder:"名称搜索",style:{flex:"1"},onInput:h},null,8,["value"]),g[9]||(g[9]=M("div",null,"进驻房间搜索:",-1)),W(E,{value:B.value,"onUpdate:value":g[2]||(g[2]=N=>B.value=N),type:"text",placeholder:"房间类型",style:{flex:"1"},onInput:h},null,8,["value"]),W(S,{checked:c.value,"onUpdate:checked":g[3]||(g[3]=N=>c.value=N),onChange:h},{default:oA(()=>g[6]||(g[6]=[Xe(" 仅显示匹配房间类型的技能 ")])),_:1},8,["checked"])]),_:1}),M("div",{ref_key:"scrollWrapper",ref:A,class:"scroll-wrapper"},[W(JA,{"single-line":!1},{default:oA(()=>[g[11]||(g[11]=M("thead",null,[M("tr",null,[M("th",null,"名称"),M("th",null,"技能组"),M("th",null,"条件"),M("th",null,"技能名称"),M("th",null,"房间类型"),M("th",null,"技能描述")])],-1)),M("tbody",null,[(aA(!0),lA(ge,null,tr(w.value,(N,mA)=>(aA(),lA(ge,{key:mA},[(aA(!0),lA(ge,null,tr(d(N.childSkill),(xA,OA)=>(aA(),lA(ge,{key:OA},[(aA(!0),lA(ge,null,tr(xA,($,wA)=>(aA(),lA("tr",{key:wA},[OA===0&&wA===0?(aA(),lA("td",{key:0,rowspan:K(N)},[W(x,{align:"center",onClick:WA=>m(N.avatar)},{default:oA(()=>[W(I,{lazy:"",src:`avatar/${N.avatar}.webp`,size:60,round:"",color:"transparent"},null,8,["src"]),Xe(" "+we(N.avatar),1)]),_:2},1032,["onClick"])],8,ew)):Ye("",!0),wA===0?(aA(),lA("td",{key:1,rowspan:xA.length}," 第 "+we(OA+1)+" 组 ",9,tw)):Ye("",!0),M("td",null,we($.phase_level),1),M("td",null,[W(X,{color:{color:$.buffColor,textColor:$.textColor}},{avatar:oA(()=>[W(I,{src:`building_skill/${$.skillIcon}.webp`,round:"",size:"40",color:"transparent"},null,8,["src"])]),default:oA(()=>[Xe(" "+we($.skillname),1)]),_:2},1032,["color"])]),M("td",null,[W(X,{color:{color:$.buffColor,textColor:$.textColor}},{default:oA(()=>[Xe(we($.roomType),1)]),_:2},1032,["color"])]),M("td",{innerHTML:H($.des),onClick:g[4]||(g[4]=WA=>U(WA))},null,8,rw)]))),128))],64))),128))],64))),128)),i.value?(aA(),lA("tr",nw,g[10]||(g[10]=[M("td",{colspan:"8",class:"loading-more"},"加载中...",-1)]))):Ye("",!0)])]),_:1})],512),W(eA,{show:l.value,"onUpdate:show":g[5]||(g[5]=N=>l.value=N),style:{"max-width":"600px","user-select":"none"}},{default:oA(()=>[W(z,{title:"技能内的特殊名词"},{default:oA(()=>[u.value&&se(rr)[u.value]?(aA(),lA("div",sw,[W(z,{title:se(rr)[u.value].termName},{default:oA(()=>[M("div",{innerHTML:H(se(rr)[u.value].description)},null,8,iw)]),_:1},8,["title"])])):Ye("",!0)]),_:1})]),_:1},8,["show"])]),_:1})}}};export{ww as default}; + */var Ve=typeof window<"u",Mt=Ve&&navigator.userAgent.toLowerCase();Mt&&Mt.indexOf("android")>0;(function(){if(typeof Mt=="string"){var e=/os (\d\d?_\d(_\d)?)/,A=e.exec(Mt);if(!A)return!1;var t=A[1].split("_").map(function(r){return parseInt(r,10)});return t[0]===13&&t[1]>=4}return!1})();var Wg=!1;if(Ve){var Zg="test-passive";try{var Ks={};Object.defineProperty(Ks,"passive",{get:function(){Wg=!0}}),window.addEventListener(Zg,function(){},Ks)}catch{}}var zg=function(e,A){for(var t in A)e[t]=A[t];return e},Zi=Ve&&document.createElement("div").style,ue=function(){if(!Ve)return!1;for(var e=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],A=0,t=e;A0&&(r.maxScrollPos=-1)})},e.prototype.registerHooks=function(A,t,r){A.on(t,r,this),this.hooksFn.push([A,t,r])},e.prototype.watch=function(){this.watching||(this.watching=!0,this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkPullUp))},e.prototype.unwatch=function(){this.watching=!1,this.scroll.off(this.scroll.eventTypes.scroll,this.checkPullUp)},e.prototype.checkPullUp=function(A){var t=this,r=this.options.threshold;this.scroll.movingDirectionY===1&&A.y<=this.scroll.maxScrollY+r&&(this.pulling=!0,this.scroll.once(this.scroll.eventTypes.scrollEnd,function(){t.pulling=!1}),this.unwatch(),this.scroll.trigger(Ls))},e.prototype.finishPullUp=function(){var A=this;this.scroll.scroller.scrollBehaviorY.setMovingDirection(0),this.pulling?this.scroll.once(this.scroll.eventTypes.scrollEnd,function(){A.watch()}):this.watch()},e.prototype.openPullUp=function(A){A===void 0&&(A={}),this.handleOptions(A),this.watch()},e.prototype.closePullUp=function(){this.unwatch()},e.prototype.autoPullUpLoad=function(){var A=this.options.threshold,t=this.scroll.scroller.scrollBehaviorY;if(!(this.pulling||!this.watching)){var r=-1,n=t.maxScrollPos+A+r;this.scroll.scroller.scrollBehaviorY.setMovingDirection(r),this.scroll.scrollTo(this.scroll.x,n,this.scroll.options.bounceTime)}},e.pluginName="pullUpLoad",e}();const ew=["rowspan"],tw=["rowspan"],rw=["innerHTML"],nw={key:0},sw={key:0},iw=["innerHTML"],ww={__name:"BasementSkill",setup(e){const A=Y(null),t=Y(null),r=()=>{A.value&&(Ue.use(xg),Ue.use(_g),Ue.use(Jg),Ue.use(Aw),t.value=new Ue(A.value,{probeType:3,click:!0,pullUpLoad:!0,observeDOM:!0,mouseWheel:{speed:20,invert:!1,easeTime:300},scrollY:!0,scrollbar:!0}),t.value.on("pullingUp",()=>{f()}))},n=Y([]),s=Y(1),i=Y(!0),o=Y(""),a=Y(""),B=Y(""),c=Y(!1),l=Y(!1),u=Y(null),h=async(F=1)=>{try{const g=await to.get("/building_skill_waterfall",{params:{page:F,name_select:o.value,des_select:a.value,room_select:B.value,showOnlyMatchedSkills:c.value}}),{data:E,has_more:S}=g.data;n.value=E,i.value=S,ro(()=>{var x,I;(x=t.value)==null||x.refresh(),i.value&&((I=t.value)==null||I.finishPullUp())})}catch(g){console.error("Error fetching data:",g)}};Ao(()=>{h().then(()=>{r()})});const f=()=>{s.value++,h(s.value)},w=Ct(()=>n.value.map((F,g)=>({key:`${g}`,value:g,avatar:F.name,span:F.span,childSkill:F.child_skill}))),m=F=>{window.open(`https://prts.wiki/w/${F}`,"_blank")},U=F=>{const g=v(F);if(g){const E=g.dataset.id;u.value=E,l.value=!0}},p=F=>F.replace(/^[^0-9a-zA-Z]/,"").replace(/[^0-9a-zA-Z]/g,"-"),T=F=>F.replace(/^\W/,"").replace(/\W/g,"_"),H=F=>{const g=F.replace(/<([^<>]+)>([^<>]+)<\/>/g,(E,S,x)=>{if(S.startsWith("@cc."))return`{{span class="riic-rt ${p(S)}"}}${x}{{/span}}`;if(S.startsWith("$cc."))return`{{span class="riic-term" data-id="${T(S)}"}}${x}{{/span}}`}).replace(/\n/g,"
");return/<[^<>]+>[^<>]+<\/>/.test(g)?H(g):g.replace(/{{/g,"<").replace(/}}/g,">")},v=F=>{var g,E;for(const S of((g=F.composedPath)==null?void 0:g.call(F))||[])if((E=S.classList)!=null&&E.contains("riic-term"))return S},d=F=>{const g=F.reduce((E,S)=>{const x=S.skill_key;return E[x]||(E[x]=[]),E[x].push(S),E},{});return Object.values(g)},K=F=>d(F.childSkill).reduce((E,S)=>E+S.length,0);return(F,g)=>{const E=oo,S=ao,x=io,I=co,X=lo,JA=Bo,z=so,eA=no;return aA(),eo(x,{vertical:"",align:"center",style:{width:"100%"}},{default:oA(()=>[g[12]||(g[12]=M("h3",null,"做了筛选名称,筛选描述,没做其他的效果显示,会有的.jpg",-1)),W(x,{align:"center",size:30},{default:oA(()=>[g[7]||(g[7]=M("div",null,"干员名称搜索:",-1)),W(E,{value:o.value,"onUpdate:value":g[0]||(g[0]=N=>o.value=N),type:"text",placeholder:"名称搜索",style:{flex:"1"},onInput:h},null,8,["value"]),g[8]||(g[8]=M("div",null,"描述搜索(如用拼音,全拼):",-1)),W(E,{value:a.value,"onUpdate:value":g[1]||(g[1]=N=>a.value=N),type:"text",placeholder:"名称搜索",style:{flex:"1"},onInput:h},null,8,["value"]),g[9]||(g[9]=M("div",null,"进驻房间搜索:",-1)),W(E,{value:B.value,"onUpdate:value":g[2]||(g[2]=N=>B.value=N),type:"text",placeholder:"房间类型",style:{flex:"1"},onInput:h},null,8,["value"]),W(S,{checked:c.value,"onUpdate:checked":g[3]||(g[3]=N=>c.value=N),onChange:h},{default:oA(()=>g[6]||(g[6]=[Xe(" 仅显示匹配房间类型的技能 ")])),_:1},8,["checked"])]),_:1}),M("div",{ref_key:"scrollWrapper",ref:A,class:"scroll-wrapper"},[W(JA,{"single-line":!1},{default:oA(()=>[g[11]||(g[11]=M("thead",null,[M("tr",null,[M("th",null,"名称"),M("th",null,"技能组"),M("th",null,"条件"),M("th",null,"技能名称"),M("th",null,"房间类型"),M("th",null,"技能描述")])],-1)),M("tbody",null,[(aA(!0),lA(ge,null,tr(w.value,(N,mA)=>(aA(),lA(ge,{key:mA},[(aA(!0),lA(ge,null,tr(d(N.childSkill),(xA,OA)=>(aA(),lA(ge,{key:OA},[(aA(!0),lA(ge,null,tr(xA,($,wA)=>(aA(),lA("tr",{key:wA},[OA===0&&wA===0?(aA(),lA("td",{key:0,rowspan:K(N)},[W(x,{align:"center",onClick:WA=>m(N.avatar)},{default:oA(()=>[W(I,{lazy:"",src:`avatar/${N.avatar}.webp`,size:60,round:"",style:{cursor:"pointer"},color:"transparent"},null,8,["src"]),Xe(" "+we(N.avatar),1)]),_:2},1032,["onClick"])],8,ew)):Ye("",!0),wA===0?(aA(),lA("td",{key:1,rowspan:xA.length}," 第 "+we(OA+1)+" 组 ",9,tw)):Ye("",!0),M("td",null,we($.phase_level),1),M("td",null,[W(X,{color:{color:$.buffColor,textColor:$.textColor}},{avatar:oA(()=>[W(I,{src:`building_skill/${$.skillIcon}.webp`,round:"",size:"40",color:"transparent"},null,8,["src"])]),default:oA(()=>[Xe(" "+we($.skillname),1)]),_:2},1032,["color"])]),M("td",null,[W(X,{color:{color:$.buffColor,textColor:$.textColor}},{default:oA(()=>[Xe(we($.roomType),1)]),_:2},1032,["color"])]),M("td",{innerHTML:H($.des),onClick:g[4]||(g[4]=WA=>U(WA))},null,8,rw)]))),128))],64))),128))],64))),128)),i.value?(aA(),lA("tr",nw,g[10]||(g[10]=[M("td",{colspan:"8",class:"loading-more"},"加载中...",-1)]))):Ye("",!0)])]),_:1})],512),W(eA,{show:l.value,"onUpdate:show":g[5]||(g[5]=N=>l.value=N),style:{"max-width":"600px","user-select":"none"}},{default:oA(()=>[W(z,{title:"技能内的特殊名词"},{default:oA(()=>[u.value&&se(rr)[u.value]?(aA(),lA("div",sw,[W(z,{title:se(rr)[u.value].termName},{default:oA(()=>[M("div",{innerHTML:H(se(rr)[u.value].description)},null,8,iw)]),_:1},8,["title"])])):Ye("",!0)]),_:1})]),_:1},8,["show"])]),_:1})}}};export{ww as default}; diff --git a/ui/src/pages/BasementSkill.vue b/ui/src/pages/BasementSkill.vue index fb07606..8dcd580 100644 --- a/ui/src/pages/BasementSkill.vue +++ b/ui/src/pages/BasementSkill.vue @@ -61,6 +61,7 @@ :src="`avatar/${item.avatar}.webp`" :size="60" round + style="cursor: pointer" color="transparent" /> {{ item.avatar }}