niucloud-admin/niucloud/public/wap/assets/u-empty.d2f2d7cd.js
全栈小学生 af883ac9e1 update
2024-08-06 17:54:17 +08:00

2 lines
2.3 KiB
JavaScript

import{_ as t}from"./u-icon.29403ccf.js";import{m as e,p as s,q as i,t as o,x as a,y as r,g as n,h as m,o as l,c as p,w as d,n as y,b as u,E as c,F as f,D as h,f as g,_ as S,G as x,i as _}from"./index-3788e709.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";const z=w({name:"u-empty",mixins:[s,i,{props:{icon:{type:String,default:()=>e.empty.icon},text:{type:String,default:()=>e.empty.text},textColor:{type:String,default:()=>e.empty.textColor},textSize:{type:[String,Number],default:()=>e.empty.textSize},iconColor:{type:String,default:()=>e.empty.iconColor},iconSize:{type:[String,Number],default:()=>e.empty.iconSize},mode:{type:String,default:()=>e.empty.mode},width:{type:[String,Number],default:()=>e.empty.width},height:{type:[String,Number],default:()=>e.empty.height},show:{type:Boolean,default:()=>e.empty.show},marginTop:{type:[String,Number],default:()=>e.empty.marginTop}}}],data:()=>({icons:{car:"购物车为空",page:"页面不存在",search:"没有搜索结果",address:"没有收货地址",wifi:"没有WiFi",order:"订单为空",coupon:"没有优惠券",favor:"暂无收藏",permission:"无权限",history:"无历史记录",news:"无新闻列表",message:"消息列表为空",list:"列表为空",data:"数据为空",comment:"暂无评论"}}),computed:{emptyStyle(){const t={};return t.marginTop=o(this.marginTop),a(r(this.customStyle),t)},textStyle(){const t={};return t.color=this.textColor,t.fontSize=o(this.textSize),t},isSrc(){return this.icon.indexOf("/")>=0}},methods:{addUnit:o}},[["render",function(e,s,i,o,a,r){const w=n(m("u-icon"),t),z=S,b=x,v=_;return e.show?(l(),p(v,{key:0,class:"u-empty",style:y([r.emptyStyle])},{default:d((()=>[r.isSrc?(l(),p(z,{key:1,style:y({width:r.addUnit(e.width),height:r.addUnit(e.height)}),src:e.icon,mode:"widthFix"},null,8,["style","src"])):(l(),p(w,{key:0,name:"message"===e.mode?"chat":`empty-${e.mode}`,size:e.iconSize,color:e.iconColor,"margin-top":"14"},null,8,["name","size","color"])),u(b,{class:"u-empty__text",style:y([r.textStyle])},{default:d((()=>[c(f(e.text?e.text:a.icons[e.mode]),1)])),_:1},8,["style"]),e.$slots.default||e.$slots.$default?(l(),p(v,{key:2,class:"u-empty__wrap"},{default:d((()=>[h(e.$slots,"default",{},void 0,!0)])),_:3})):g("v-if",!0)])),_:3},8,["style"])):g("v-if",!0)}],["__scopeId","data-v-394143d6"]]);export{z as _};