2025-11-07 09:56:20 +08:00
|
|
|
<template>
|
2025-11-25 05:36:02 +08:00
|
|
|
<view class="chat_action_bar">
|
2025-12-02 03:05:52 +08:00
|
|
|
<view class="fun-box u-border-top show-fun-box" v-if="isEmoji">
|
|
|
|
|
<swiper class="emoji-swiper" :indicator-dots="true" :duration="50" :circular="true">
|
|
|
|
|
<swiper-item v-for="(page,index1) in Math.ceil(emojiList.length/pagesize)" :key="index1">
|
|
|
|
|
<view @tap="emojiClick(emojiList[pagesize*(page-1)+n])" v-for="(n,index2) in pagesize" :key="index2">
|
|
|
|
|
{{emojiList[pagesize*(page-1)+n]}}
|
|
|
|
|
</view>
|
|
|
|
|
</swiper-item>
|
|
|
|
|
</swiper>
|
|
|
|
|
<view style="padding:0rpx 20rpx;position: absolute;bottom: 1rpx;right: 10rpx;
|
2025-12-08 18:10:51 +08:00
|
|
|
width: 250rpx;height: 150rpx;z-index: 1000;opacity: 0.9;"
|
|
|
|
|
class="u-flex u-row-right u-col-center">
|
2025-12-02 03:05:52 +08:00
|
|
|
<view class="u-flex u-row-center u-col-center"
|
|
|
|
|
style="border: 1px solid #f1f1f1;border-radius: 10rpx; background-color: #82848a;width: 100rpx;padding: 15rpx 20rpx;margin-right: 8rpx;">
|
|
|
|
|
<view @click="delSendStr()" @longpress="clearSendStr()">
|
|
|
|
|
<u-icon name="backspace" size="46" color="#ffffff"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view>
|
|
|
|
|
<u-button @click="$noClicks(sendText)" type="success" :custom-style="{padding:'20rpx'}">发送
|
|
|
|
|
</u-button>
|
|
|
|
|
</view> -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-row class="action_row" v-else>
|
2025-11-25 05:36:02 +08:00
|
|
|
<u-col v-for="item in actionList" :key="item.idx" @click="actionClick(item)" span="3">
|
|
|
|
|
<view class="action_item">
|
2025-12-08 18:10:51 +08:00
|
|
|
<image class="img" :src="item.icon" alt="" srcset="" />
|
2025-11-25 05:36:02 +08:00
|
|
|
<text class="action_item_title">{{ item.title }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
2025-11-07 09:56:20 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-11-25 05:36:02 +08:00
|
|
|
import {ChatingFooterActionTypes,} from "@/constant";
|
2025-12-02 03:05:52 +08:00
|
|
|
import emojis from "@/common/emojis.js"
|
2025-12-08 18:10:51 +08:00
|
|
|
import chating_action_image from "@/static/images/chating_action_image.png";
|
|
|
|
|
import chating_action_camera from "@/static/images/chating_action_camera.png";
|
|
|
|
|
import chating_action_call from "@/static/images/chating_action_call.png";
|
|
|
|
|
import chating_action_location from "@/static/images/chating_action_location.png";
|
2025-11-07 09:56:20 +08:00
|
|
|
|
2025-11-25 05:36:02 +08:00
|
|
|
export default {
|
2025-12-02 03:05:52 +08:00
|
|
|
props:{
|
|
|
|
|
isEmoji:{
|
|
|
|
|
type:Boolean,
|
|
|
|
|
default:false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch:{
|
|
|
|
|
isEmoji(v){
|
|
|
|
|
console.log(v);
|
|
|
|
|
this.emojiMode = v;
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-11-25 05:36:02 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
2025-12-02 03:05:52 +08:00
|
|
|
pagesize:24,
|
|
|
|
|
emojiList:emojis,
|
2025-11-25 05:36:02 +08:00
|
|
|
actionList: [
|
|
|
|
|
{
|
|
|
|
|
idx: 0,
|
|
|
|
|
type: ChatingFooterActionTypes.Album,
|
|
|
|
|
title: "照片",
|
2025-12-08 18:10:51 +08:00
|
|
|
icon: chating_action_image,
|
2025-11-25 05:36:02 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
idx: 1,
|
|
|
|
|
type: ChatingFooterActionTypes.Camera,
|
|
|
|
|
title: "拍摄",
|
2025-12-08 18:10:51 +08:00
|
|
|
icon: chating_action_camera,
|
2025-11-25 05:36:02 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
idx: 2,
|
|
|
|
|
type: ChatingFooterActionTypes.Video,
|
|
|
|
|
title: "视频通话",
|
2025-12-08 18:10:51 +08:00
|
|
|
icon: chating_action_call,
|
2025-11-25 05:36:02 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
idx: 3,
|
|
|
|
|
type: ChatingFooterActionTypes.Location,
|
|
|
|
|
title: "位置",
|
2025-12-08 18:10:51 +08:00
|
|
|
icon: chating_action_location,
|
2025-11-25 05:36:02 +08:00
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// idx: 0,
|
|
|
|
|
// type: ChatingFooterActionTypes.Album,
|
|
|
|
|
// title: "红包",
|
2025-12-08 18:10:51 +08:00
|
|
|
// icon: chating_action_image,
|
2025-11-25 05:36:02 +08:00
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// idx: 0,
|
|
|
|
|
// type: ChatingFooterActionTypes.Album,
|
|
|
|
|
// title: "转账",
|
2025-12-08 18:10:51 +08:00
|
|
|
// icon: chating_action_image,
|
2025-11-25 05:36:02 +08:00
|
|
|
// }
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2025-12-02 03:05:52 +08:00
|
|
|
delSendStr(){},
|
|
|
|
|
clearSendStr(){},
|
|
|
|
|
async emojiClick(emoji){
|
|
|
|
|
this.$emit("prepareMediaMessage", 'emoji',emoji);
|
|
|
|
|
},
|
2025-11-25 05:36:02 +08:00
|
|
|
async actionClick(action) {
|
|
|
|
|
switch (action.type) {
|
|
|
|
|
case ChatingFooterActionTypes.Video:
|
|
|
|
|
this.$emit("prepareMediaMessage", action.type);
|
|
|
|
|
break;
|
|
|
|
|
case ChatingFooterActionTypes.Album:
|
|
|
|
|
this.$emit("prepareMediaMessage", action.type);
|
|
|
|
|
break;
|
|
|
|
|
case ChatingFooterActionTypes.Camera:
|
|
|
|
|
this.$emit("prepareMediaMessage", action.type);
|
|
|
|
|
break;
|
|
|
|
|
case ChatingFooterActionTypes.Location:
|
|
|
|
|
this.$emit("prepareMediaMessage", action.type);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
2025-11-07 09:56:20 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-11-25 05:36:02 +08:00
|
|
|
.chat_action_bar {
|
|
|
|
|
position: relative;
|
2025-12-02 03:05:52 +08:00
|
|
|
background: #ececec;
|
2025-11-25 05:36:02 +08:00
|
|
|
padding: 24rpx 36rpx;
|
2025-12-08 18:10:51 +08:00
|
|
|
|
2025-11-25 05:36:02 +08:00
|
|
|
.action_row {
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
margin-bottom: 24rpx;
|
|
|
|
|
}
|
2025-11-07 09:56:20 +08:00
|
|
|
|
2025-11-25 05:36:02 +08:00
|
|
|
.action_item {
|
|
|
|
|
@include centerBox();
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
margin-top: 24rpx;
|
2025-11-07 09:56:20 +08:00
|
|
|
|
2025-12-08 18:10:51 +08:00
|
|
|
.img {
|
2025-11-25 05:36:02 +08:00
|
|
|
width: 96rpx;
|
|
|
|
|
height: 96rpx;
|
|
|
|
|
}
|
2025-11-07 09:56:20 +08:00
|
|
|
|
2025-11-25 05:36:02 +08:00
|
|
|
&_title {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: #999;
|
|
|
|
|
margin-top: 6rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-02 03:05:52 +08:00
|
|
|
.emoji_row{
|
|
|
|
|
.emoji{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-08 18:10:51 +08:00
|
|
|
|
2025-12-02 03:05:52 +08:00
|
|
|
.emoji-swiper {
|
|
|
|
|
height: 400rpx;
|
|
|
|
|
|
|
|
|
|
swiper-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-content: flex-start;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
|
|
|
|
view {
|
|
|
|
|
width: 12%;
|
|
|
|
|
height: 16vw;
|
|
|
|
|
font-size: 48rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-11-25 05:36:02 +08:00
|
|
|
}
|
|
|
|
|
</style>
|