群聊的基础页面
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
<template>
|
||||
<view class="sent--text">
|
||||
<input
|
||||
class="input"
|
||||
type="text"
|
||||
@focus="focus"
|
||||
@blur="blur"
|
||||
v-model="inputTxt"
|
||||
confirm-type="send"
|
||||
@confirm="sent"
|
||||
cursor-spacing="10"
|
||||
/>
|
||||
<input class="input" type="text" @focus="focus" @blur="blur" v-model="inputTxt" confirm-type="send"
|
||||
@confirm="sent" cursor-spacing="10" />
|
||||
<!-- <button class="button" size="mini" :disabled="disabled" @click="sent">发送</button> -->
|
||||
</view>
|
||||
</template>
|
||||
@@ -36,6 +28,9 @@
|
||||
computed: {
|
||||
disabled() {
|
||||
return this.inputTxt.length === 0
|
||||
},
|
||||
user() {
|
||||
return this.$store.getters.sender
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -55,18 +50,18 @@
|
||||
sent() {
|
||||
if (!this.disabled) {
|
||||
RongIMLib.clearTextMessageDraft(this.conversationType, this.targetId)
|
||||
im.sentText(this.conversationType, this.targetId, this.inputTxt, () => {
|
||||
im.sentText(this.conversationType, this.targetId, this.inputTxt, this.user, () => {
|
||||
this.$emit('success')
|
||||
this.inputTxt = ''
|
||||
})
|
||||
}
|
||||
},
|
||||
focus() {
|
||||
this.$emit('focus')
|
||||
},
|
||||
blur() {
|
||||
this.$emit('blur')
|
||||
}
|
||||
},
|
||||
focus() {
|
||||
this.$emit('focus')
|
||||
},
|
||||
blur() {
|
||||
this.$emit('blur')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -75,30 +70,15 @@
|
||||
.sent--text {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
||||
.input {
|
||||
background: #F3F6FB;
|
||||
height: 70rpx;
|
||||
width: 500rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
// .button {
|
||||
// border: none;
|
||||
// background: #34CE98;
|
||||
// color: white;
|
||||
// width: 120rpx;
|
||||
// line-height: 70rpx;
|
||||
// text-align: center;
|
||||
// border-radius: 10rpx;
|
||||
// font-size: 30rpx;
|
||||
// font-weight: bold;
|
||||
// }
|
||||
// .button[disabled] {
|
||||
// background-color: #555555;
|
||||
// }
|
||||
justify-content: space-between;
|
||||
|
||||
.input {
|
||||
background: #F3F6FB;
|
||||
height: 70rpx;
|
||||
width: 500rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user