提交 881fc5aa 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复 微信小程序端仅插入表情包的情况下,消息发送按钮不可用的问题

上级 a77ab62e
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<view class="editor-box-parent"> <view class="editor-box-parent">
<view class="editor-box"> <view class="editor-box">
<uni-im-sound v-show="soundIsShow" @sendSoundMsg="sendSoundMsg" class="uni-im-sound"></uni-im-sound> <uni-im-sound v-show="soundIsShow" @sendSoundMsg="sendSoundMsg" class="uni-im-sound"></uni-im-sound>
<uni-im-editor v-show="!soundIsShow" @input="oninput" @confirm="confirm" class="editor" ref="editor"></uni-im-editor> <uni-im-editor v-show="!soundIsShow" @input="oninput" @confirm="confirm" @change="updateModelValue" class="editor" ref="editor"></uni-im-editor>
</view> </view>
<slot name="about-msg"></slot> <slot name="about-msg"></slot>
</view> </view>
...@@ -199,6 +199,9 @@ ...@@ -199,6 +199,9 @@
this.$emit('update:modelValue', e.value) this.$emit('update:modelValue', e.value)
this.$emit('input',e) this.$emit('input',e)
}, },
updateModelValue({value}) {
this.$emit('update:modelValue', value)
},
focus() { focus() {
// console.log('focus'); // console.log('focus');
this.$refs.editor.callRmd('$focus') this.$refs.editor.callRmd('$focus')
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<script> <script>
import uniIm from '@/uni_modules/uni-im/sdk/index.js'; import uniIm from '@/uni_modules/uni-im/sdk/index.js';
export default { export default {
emits: ["input", "confirm"], emits: ["input", "confirm", "change"],
data() { data() {
return { return {
callRmdParam: [], callRmdParam: [],
...@@ -43,6 +43,15 @@ ...@@ -43,6 +43,15 @@
default: 140 default: 140
} }
}, },
// #ifdef MP
watch: {
textareaValue(val){
this.$emit("change",{
value:val
})
}
},
// #endif
mounted() { mounted() {
// 与rmd通讯专用 // 与rmd通讯专用
this.callRmd = async (funcName, ...params) => { this.callRmd = async (funcName, ...params) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册