acdr-ui/dist/build/mp-weixin/node-modules/wot-design-uni/components/wd-status-tip/wd-status-tip.js

2 lines
1.8 KiB
JavaScript

"use strict";var e=Object.defineProperty,t=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,o=(t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s;const r=require("../../../../common/vendor.js");if(!Array){r.resolveComponent("wd-img")()}Math;const c=r.defineComponent((d=((e,t)=>{for(var i in t||(t={}))a.call(t,i)&&o(e,i,t[i]);if(s)for(var i of s(t))n.call(t,i)&&o(e,i,t[i]);return e})({},{name:"wd-status-tip",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"}}),p={props:r.statusTipProps,setup(e){const t=e,i=r.computed((()=>{let e="";switch(t.image){case"collect":e="https://img.wot-design-uni.cn/wdu/collect.png";break;case"comment":e="https://img.wot-design-uni.cn/wdu/comment.png";break;case"content":e="https://img.wot-design-uni.cn/wdu/content.png";break;case"halo":e="https://img.wot-design-uni.cn/wdu/halo.png";break;case"message":e="https://img.wot-design-uni.cn/wdu/message.png";break;case"network":e="https://img.wot-design-uni.cn/wdu/network.png";break;case"search":e="https://img.wot-design-uni.cn/wdu/search.png";break;default:e=t.image}return e})),s=r.computed((()=>{let e={};return t.imageSize&&(r.isObj(t.imageSize)?(r.isDef(t.imageSize.height)&&(e.height=r.addUnit(t.imageSize.height)),r.isDef(t.imageSize.width)&&(e.width=r.addUnit(t.imageSize.width))):e={height:r.addUnit(t.imageSize),width:r.addUnit(t.imageSize)}),`${r.objToStyle(e)}`}));return(e,t)=>r.e({a:i.value},i.value?{b:r.p({mode:e.imageMode,src:i.value,"custom-class":"wd-status-tip__image","custom-style":s.value})}:{},{c:e.tip},e.tip?{d:r.t(e.tip)}:{},{e:r.n(`wd-status-tip ${e.customClass}`),f:r.s(e.customStyle)})}},t(d,i(p))));var d,p;const g=r._export_sfc(c,[["__scopeId","data-v-90e4bdec"]]);wx.createComponent(g);