@tencentcloud/ai-desk-customer-wechat
Version:
AI Desk customer UIKit for wechat mini program
3 lines (2 loc) • 913 B
JavaScript
;const s=require("../../../../../common/vendor.js"),l=require("../../../../adapter-vue.js"),i=require("../../../../utils/utils.js"),v=s.defineComponent({__name:"message-timestamp",props:{currTime:{type:Number,default:0},prevTime:{type:Number,default:0}},setup(c){const{toRefs:m,ref:r,watch:f}=l.vue,p=c,{currTime:u,prevTime:o}=m(p),n=r(!1),a=r(""),_=(e,t)=>(n.value=!1,e<=0?"":!t||t<=0||e-t>=600?(n.value=!0,i.calculateTimestamp(e*1e3)):"");return f(()=>[u.value,o.value],(e,t)=>{(e==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(a.value=_(u.value,o.value))},{immediate:!0}),(e,t)=>s.e$1({a:s.unref(n)},s.unref(n)?{b:s.t(s.unref(a))}:{})}}),d=s._export_sfc(v,[["__scopeId","data-v-c003f1a7"]]);wx.createComponent(d);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/ai-desk-customer-uniapp/components/CustomerServiceChat/message-list/message-elements/message-timestamp.js.map