Skip to content

Commit

Permalink
Merge pull request #16 from Angus2333/main
Browse files Browse the repository at this point in the history
v10.1.0
  • Loading branch information
shine2008 authored Oct 18, 2024
2 parents 9b9060e + 3b482bc commit e50d380
Show file tree
Hide file tree
Showing 113 changed files with 7,200 additions and 1,103 deletions.
8 changes: 8 additions & 0 deletions NEUIKit/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import RootStore from "@xkit-yx/im-store-v2";
import V2NIM, { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
import {
customRedirectTo,
Expand Down Expand Up @@ -92,9 +93,16 @@ export default {
const store = (uni.$UIKitStore = new RootStore(
nim,
{
// 添加好友是否需要验证
addFriendNeedVerify: false,
// 是否需要显示 p2p 消息、p2p会话列表消息已读未读,默认 false
p2pMsgReceiptVisible: true,
// 是否需要显示群组消息已读未读,默认 false
teamMsgReceiptVisible: true,
// 群组被邀请模式,默认需要验证
teamAgreeMode:
V2NIMConst.V2NIMTeamAgreeMode.V2NIM_TEAM_AGREE_MODE_NO_AUTH,
// 发送消息前回调, 可对消息体进行修改,添加自定义参数
sendMsgBefore: async (options: {
msg: V2NIMMessage;
conversationId: string;
Expand Down
7 changes: 4 additions & 3 deletions NEUIKit/components/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ const appellation = computed(() => {
.slice(0, 2)
})
const uninstallUserInfoWatch = autorun(async () => {
const data = await uni.$UIKitStore?.userStore?.getUserActive(props.account)
user.value = deepClone(data)
uni.$UIKitStore?.userStore?.getUserActive(props.account).then((data) => {
user.value = data
})
})
const avatarUrl = computed(() => {
user.value = deepClone(uni.$UIKitStore?.userStore?.users?.get(props.account))
user.value = uni.$UIKitStore?.userStore?.users?.get(props.account)
return props.avatar || user.value?.avatar
})
Expand Down
15 changes: 9 additions & 6 deletions NEUIKit/components/FormInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
:placeholder="placeholder"
:maxlength="maxlength"
/>
<icon
v-show="modelValue && allowClear"
type="clear"
size="16"
@tap="clearInput()"
/>
<div class="clear-icon" @tap="clearInput()">
<icon v-show="modelValue && allowClear" type="clear" size="16" />
</div>
<slot name="addonAfter" />
</div>

<div v-if="inputError && rule" class="error-tips">{{ rule.message }}</div>
</div>
</template>
Expand Down Expand Up @@ -123,9 +121,14 @@ $error-color: #f56c6c;
.input {
flex: 1;
height: 30px;
border: none;
outline: none;
}
.clear-icon {
width: 40px;
text-align: right;
}
.error-tips {
color: $error-color;
Expand Down
9 changes: 8 additions & 1 deletion NEUIKit/components/FriendSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const onBtnClick = () => {
flex-direction: row;
align-items: center;
padding: 8px 20px;
width: 100vw;
// width: 100vw;
.user-avatar {
margin: 0 14px;
Expand All @@ -157,4 +157,11 @@ const onBtnClick = () => {
}
}
}
.ok-btn {
margin-bottom: 15px;
}
.ok-btn-mp {
margin-bottom: 15px;
}
</style>
12 changes: 11 additions & 1 deletion NEUIKit/components/Icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const urlMap = {
'icon-shandiao':
'https://yx-web-nosdn.netease.im/common/14eea1edc7801449a30700a3c9d604c6/icon-shandiao.png',
'icon-shezhi':
'https://yx-web-nosdn.netease.im/common/fd70b269c209fcd98f50537b51639826/shezhi.png',
'https://yx-web-nosdn.netease.im/common/698d483a7aacade68ea976f727184e1e/setting.png',
'icon-shezhi1':
'https://yx-web-nosdn.netease.im/common/eced271ac35864b7c716262f1a37217e/icon-shezhi1.png',
'icon-shipin':
Expand Down Expand Up @@ -334,6 +334,16 @@ const urlMap = {
'https://yx-web-nosdn.netease.im/common/99438364d757b51e7e36c18d254e70e7/icon-audio-call.png',
'icon-video-call':
'https://yx-web-nosdn.netease.im/common/ed7c85a59de3e247d10ecfc684b05226/icon-video-call.png',
'icon-read':
'https://yx-web-nosdn.netease.im/common/271c53e493cfd6ea98c51650d8b39b79/read.png',
'icon-file':
'https://yx-web-nosdn.netease.im/common/90485f277f50fc081970ded8772ec7c5/file.png',
'icon-pin':
'https://yx-web-nosdn.netease.im/common/8874f30f648cde89dbbe9a59e9cb7f8a/pin.png',
'icon-green-pin':
'https://yx-web-nosdn.netease.im/common/4a1f15eff2f53563c4f1cf6ecde82d2c/green-pin.png',
'choose-picture':
'https://yx-web-nosdn.netease.im/common/97b3ca79a589d5753cbc0e8e8ec09501/choose-picture.png',
}
//以上链接访问有频率控制,建议您将静态放到您服务器上,然后修改上面的链接即可
Expand Down
45 changes: 22 additions & 23 deletions NEUIKit/components/MessageOneLine.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<template>
<div>
<div class="wrapper">
<template v-for="item in textArr">
<template v-if="item.type === 'text'">
<div class="msg-reply-text">{{ item.value }}</div>
</template>
<template v-else-if="item.type === 'emoji'">
<div class="icon">
<Icon
:type="emojiMap[item.value]"
:size="14"
:style="{ margin: '3px', verticalAlign: 'bottom' }"
/>
</div>
</template>
<div class="wrapper">
<template v-for="item in textArr">
<template v-if="item.type === 'text'" class="msg-reply-text">
{{ item.value }}
</template>
</div>
<div class="ellipsis" v-if="text.length > 15">...</div>
<template class="icon" v-else-if="item.type === 'emoji'">
<Icon
:type="emojiMap[item.value]"
:size="14"
:iconStyle="{
margin: '3px',
verticalAlign: 'bottom',
display: 'inline-block',
}"
/>
</template>
</template>
</div>
</template>

Expand Down Expand Up @@ -76,20 +75,20 @@ const textArr = computed(() => {

<style lang="scss" scoped>
.wrapper {
display: inline-flex;
flex: 1;
font-size: 13px;
flex-wrap: nowrap;
width: 100%;
overflow: hidden;
align-items: center;
max-width: 125px;
box-sizing: border-box;
white-space: nowrap;
text-overflow: ellipsis;
}
.msg-reply-text {
font-size: 13px !important;
height: 18px;
line-height: 18px;
width: fit-content;
width: 100%;
display: inline;
}
.ellipsis {
display: inline-block;
Expand Down
Loading

0 comments on commit e50d380

Please sign in to comment.