升级package, 以及更新声明文件

This commit is contained in:
zhengw
2026-01-09 16:33:18 +08:00
parent 0c4b2a886c
commit cf461d33f9
238 changed files with 46252 additions and 5857 deletions

View File

@@ -0,0 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import props from"./props";import config from"../common/config";const{prefix:prefix}=config,name=`${prefix}-chat-message`;let ChatMessage=class extends SuperComponent{constructor(){super(...arguments),this.options={multipleSlots:!0},this.properties=props,this.data={classPrefix:name,article:"",showAvatar:null,showName:null,showDateTime:null,contentClasses:[],chatItemClass:[]},this.observers={avatar(){this.setShowAvatar()},name(){this.setShowName()},datetime(){this.setShowDateTime()},classPrefix(){this.setContentClasses()},"classPrefix, variant, placement, showDateTime"(){this.setChatItemClass()}},this.methods={handleLongPress(t){this.triggerEvent("longpress",{e:t,id:this.data.chatId})},setShowAvatar(){var t;this.setData({showAvatar:(null===(t=this.properties)||void 0===t?void 0:t.avatar)||""})},setShowName(){var t;this.setData({showName:(null===(t=this.properties)||void 0===t?void 0:t.name)||""})},setShowDateTime(){var t;this.setData({showDateTime:(null===(t=this.properties)||void 0===t?void 0:t.datetime)||""})},setContentClasses(){this.setData({contentClasses:[`${this.data.classPrefix}__content`]})},setChatItemClass(){const{classPrefix:t,showDateTime:e}=this.data,{variant:s,role:a,placement:i}=this.properties,o=[`${t}`,`${t}--${s}`,a,i];e&&o.push(`${t}__header`),this.setData({chatItemClass:o})}},this.lifetimes={created(){this.data.handleLongPress=this.handleLongPress.bind(this)},attached(){this.setShowAvatar(),this.setShowName(),this.setShowDateTime(),this.setContentClasses(),this.setChatItemClass()},detached(){}}}};ChatMessage=__decorate([wxComponent()],ChatMessage);export default ChatMessage;