Compare commits
2 Commits
72674f4d77
...
8ec9c844f0
| Author | SHA1 | Date |
|---|---|---|
|
|
8ec9c844f0 | |
|
|
cffb2c29fb |
|
|
@ -87,7 +87,7 @@
|
|||
@click="sendMessage">
|
||||
</image>
|
||||
<image v-if="phone == 'oppo'" class="right-icon"
|
||||
:src="`/static/image/phone-message/oppo/${isSend ? 'send' : 'unsend'}.png`"
|
||||
:src="`/static/image/phone-message/oppo/${isSend ? 'send' : 'unSend'}.png`"
|
||||
@click="sendMessage">
|
||||
</image>
|
||||
<image v-if="phone == 'huawei'" class="right-icon"
|
||||
|
|
@ -108,8 +108,16 @@
|
|||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, onMounted, computed, toRefs } from 'vue'
|
||||
import { dateUtil, util } from '@/utils/common.js';
|
||||
import {
|
||||
reactive,
|
||||
onMounted,
|
||||
computed,
|
||||
toRefs
|
||||
} from 'vue'
|
||||
import {
|
||||
dateUtil,
|
||||
util
|
||||
} from '@/utils/common.js';
|
||||
const props = defineProps({
|
||||
// 手机品牌
|
||||
phone: {
|
||||
|
|
@ -150,7 +158,12 @@ const data = reactive({
|
|||
lastClickTime: 0
|
||||
})
|
||||
|
||||
let { isSend, content, simIndex, scrollTop } = toRefs(data)
|
||||
let {
|
||||
isSend,
|
||||
content,
|
||||
simIndex,
|
||||
scrollTop
|
||||
} = toRefs(data)
|
||||
|
||||
const emit = defineEmits(['send', 'dblclick-left', 'dblclick-right', 'title-click'])
|
||||
const onInput = (e) => {
|
||||
|
|
@ -287,7 +300,9 @@ const showInfo = computed(() => {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return { placeholder }
|
||||
return {
|
||||
placeholder
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
@ -312,7 +327,9 @@ const chooseImage = () => {
|
|||
let h = image.height;
|
||||
|
||||
// 根据 EXIF 方向修正实际视觉宽高
|
||||
if (image.orientation && ['left', 'right', 'left-mirrored', 'right-mirrored'].includes(image.orientation)) {
|
||||
if (image.orientation && ['left', 'right', 'left-mirrored',
|
||||
'right-mirrored'
|
||||
].includes(image.orientation)) {
|
||||
w = image.height;
|
||||
h = image.width;
|
||||
}
|
||||
|
|
@ -323,7 +340,8 @@ const chooseImage = () => {
|
|||
|
||||
const date = dateUtil.now("YYYY-MM-DD HH:mm")
|
||||
// 封装成HTML的img标签作为消息内容
|
||||
const content = `<img src="${finalPath}" style="width: ${width}; height: ${height}; border-radius: 16rpx; display: block;" />`;
|
||||
const content =
|
||||
`<img src="${finalPath}" style="width: ${width}; height: ${height}; border-radius: 16rpx; display: block;" />`;
|
||||
const params = {
|
||||
content: content,
|
||||
imgUrl: finalPath,
|
||||
|
|
@ -339,9 +357,11 @@ const chooseImage = () => {
|
|||
// 延迟拉动到底部
|
||||
setTimeout(() => {
|
||||
data.scrollTop = 99999 + Math.random();
|
||||
uni.createSelectorQuery().select('.bottom-box').boundingClientRect(rect => {
|
||||
uni.createSelectorQuery().select('.bottom-box')
|
||||
.boundingClientRect(rect => {
|
||||
if (rect) {
|
||||
data.bottomBoxHeight = rect.height;
|
||||
data.bottomBoxHeight = rect
|
||||
.height;
|
||||
}
|
||||
}).exec();
|
||||
}, 100);
|
||||
|
|
@ -398,9 +418,6 @@ onMounted(() => {
|
|||
}, 300);
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@import '@/common/main.css';
|
||||
|
|
|
|||
Loading…
Reference in New Issue