You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.3 KiB
1 lines
2.3 KiB
import{_ as t}from"./u-icon.d58f766c.js";import{a4 as e,a5 as s,a6 as i,a7 as o,bf as a,a8 as r,g as n,i as m,o as l,c as p,w as d,n as y,b as u,z as c,A as f,_ as h,f as S,C as g,E as x,j as _}from"./index-ed377420.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=g,b=x,C=_;return e.show?(l(),p(C,{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(C,{key:2,class:"u-empty__wrap"},{default:d((()=>[h(e.$slots,"default",{},void 0,!0)])),_:3})):S("v-if",!0)])),_:3},8,["style"])):S("v-if",!0)}],["__scopeId","data-v-394143d6"]]);export{z as _};
|
|
|