Пожарная
This commit is contained in:
1 parent
73f256ba17
commit
9b818eaf22
92 files changed
+130
-121
No files matched your search
+1
@@ -0,0 +1 @@
|
||||
import{p as R,b9 as z,ac as N,be as Q,bG as Y,an as M,ad as j,ae as D,aY as q,af as G,aj as K,c as d,ai as W,bz as X,s as O,h as Z,ah as F,G as t,a1 as L,J as p,I as ee,H as J,_ as ae,D as P,E as A,F as k,N as I,a0 as te,a2 as le,M as U,V as ne,a6 as oe,P as ie,a5 as se,Q as re,ap as ue,ar as ce,as as de,au as me,al as ge,at as ve,av as fe,ax as be,ag as he,aB as ye,a4 as xe,bw as w,b as B}from"./index-e89626a9.js";import{a as Ve}from"./index-f6d4d7c7.js";const _e=R({name:String,itemAriaLabel:{type:String,default:"$vuetify.rating.ariaLabel.item"},activeColor:String,color:String,clearable:Boolean,disabled:Boolean,emptyIcon:{type:z,default:"$ratingEmpty"},fullIcon:{type:z,default:"$ratingFull"},halfIncrements:Boolean,hover:Boolean,length:{type:[Number,String],default:5},readonly:Boolean,modelValue:{type:[Number,String],default:0},itemLabels:Array,itemLabelPosition:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},ripple:Boolean,...N(),...Q(),...Y(),...M(),...j()},"VRating"),ke=D()({name:"VRating",props:_e(),emits:{"update:modelValue":e=>!0},setup(e,m){let{slots:a}=m;const{t:s}=q(),{themeClasses:v}=G(e),V=K(e,"modelValue"),r=d(()=>W(parseFloat(V.value),0,+e.length)),u=d(()=>X(Number(e.length),1)),h=d(()=>u.value.flatMap(l=>e.halfIncrements?[l-.5,l]:[l])),y=O(-1),f=d(()=>h.value.map(l=>{const o=e.hover&&y.value>-1,n=r.value>=l,i=y.value>=l,c=(o?i:n)?e.fullIcon:e.emptyIcon,C=e.activeColor??e.color,T=n||i?C:e.color;return{isFilled:n,isHovered:i,icon:c,color:T}})),_=d(()=>[0,...h.value].map(l=>{function o(){y.value=l}function n(){y.value=-1}function i(){e.disabled||e.readonly||(V.value=r.value===l&&e.clearable?0:l)}return{onMouseenter:e.hover?o:void 0,onMouseleave:e.hover?n:void 0,onClick:i}})),x=d(()=>e.name??`v-rating-${Z()}`);function b(l){var E,$;let{value:o,index:n,showStar:i=!0}=l;const{onMouseenter:g,onMouseleave:c,onClick:C}=_.value[n+1],T=`${x.value}-${String(o).replace(".","-")}`,H={color:(E=f.value[n])==null?void 0:E.color,density:e.density,disabled:e.disabled,icon:($=f.value[n])==null?void 0:$.icon,ripple:e.ripple,size:e.size,variant:"plain"};return t(L,null,[t("label",{for:T,class:{"v-rating__item--half":e.halfIncrements&&o%1>0,"v-rating__item--full":e.halfIncrements&&o%1===0},onMouseenter:g,onMouseleave:c,onClick:C},[t("span",{class:"v-rating__hidden"},[s(e.itemAriaLabel,o,e.length)]),i?a.item?a.item({...f.value[n],props:H,value:o,index:n,rating:r.value}):t(p,ee({"aria-label":s(e.itemAriaLabel,o,e.length)},H),null):void 0]),t("input",{class:"v-rating__hidden",name:x.value,id:T,type:"radio",value:o,checked:r.value===o,tabindex:-1,readonly:e.readonly,disabled:e.disabled},null)])}function S(l){return a["item-label"]?a["item-label"](l):l.label?t("span",null,[l.label]):t("span",null,[J(" ")])}return F(()=>{var o;const l=!!((o=e.itemLabels)!=null&&o.length)||a["item-label"];return t(e.tag,{class:["v-rating",{"v-rating--hover":e.hover,"v-rating--readonly":e.readonly},v.value,e.class],style:e.style},{default:()=>[t(b,{value:0,index:-1,showStar:!1},null),u.value.map((n,i)=>{var g,c;return t("div",{class:"v-rating__wrapper"},[l&&e.itemLabelPosition==="top"?S({value:n,index:i,label:(g=e.itemLabels)==null?void 0:g[i]}):void 0,t("div",{class:"v-rating__item"},[e.halfIncrements?t(L,null,[t(b,{value:n-.5,index:i*2},null),t(b,{value:n,index:i*2+1},null)]):t(b,{value:n,index:i},null)]),l&&e.itemLabelPosition==="bottom"?S({value:n,index:i,label:(c=e.itemLabels)==null?void 0:c[i]}):void 0])})]})}),{}}}),Se={props:{criteria:{type:Object,default:{}},rating:{type:Object,default:{}},how:{type:String,default:""}},setup(e,{emit:m}){return{message:d({get:()=>e.rating,set:s=>m("update:rating",s)})}}};function Te(e,m,a,s,v,V){return P(),A(U,{class:"h-100"},{default:k(()=>[t(I,{class:"d-flex flex-column align-self-center"},{default:k(()=>[(P(!0),te(L,null,le(a.criteria,(r,u)=>(P(),A(U,{key:u,class:"align-center"},{default:k(()=>[t(I,{class:"flex-grow-0"}),t(I,{class:"",lg:"5"},{default:k(()=>[t(ne,{size:"large",color:r.color,icon:r.ico},null,8,["color","icon"]),J(" "+oe(r.name),1)]),_:2},1024),t(I,{lg:"6"},{default:k(()=>[t(ke,{modelValue:s.message[u].rating,"onUpdate:modelValue":h=>s.message[u].rating=h,hover:typeof u=="number","half-increments":"",readonly:a.how=="",color:"yellow",density:a.how==""?"compact":"comfortable"},null,8,["modelValue","onUpdate:modelValue","hover","readonly","density"])]),_:2},1024),ie(t(se,null,null,512),[[re,a.how=="modal"]])]),_:2},1024))),128))]),_:1})]),_:1})}const Re=ae(Se,[["render",Te]]);const Ie=R({text:String,...N(),...M()},"VToolbarTitle"),Be=D()({name:"VToolbarTitle",props:Ie(),setup(e,m){let{slots:a}=m;return F(()=>{const s=!!(a.default||a.text||e.text);return t(e.tag,{class:["v-toolbar-title",e.class],style:e.style},{default:()=>{var v;return[s&&t("div",{class:"v-toolbar-title__placeholder"},[a.text?a.text():e.text,(v=a.default)==null?void 0:v.call(a)])]}})}),{}}}),Ce=[null,"prominent","default","comfortable","compact"],Pe=R({absolute:Boolean,collapse:Boolean,color:Line truncated
|
||||
Reference in new issue
Block a user