@techui/scifi 0.0.1-alpha.3 → 0.0.2-alpha.2
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/UPDATE.md +39 -0
- package/core/core_bg.wasm +0 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/tuiEchartsMap.js +1 -1
- package/index.js +1 -0
- package/package.json +2 -1
- package/core/package.json +0 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCssVars as x,computed as g,getCurrentInstance as I,ref as w,reactive as P,watch as v,markRaw as B,onMounted as L,nextTick as M,onBeforeUnmount as $,resolveComponent as E,createBlock as N,openBlock as
|
|
1
|
+
import{useCssVars as x,computed as g,getCurrentInstance as I,ref as w,reactive as P,watch as v,markRaw as B,onMounted as L,nextTick as M,onBeforeUnmount as $,resolveComponent as E,createBlock as N,openBlock as s,withCtx as R,createElementBlock as m,createCommentVNode as b,normalizeClass as S,createElementVNode as y,Fragment as V,renderList as J,toDisplayString as z}from"vue";import{tStr as A,tQuery as F}from"@techui/utils";import*as O from"echarts";const H={key:1,class:"map-breadcrumb"},Q=["onClick"],U={class:"desc"},W=Object.assign({name:"TuiEchartsMap"},{__name:"tuiEchartsMap",props:{chartOption:{type:Object,default:{}},chartData:{type:Object,default:{}}},setup(a){x((a=>({c68d8d0a:l.value.top,v5331c8c2:l.value.right,v0fd72f76:l.value.bottom,v0b2ba6be:l.value.left})));const{proxy:{$emit:t}}=I(),{$tState:e}=proxy,r=w(!1),n=P({chartInitTime:0,chart:"",loading:!0,inited:!1}),i="echartmap_"+A.rdm(),o=a,c=g((()=>null==o.chartData.nav.show||o.chartData.nav.show)),l=g((()=>{let a=o.chartData.nav.position||{};for(let t in a)"number"==typeof a[t]&&(a[t]=a[t]+"px");return a}));v((()=>o.chartOption.loading),((a,t)=>{null!=a&&(n.loading=a)}),{immediate:!0}),v((()=>o.chartOption.series),(a=>{a.length>0&&h()}),{deep:!0});const h=()=>{if(!F.el("#tuiRoot"))return void tConsolei18n("error","echartsInit","error.echartsInit");const{chartData:a,chartOption:e}=o;O.registerMap(a.geoJson.name,a.geoJson),0==n.chartInitTime&&(n.chart=B(O.init(r.value,"eTheme")),n.chart.on("finished",(()=>{0==n.chartInitTime&&(n.chartInitTime++,n.inited=!0)})),0==n.chart._chartsViews.length&&(n.chart.on("click",(a=>{let e,r=a;a.value&&(e=n.chart.convertToPixel("geo",[a.value[0],a.value[1]]),r.domPosition=e,r.chart=n.chart),t("mapClick",r)})),n.chart.on("georoam",(a=>{let e=a;e.chart=n.chart,t("mapAction",e)})),n.chart.on("dblclick",(a=>{let e=a;e.chart=n.chart,t("mapDBClick",e)})),n.chart.on("mouseover",(a=>{let e=a;e.chart=n.chart,t("mapHover",e)})),n.chart.on("timelinechanged",(a=>{const{timeLine:e,alladcode:r}=o.chartData;let i=a;if(i.chart=n.chart,"geoTitle"==e.titleType){let t=e.title[a.currentIndex],n=r.filter((a=>a.name.includes(t)))[0],o=a.chart.convertToPixel("geo",[n.lng,n.lat]);i.domPosition=o}t("mapTimeLineChanged",i)})))),n.chart.clear(),n.chart.setOption(e,!0),n.loading=!1,o.chartOption.loading=!1};return L((()=>{n.inited=!0,M((()=>{o.chartOption.geo&&h()}))})),$((()=>{try{if(n.loading)return;n.chart.clear(),n.chart.dispose()}catch{tConsolei18n("error","echartsDestory","error.echartsDestory")}})),(a,e)=>{const l=E("TuiLoaderPanel");return s(),N(l,{class:"tui-echarts-map-wrap",loading:n.loading,inited:n.inited,loadingOpacity:.5},{default:R((()=>[n.inited?(s(),m("div",{key:0,class:S(`echarts-map chart-map-${i} ${n.loading?"map-loading":""}`),ref_key:"mapRef",ref:r},null,2)):b("",!0),c.value?(s(),m("div",H,[(s(!0),m(V,null,J(o.chartData.nav.data,((a,e)=>(s(),m("div",{class:"item",onClick:r=>((a,e)=>{const{alladcode:r,initChart:n,nav:i}=o.chartData,c=i.data;let s=a;c[c.length-1].name!=a.name&&(s.componentType="mapNav",t("mapClick",s),c.splice(e+1,c.length-e+1))})(a,e),key:e},[y("span",U,z(a.name),1)],8,Q)))),128)),e[0]||(e[0]=y("i",{class:"tui-icon ti-map"},null,-1))])):b("",!0)])),_:1},8,["loading","inited"])}}});export{W as default};
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techui/scifi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-alpha.2",
|
|
4
4
|
"description": "TechUI Scifi is a sci-fi SVG component library developed based on Vue3. It uses dynamically calculated SVG elements to generate a variety of cool, futuristic, and technological components.",
|
|
5
5
|
"author": "aYin <ayin86cn@gmail.com> <wechat:jay1986cn>",
|
|
6
6
|
"homepage": "https://techui.net",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
],
|
|
42
42
|
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@techui/icons": "*",
|
|
44
45
|
"@techui/colors": "*",
|
|
45
46
|
"@techui/lessmixins": "*",
|
|
46
47
|
"@techui/locales": "*",
|
package/core/package.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "core",
|
|
3
|
-
"collaborators": [
|
|
4
|
-
"ayin86 <ayin86cn@gmail.com>"
|
|
5
|
-
],
|
|
6
|
-
"description": "It's a private project.",
|
|
7
|
-
"version": "0.3.0",
|
|
8
|
-
"license": "none",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/jason86cn"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"core_bg.wasm",
|
|
15
|
-
"core.js",
|
|
16
|
-
"core.d.ts"
|
|
17
|
-
],
|
|
18
|
-
"module": "core.js",
|
|
19
|
-
"types": "core.d.ts",
|
|
20
|
-
"sideEffects": [
|
|
21
|
-
"./snippets/*"
|
|
22
|
-
]
|
|
23
|
-
}
|