mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-11 23:45:11 +08:00
重构并精简了部分UI组件,移除冗余弹窗与详情组件,新增NPC相关逻辑(npcBehaviorLogic、npcGrowthLogic、npcStore等)及外交逻辑(diplomaticLogic、DiplomacyView)。完善分页、标签、复选框等通用UI组件。优化战报弹窗,调整README下载链接为相对路径,修复部分国际化内容。
1 line
2.3 KiB
JavaScript
1 line
2.3 KiB
JavaScript
import{Bn as e,Cn as t,Gn as n,Jt as r,Ln as i,Wn as a,an as o,fn as s,nn as c,un as l,wn as u}from"./game-logic-Bi1l7y4K.js";import{a as d,i as f,l as p,o as m,r as h,s as g,u as _}from"./vendor-others-DTUzJ7S-.js";var v=f?window:void 0,y=f?window.document:void 0;f&&window.navigator,f&&window.location;function b(e){let t=a(e);return t?.$el??t}function x(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=r(()=>{let t=p(a(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return _(()=>[i.value?.map(e=>b(e))??[v].filter(e=>e!=null),p(a(i.value?e[1]:e[0])),p(n(i.value?e[2]:e[1])),a(i.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=m(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function S(){let t=e(!1),n=c();return n&&s(()=>{t.value=!0},n),t}function C(e){let t=S();return r(()=>(t.value,!!e()))}var w=Symbol(`vueuse-ssr-width`);function T(){let e=o()?h(w,null):null;return typeof e==`number`?e:void 0}function E(t,n={}){let{window:i=v,ssrWidth:o=T()}=n,s=C(()=>i&&`matchMedia`in i&&typeof i.matchMedia==`function`),c=e(typeof o==`number`),l=e(),d=e(!1);return u(()=>{if(c.value){c.value=!s.value,d.value=a(t).split(`,`).some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=!!(n||r);return n&&i&&(i=o>=g(n[1])),r&&i&&(i=o<=g(r[1])),t?!i:i});return}s.value&&(l.value=i.matchMedia(a(t)),d.value=l.value.matches)}),x(l,`change`,e=>{d.value=e.matches},{passive:!0}),r(()=>d.value)}function D(e){return JSON.parse(JSON.stringify(e))}function O(e,n,a,o={}){var s,u;let{clone:f=!1,passive:p=!1,eventName:m,deep:h=!1,defaultValue:g,shouldEmit:_}=o,v=c(),y=a||v?.emit||(v==null||(s=v.$emit)==null?void 0:s.bind(v))||(v==null||(u=v.proxy)==null||(u=u.$emit)==null?void 0:u.bind(v?.proxy)),b=m;n||=`modelValue`,b||=`update:${n.toString()}`;let x=e=>f?typeof f==`function`?f(e):D(e):e,S=()=>d(e[n])?x(e[n]):g,C=e=>{_?_(e)&&y(b,e):y(b,e)};if(p){let r=i(S()),a=!1;return t(()=>e[n],e=>{a||(a=!0,r.value=x(e),l(()=>a=!1))}),t(r,t=>{!a&&(t!==e[n]||h)&&C(t)},{deep:h}),r}else return r({get(){return S()},set(e){C(e)}})}export{O as i,x as n,E as r,y as t}; |