@nuxt/devtools
Version:
<a href="https://devtools.nuxt.com"><img width="1200" alt="Nuxt DevTools" src="https://github-production-user-asset-6210df.s3.amazonaws.com/904724/261577617-a10567bd-ad33-48cc-9bda-9e37dbe1929f.png"></a> <br>
2 lines (1 loc) • 713 B
JavaScript
import{d as s,a as u,o as d,m as f,v as p,t as o,f as n,k as c,D as m}from"./Bysyzw-g.js";const x={"ml-1":"","text-xs":"",op50:""},g=s({__name:"DurationDisplay",props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(a){const t=a;function i(r){return t.color?r?(r=r*t.factor,r<.5?"text-gray:50":r>1e3?"text-red-400":r>500?"text-orange-400":r>200?"text-yellow-400":""):"text-gray-400":""}const e=u(()=>!t.duration||t.duration<1?["<1","ms"]:t.duration<1e3?[t.duration.toFixed(0),"ms"]:t.duration<1e3*60?[(t.duration/1e3).toFixed(1),"s"]:[(t.duration/1e3/60).toFixed(1),"min"]);return(r,l)=>(d(),f("div",{class:m(i(r.duration))},[p(o(n(e)[0]),1),c("span",x,o(n(e)[1]),1)],2))}});export{g as _};