2025最新版研发uni-app+vue3仿微信聊天app应用Uniapp-Wechat。
uni-vue3-wechat:原创基于
uniapp+vue3+vite5+pinia2+uv-ui搭建仿微信app界面聊天系统。包含聊天、通讯录、我的三大模块,实现消息+emo混排、仿微信长按语音效果、图片/视频预览、红包/朋友圈等功能。支持运行到h5+小程序端+app端。



使用技术
- 编辑器:HbuilderX 4.75
- 技术框架:uni-app+vue3+pinia2+vite5
- 状态管理:pinia2
- 组件库:uni-ui+uv-ui(uniapp+vue3组件库)
- 弹框组件:uv3-popup(自定义uniapp+vue3多端弹框组件)
- 自定义组件:uv3-navbar导航栏+uv3-tabbar菜单栏
- 缓存技术:pinia-plugin-unistorage
- 支持编译:h5+小程序+app端



uniapp-wechat聊天项目已经更新到我的原创作品集。
uni-app+vue3+pinia2+uv-ui跨三端仿微信app聊天





项目框架结构


uni-vue3-wechat项目使用uniapp+vue3搭建项目模板,采用vue3 setup语法糖编码。

支持编译到H5端PC页面以750px宽度显示布局结构。


布局结构模板

如上图:整体分为顶部导航+主内容区+底部操作栏三大部分。

<!-- #ifdef MP-WEIXIN -->
<script>
export default {
/**
* 解决小程序class、id透传问题
* manifest.json中配置mergeVirtualHostAttributes: true, 在微信小程序平台不生效,组件外部传入的class没有挂到组件根节点上
* https://github.com/dcloudio/uni-ui/issues/753
*/
options: { virtualHost: true }
}
</script>
<!-- #endif -->
<script setup>
const props = defineProps({
// 是否显示自定义tabbar
showTabBar: { type: [Boolean, String], default: false },
})
</script>
<template>
<view class="uv3__container flexbox flex-col flex1">
<!-- 顶部插槽 -->
<slot name="header" />
<!-- 内容区 -->
<view class="uv3__scrollview flex1">
<slot />
</view>
<!-- 底部插槽 -->
<slot name="footer" />
<!-- tabbar栏 -->
<uv3-tabbar v-if="showTabBar" hideTabBar fixed />
</view>
</template>

uniapp+vue3自定义导航条



uniapp+vue3聊天模块

自定义加强版编辑输入框。支持高亮边框、单行(input)+多行(textarea)输入模式,自定义前缀/后缀图标。


<view class="uv3__chattoolbar" :style="{'padding-bottom': fixPaddingBottom}">
<!-- 输入框 -->
<view class="uv3__chattoolbar-editor flexbox">
<view class="btn" @click="handleVoice"><text class="uv3-icon" :class="voiceBtnEnable ? 'uv3-icon-voice' : 'uv3-icon-keyboard'"></text></view>
<view class="editor flex1">
<template v-if="voiceBtnEnable">
<uv3-input
v-model="editorValue"
type="textarea"
:autosize="{maxRows: 6}"
:autofocus="autofocus"
:cursor="editorLastCursor"
clearable
style="width: 100%;"
@input="handleEditorInput"
@focus="handleEditorFocus"
@blur="handleEditorBlur"
/>
</template>
<template v-else>
<view class="uv3__voice-handle flexbox" @touchstart.prevent="handleTouchStart" @touchmove="handleTouchUpdate" @touchend="handleTouchEnd">{{voiceTypeMap[voiceType]}}</view>
</template>
</view>
<view class="btn" @click="handleEmojPlusView(0)" @mousedown.prevent><text class="uv3-icon uv3-icon-face"></text></view>
<view class="btn" @click="handleEmojPlusView(1)"><text class="uv3-icon uv3-icon-plus"></text></view>
<view class="btn" @click="handleSend" @mousedown.prevent><view class="send flexbox"><uni-icons type="arrow-up" color="#fff" size="16"></uni-icons></view></view>
</view>
<!-- 操作栏 -->
<view v-show="showToolbar" class="uv3__chattoolbar-operate">
<!-- 表情 -->
<view v-show="toolbarIndex == 0" class="uv3__chattoolbar-emotion flexbox flex-col">
<view class="uv3__emotion-tabs flexbox flex-alignc">
<view v-for="(item, index) in emojList" :key="index" class="item" :class="{'on': item.selected}" @click="handleEmojTab(index)">
<text v-if="item.type=='emoj'" class="emoj uv3-icon uv3-icon-face"></text>
<image v-else :src="item.pathLabel" />
</view>
</view>
<view v-for="(item, index) in emojList" :key="index" class="uv3__emotion-cells flex1" :class="{'active': item.selected}">
<view class="flexbox" :class="item.type == 'emoj' ? 'emojwrap' : 'gifwrap'">
<view v-for="(emoj, key) in item.nodes" :key="key" class="cells flexbox">
<view class="item">
<text v-if="item.type=='emoj'" class="emoj" @click="handleEmojClick(emoj)">{{emoj}}</text>
<image v-else :src="emoj" class="gif" @click="handleGifClick(emoj)" />
</view>
</view>
</view>
</view>
</view>
<!-- 操作栏 -->
<view v-show="toolbarIndex == 1" class="uv3__chattoolbar-pluschoose flexbox">
<view v-for="(item, index) in chooseList" :key="index" class="uv3__plusbtns-cells" @click="handlePlusAction(item)">
<view class="icon flexbox"><image :src="item.icon" /></view>
<view class="label">{{item.label}}</view>
</view>
</view>
</view>
</view>
基于flutter3.32+window_manager+get仿macOS/wins桌面os系统
最新flutter3.27+get+bitsdojo_window电脑版仿微信聊天EXE
基于uni-app+vue3+pinia2+uv-ui仿抖音app短视频+聊天+直播商城系统
基于uni-app+vue3+deepseek+uv-ui仿DeepSeek流式AI聊天模板
基于electron35+vue3.5+deepseek+arco实战桌面端AI流式聊天
基于Vite6+Deepseek+ArcoDesign+Markdown构建网页版AI流式
flutter3.27实战抖音app商城|flutter3.x+getX仿抖音短视频+直播+聊天app
自研tauri2.0-vue3-os桌面端仿macos系统|Vite6+Tauri2.x+Arco客户端os
tauri2-vue3-admin客户端后台Exe系统|vite5+tauri2+pinia2桌面后台
Electron-ViteChat桌面端聊天室|electron31+vite5+pinia2仿微信客户端EXE

5535

被折叠的 条评论
为什么被折叠?



