Files
ClassContent/项目合集/聊天室/app版本/问题记录.txt
2024-09-27 02:06:13 +08:00

123 lines
3.1 KiB
Plaintext
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1解决软键盘弹出顶走navbar
https://blog.csdn.net/m0_46978096/article/details/107175858
2uni-nav-bar 自定义导航栏
https://ext.dcloud.net.cn/plugin?id=52
3popup 弹出层
https://ext.dcloud.net.cn/plugin?id=329
4uniapp 网页地址
https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons
5uniapp socket 插件
https://ext.dcloud.net.cn/plugin?id=1461
6uniapp 使用iconfont字体图标
https://www.cnblogs.com/xguoz/p/10245641.html
7夜神模拟器安装配置
https://ask.dcloud.net.cn/article/1024
8vue class style 样式绑定
https://cn.vuejs.org/v2/guide/class-and-style.html
9设置弹出的软键盘 & 输入框底部边距
class="uni-input" cursor-spacing="10"
<input
class="uni-input"
type="text"
v-model="UserMessage"
:cursor="cursorPosition"
confirm-type="send"
@confirm="SendMessage('text')"
@touchend.stop="touchendPrevent"
@focus="FocusEvent"
@blur="BlurEvent"
:cursor-spacing="10"
placeholder="请输入内容"
/>
10: socket.io 相关
官网https://socket.io
import { createServer } from "http";
import { Server } from "socket.io";
const httpServer = createServer();
const io = new Server(httpServer);
io.on("connection", (socket) => {
});
httpServer.listen(3000);
事件大全https://socket.io/docs/v4/emit-cheatsheet/
io.on("connection", (socket) => {
// basic emit
socket.emit(/* ... */);
// to all clients in the current namespace except the sender
socket.broadcast.emit(/* ... */);
// to all clients in room1 except the sender
socket.to("room1").emit(/* ... */);
// to all clients in room1 and/or room2 except the sender
socket.to(["room1", "room2"]).emit(/* ... */);
// to all clients in room1
io.in("room1").emit(/* ... */);
// to all clients in room1 and/or room2 except those in room3
io.to(["room1", "room2"]).except("room3").emit(/* ... */);
// to all clients in namespace "myNamespace"
io.of("myNamespace").emit(/* ... */);
// to all clients in room1 in namespace "myNamespace"
io.of("myNamespace").to("room1").emit(/* ... */);
// to individual socketid (private message)
io.to(socketId).emit(/* ... */);
// to all clients on this node (when using multiple nodes)
io.local.emit(/* ... */);
// to all connected clients
io.emit(/* ... */);
// WARNING: `socket.to(socket.id).emit()` will NOT work, as it will send to everyone in the room
// named `socket.id` but the sender. Please use the classic `socket.emit()` instead.
// with acknowledgement
socket.emit("question", (answer) => {
// ...
});
// without compression
socket.compress(false).emit(/* ... */);
// a message that might be dropped if the low-level transport is not writable
socket.volatile.emit(/* ... */);
});
11获取键盘高度
更新https://uniapp.dcloud.io/component/input
新版已经补充了键盘高度,在弹出键盘时@focus有event.detail = { value, height }height 为键盘高度。
关闭键盘
uni.hideKeyboard()
12消息界面局部滚动
https://blog.csdn.net/weixin_30267785/article/details/101268343
13监听app关闭事件
https://blog.csdn.net/weixin_44599931/article/details/109056923