提交 4e8520f5 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复 web-pc 的消息菜单扩展点,传入的会话数据找不到的问题

上级 d7eabc0e
...@@ -95,13 +95,27 @@ ...@@ -95,13 +95,27 @@
], ],
emojiCodes, emojiCodes,
chatInputBoxHeight:'auto', chatInputBoxHeight:'auto',
extToolBar: []
} }
}, },
computed: { computed: {
canSend() { canSend() {
return typeof this.modelValue != "string" || this.modelValue.trim().length > 0; return typeof this.modelValue != "string" || this.modelValue.trim().length > 0;
},
// #ifdef H5
extToolBar(){
// 调用扩展点,扩展程序可以在消息输入框新增一个工具类的项
const currentConversationId = uniIm.currentConversationId
return uniIm.extensions
.invokeExts("input-msg-tool-bar",uniIm.conversation.getCached(currentConversationId))
.filter((result) => result && result.component)
.map((result) => {
return {
component: markRaw(result.component),
props: result.props||{}
};
});
} }
// #endif
}, },
props: { props: {
modelValue: { modelValue: {
...@@ -118,18 +132,7 @@ ...@@ -118,18 +132,7 @@
} }
}, },
mounted() { mounted() {
// 调用扩展点,扩展程序可以在消息输入框新增一个工具类的项
this.extToolBar = uniIm.extensions
.invokeExts("input-msg-tool-bar",this.conversation)
.filter((result) => result && result.component)
.map((result) => {
return {
component: markRaw(result.component),
props: result.props||{}
};
});
currentModelValue = this.modelValue; currentModelValue = this.modelValue;
// #ifdef H5 // #ifdef H5
// pc宽屏支持拖动改变输入框高度 // pc宽屏支持拖动改变输入框高度
if(uniIm.isWidescreen){ if(uniIm.isWidescreen){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册