mower-ng/ui/dist/assets/Icon.js
zhbaor 553b57d30c
All checks were successful
ci/woodpecker/push/check_format Pipeline was successful
移除暗色主题;使用仿Element UI主题
2025-02-16 20:28:20 +08:00

10 lines
1.9 KiB
JavaScript

import{X as y,Z as g,a0 as d,M as l,A as b,G as C,B as u,ai as v,a7 as _,a9 as h,c as a,ac as $,aB as z}from"./_plugin-vue_export-helper.js";function D(e){const{textColorBase:t,opacity1:o,opacity2:s,opacity3:c,opacity4:n,opacity5:i}=e;return{color:t,opacity1Depth:o,opacity2Depth:s,opacity3Depth:c,opacity4Depth:n,opacity5Depth:i}}const x={common:y,self:D},R=g("icon",`
height: 1em;
width: 1em;
line-height: 1em;
text-align: center;
display: inline-block;
position: relative;
fill: currentColor;
transform: translateZ(0);
`,[d("color-transition",{transition:"color .3s var(--n-bezier)"}),d("depth",{color:"var(--n-color)"},[l("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),l("svg",{height:"1em",width:"1em"})]),S=Object.assign(Object.assign({},h.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),P=b({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:S,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:o}=_(e),s=h("Icon","-icon",R,x,e,t),c=a(()=>{const{depth:i}=e,{common:{cubicBezierEaseInOut:r},self:p}=s.value;if(i!==void 0){const{color:m,[`opacity${i}Depth`]:f}=p;return{"--n-bezier":r,"--n-color":m,"--n-opacity":f}}return{"--n-bezier":r,"--n-color":"","--n-opacity":""}}),n=o?$("icon",a(()=>`${e.depth||"d"}`),c,e):void 0;return{mergedClsPrefix:t,mergedStyle:a(()=>{const{size:i,color:r}=e;return{fontSize:z(i),color:r}}),cssVars:o?void 0:c,themeClass:n==null?void 0:n.themeClass,onRender:n==null?void 0:n.onRender}},render(){var e;const{$parent:t,depth:o,mergedClsPrefix:s,component:c,onRender:n,themeClass:i}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&C("icon","don't wrap `n-icon` inside `n-icon`"),n==null||n(),u("i",v(this.$attrs,{role:"img",class:[`${s}-icon`,i,{[`${s}-icon--depth`]:o,[`${s}-icon--color-transition`]:o!==void 0}],style:[this.cssVars,this.mergedStyle]}),c?u(c):this.$slots)}});export{P as N};