zhihao-ui 1.3.35 → 1.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { Z as B } from "./BaseInfo-BhnEjLKF.js";
|
|
|
17
17
|
import { Z as g } from "./DetailHeader-DaabNj_4.js";
|
|
18
18
|
import { Z as x } from "./DiyDataTable-D-UZVciZ.js";
|
|
19
19
|
import { D as V } from "./DiyDataTable-D-UZVciZ.js";
|
|
20
|
-
import { Z as G } from "./Map-
|
|
20
|
+
import { Z as G } from "./Map-bFoPIK8W.js";
|
|
21
21
|
import { Z as M } from "./Table-B_3YA1mb.js";
|
|
22
22
|
import { Z as $ } from "./BaseItem-C4NJy1i4.js";
|
|
23
23
|
const A = [
|
package/dist/umd/index.umd.cjs
CHANGED
|
@@ -220,7 +220,7 @@ fe.version="2.30.1",UB(Tt),fe.fn=le,fe.min=LV,fe.max=AV,fe.now=FV,fe.utc=mi,fe.u
|
|
|
220
220
|
<div>
|
|
221
221
|
<span class="text">单击继续,双击结束</span>
|
|
222
222
|
</div>
|
|
223
|
-
`)})}),f.on("drawend",v=>{var R,I,L,B;if(!v.feature.getGeometry())return;g&&!n&&(g.innerHTML+='<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'),n=v.feature,y.setOffset([10,0]);const T=v.feature.getGeometry().getCoordinates(),x=T[0][T[0].length-2];if(y.setPosition(x),w!=null&&w.parentNode&&w.parentNode.removeChild(w),(R=e.getProps())!=null&&R.areaDrawEnd){const P=T[0].map(D=>eo(D,Yn.mercator,Yn.data));(L=(I=e.getProps())==null?void 0:I.areaDrawEnd)==null||L.call(I,P)}f&&(f.setActive(!1),t==null||t.removeInteraction(f),(t==null?void 0:t.getInteractions()).forEach(D=>{D instanceof Sf&&(D.setActive(!1),t==null||t.removeInteraction(D))})),r&&wu(r),(B=document.querySelector(".delete-icon"))==null||B.addEventListener("click",()=>{var P,D;C(),(D=(P=e.getProps())==null?void 0:P.areaDrawEnd)==null||D.call(P,[])})})},h=(v,k)=>{const T=wE(v);switch(k){case"km":return T>1e4?Math.round(T/1e6*100)/100+" km<sup>2</sup>":Math.round(T*100)/100+" m<sup>2</sup>";case"nm":return T>1e4?Math.round(T/1e6/Math.pow(1.852,2)*100)/100+" nm<sup>2</sup>":Math.round(T*100)/100+" m<sup>2</sup>"}};let g,y;const _=()=>{g!=null&&g.parentNode&&g.parentNode.removeChild(g),g=document.createElement("div"),g.style.display="flex",g.className="ol-tooltip ol-tooltip-draw-polygon",y=new po({element:g,offset:[0,-15],positioning:"bottom-center",stopEvent:!1,insertFirst:!1}),t==null||t.addOverlay(y)};let w,E;const b=()=>{w!=null&&w.parentNode&&w.parentNode.removeChild(w),w=document.createElement("div"),w.className="ol-tooltip ol-help-tooltip",E=new po({element:w,offset:[15,0],positioning:"center-left"}),t==null||t.addOverlay(E)},C=()=>{l==null||l.clear(),n=null,_(),b(),m()};return{open:o,close:()=>{l==null||l.clear(),l=null,a&&(t.removeLayer(a),a=null),d=null,f&&(f.setActive(!1),(t==null?void 0:t.getInteractions()).forEach(k=>{k instanceof Sf&&(k.setActive(!1),t==null||t.removeInteraction(k))}),f=null),r&&wu(r),w!=null&&w.parentElement&&w.parentElement.removeChild(w),g!=null&&g.parentElement&&g.parentElement.removeChild(g),E&&t.removeOverlay(E),y&&t.removeOverlay(y),vf(t,"pointer")},reset:C}},z7="zh-map-port-layer",Y7=t=>{const e=new fo,n=new Go({className:z7,source:e,zIndex:100,updateWhileInteracting:!1,updateWhileAnimating:!1});t==null||t.addLayer(n);let r=null,o=null;const s=(m,h=!0)=>{if(!(!m||m.length===0)){if(e.clear(),o){const g=m.find(y=>y.id===o.id);g?o=g:m.push(o)}m.forEach(g=>{a(g,h)})}},a=(m,h=!0)=>{const[g,y]=m.latLon.split(","),_=new sn({geometry:new an(rr([Number(g),Number(y)])),portData:m,select:m.id===(o==null?void 0:o.id),showTitle:m.id===(o==null?void 0:o.id)||h}),w=l(_);
|
|
223
|
+
`)})}),f.on("drawend",v=>{var R,I,L,B;if(!v.feature.getGeometry())return;g&&!n&&(g.innerHTML+='<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'),n=v.feature,y.setOffset([10,0]);const T=v.feature.getGeometry().getCoordinates(),x=T[0][T[0].length-2];if(y.setPosition(x),w!=null&&w.parentNode&&w.parentNode.removeChild(w),(R=e.getProps())!=null&&R.areaDrawEnd){const P=T[0].map(D=>eo(D,Yn.mercator,Yn.data));(L=(I=e.getProps())==null?void 0:I.areaDrawEnd)==null||L.call(I,P)}f&&(f.setActive(!1),t==null||t.removeInteraction(f),(t==null?void 0:t.getInteractions()).forEach(D=>{D instanceof Sf&&(D.setActive(!1),t==null||t.removeInteraction(D))})),r&&wu(r),(B=document.querySelector(".delete-icon"))==null||B.addEventListener("click",()=>{var P,D;C(),(D=(P=e.getProps())==null?void 0:P.areaDrawEnd)==null||D.call(P,[])})})},h=(v,k)=>{const T=wE(v);switch(k){case"km":return T>1e4?Math.round(T/1e6*100)/100+" km<sup>2</sup>":Math.round(T*100)/100+" m<sup>2</sup>";case"nm":return T>1e4?Math.round(T/1e6/Math.pow(1.852,2)*100)/100+" nm<sup>2</sup>":Math.round(T*100)/100+" m<sup>2</sup>"}};let g,y;const _=()=>{g!=null&&g.parentNode&&g.parentNode.removeChild(g),g=document.createElement("div"),g.style.display="flex",g.className="ol-tooltip ol-tooltip-draw-polygon",y=new po({element:g,offset:[0,-15],positioning:"bottom-center",stopEvent:!1,insertFirst:!1}),t==null||t.addOverlay(y)};let w,E;const b=()=>{w!=null&&w.parentNode&&w.parentNode.removeChild(w),w=document.createElement("div"),w.className="ol-tooltip ol-help-tooltip",E=new po({element:w,offset:[15,0],positioning:"center-left"}),t==null||t.addOverlay(E)},C=()=>{l==null||l.clear(),n=null,_(),b(),m()};return{open:o,close:()=>{l==null||l.clear(),l=null,a&&(t.removeLayer(a),a=null),d=null,f&&(f.setActive(!1),(t==null?void 0:t.getInteractions()).forEach(k=>{k instanceof Sf&&(k.setActive(!1),t==null||t.removeInteraction(k))}),f=null),r&&wu(r),w!=null&&w.parentElement&&w.parentElement.removeChild(w),g!=null&&g.parentElement&&g.parentElement.removeChild(g),E&&t.removeOverlay(E),y&&t.removeOverlay(y),vf(t,"pointer")},reset:C}},z7="zh-map-port-layer",Y7=t=>{const e=new fo,n=new Go({className:z7,source:e,zIndex:100,updateWhileInteracting:!1,updateWhileAnimating:!1});t==null||t.addLayer(n);let r=null,o=null;const s=(m,h=!0)=>{if(!(!m||m.length===0)){if(e.clear(),o){const g=m.find(y=>y.id===o.id);g?o=g:m.push(o)}m.forEach(g=>{a(g,h)}),o&&(console.log("selectedPortData",o),f(o))}},a=(m,h=!0)=>{const[g,y]=m.latLon.split(","),_=new sn({geometry:new an(rr([Number(g),Number(y)])),portData:m,select:m.id===(o==null?void 0:o.id),showTitle:m.id===(o==null?void 0:o.id)||h}),w=l(_);_.setStyle(w),e.addFeature(_)},l=m=>{const{select:h,showTitle:g}=m.getProperties(),y=S=>`<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
224
224
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.6563 44.9304C22.5453 44.8844 22.4445 44.817 22.3595 44.7321C22.3595 44.7321 9.36986 31.7424 9.32952 31.6913C7.09059 29.0791 5.64794 25.8802 5.17255 22.4736C4.69716 19.0671 5.20896 15.5957 6.64728 12.471C8.08561 9.34625 10.3902 6.69909 13.2878 4.84325C16.1855 2.98741 19.5548 2.00068 22.9965 2C26.4381 1.99932 29.8078 2.98473 32.7062 4.83943C35.6046 6.69414 37.9102 9.34039 39.3498 12.4646C40.7893 15.5888 41.3025 19.0599 40.8284 22.4666C40.3544 25.8734 38.913 29.0729 36.6751 31.686C36.6401 31.737 23.6531 44.7321 23.6531 44.7321C23.5682 44.817 23.4674 44.8844 23.3564 44.9304C23.2454 44.9763 23.1265 45 23.0063 45C22.8862 45 22.7673 44.9763 22.6563 44.9304Z" fill="${S}"/>
|
|
225
225
|
<g clip-path="url(#clip0_10059_122082)">
|
|
226
226
|
<path d="M34.8624 22.8687L32.5874 25.6313L33.4812 25.7125C33.4812 25.7125 30.5562 28.0687 27.9562 28.2312C25.3562 28.3937 24.1374 24.9 24.1374 24.9V19.1312H27.6312V17.425H24.2999V15.15C25.7624 14.6625 26.7374 13.2812 26.7374 11.6562C26.7374 9.625 25.1124 8 23.0812 8H22.9999C20.9687 8 19.3437 9.625 19.3437 11.6562C19.3437 13.2812 20.3999 14.6625 21.7812 15.15V17.425H18.4499V19.1312H21.9437V24.9C21.9437 24.9 20.6437 28.3125 18.0437 28.2312C15.4437 28.0687 12.5187 25.7125 12.5187 25.7125L13.4124 25.6313L11.0562 22.8687L10.2437 26.2812L11.2187 26.0375C11.2187 26.0375 13.1687 29.5313 16.1749 30.8313C19.1812 32.2125 22.1874 33.9187 22.8374 34C23.4874 33.9187 26.4937 32.2125 29.4187 30.8313C32.3437 29.45 34.3749 26.0375 34.3749 26.0375L35.3499 26.2812L34.8624 22.8687ZM23.0812 13.6875C21.9437 13.6875 21.0499 12.7937 21.0499 11.6562C21.0499 10.6 21.9437 9.70625 22.9999 9.70625H23.0812C24.1374 9.70625 25.0312 10.6 25.0312 11.6562C25.1124 12.7937 24.1374 13.6875 23.0812 13.6875Z" fill="white"/>
|