2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
var T=Object.defineProperty,F=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var v=(e,o,t)=>o in e?T(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,g=(e,o)=>{for(var t in o||(o={}))M.call(o,t)&&v(e,t,o[t]);if(h)for(var t of h(o))V.call(o,t)&&v(e,t,o[t]);return e},y=(e,o)=>F(e,L(o));var _=(e,o,t)=>new Promise((u,c)=>{var p=a=>{try{r(t.next(a))}catch(i){c(i)}},s=a=>{try{r(t.throw(a))}catch(i){c(i)}},r=a=>a.done?u(a.value):Promise.resolve(a.value).then(p,s);r((t=t.apply(e,o)).next())});import{a as E,cK as $,cJ as A,b8 as D,w as N,v as m,f as z,bq as J,bd as O,L as R,aG as l,o as f,j as w,z as d,i as n,t as k,h as C,n as b,F as S,aJ as I,l as K}from"./index.6439bb26.js";import{o as j}from"./other.90f932e6.js";import{u as q}from"./visualization.6e67845e.js";import G from"./Box.5a9a1fd5.js";const H=E({components:{Box:G,Dropdown:$,DownOutlined:A,Menu:D,MenuItem:D.Item},setup(){q();const e=N({tabList:m([]),currentTab:m("")}),o=m(null),t=z(()=>{var s,r;return(r=(s=e.tabList.find(a=>a.id==e.currentTab))==null?void 0:s.name)!=null?r:""});function u({key:s}){e.currentTab!=s&&(e.currentTab=s)}function c(){return _(this,null,function*(){const s=yield j({device_type:1});e.tabList=s,s.length&&(e.currentTab=s[0].id)})}function p(){return _(this,null,function*(){})}return J(()=>{c(),p()}),y(g({},O(e)),{chartRef:o,currentTabValue:t,onMenuClick:u})}}),P={class:"h-full flex flex-col"},Q={class:"py-10px relative"},U={class:"text-center bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-15px font-bold"},W={key:0,class:"absolute right-18px top-1/2 transform -translate-y-1/2"},X={class:"cursor-pointer"},Y=n("span",{class:"text-white text-12px"},"\u66F4\u591A",-1),Z=n("div",{class:"flex-1 px-11px flex flex-col"},[n("div",{class:"flex-1 border border-solid"}),n("div",{class:"grid grid-cols-3 gap-x-6px my-10px"},[n("div",{class:"border border-solid h-66px"}),n("div",{class:"border border-solid h-66px"}),n("div",{class:"border border-solid h-66px"})])],-1);function ee(e,o,t,u,c,p){const s=l("DownOutlined"),r=l("menu-item"),a=l("Menu"),i=l("Dropdown"),B=l("Box");return f(),w(B,{title:"\u76D1\u63A7"},{default:d(()=>[n("div",P,[n("div",Q,[n("div",U,k(e.currentTabValue),1),e.tabList.length>1?(f(),C("div",W,[b(i,{overlayClassName:"dropdownClass",placement:"bottomRight",trigger:"click",style:{height:"300px"}},{overlay:d(()=>[b(a,{onClick:e.onMenuClick},{default:d(()=>[(f(!0),C(S,null,I(e.tabList,x=>(f(),w(r,{key:x.key},{default:d(()=>[n("div",null,k(x.value),1)]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:d(()=>[n("div",X,[Y,b(s,{style:{fontSize:"12px",color:"#FFF"}})])]),_:1})])):K("",!0)]),Z])]),_:1})}var re=R(H,[["render",ee]]);export{re as default};
|