Skip to content

Commit

Permalink
删除无用更新
Browse files Browse the repository at this point in the history
  • Loading branch information
1eeing committed Nov 27, 2023
1 parent 5bdb6a3 commit 1d27eb0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
1 change: 0 additions & 1 deletion vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
},
"dependencies": {
"@xkit-yx/im-kit-ui": "^9.6.4",
"jsx-web-compiler": "^1.0.2",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"vue": "^3.2.45"
Expand Down
19 changes: 1 addition & 18 deletions vue/src/components/IMApp/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ import {
ContactListContainer, // 通讯录——通讯录导航组件
ContactInfoContainer, // 通讯录——通讯录详情组件,包含好友列表、群组列表以及黑名单列表
MyAvatarContainer, // 用户资料组件
ComplexAvatarContainer,
} from "@xkit-yx/im-kit-ui";
import { compile } from "jsx-web-compiler";
import "@xkit-yx/im-kit-ui/es/style/css";
import "./iconfont.css";
Expand Down Expand Up @@ -79,29 +77,14 @@ export default {
this.$refs.add
);
this.$uikit.render(MyAvatarContainer, null, this.$refs.avatar);
this.$uikit.render(ConversationContainer, {
renderP2pSessionAvatar: () => compile(`<div><img style={{width: 30, height: 30}} src='https://nim-nosdn.netease.im/MjYxNDkzNzE=/bmltYV85NDQ5NzgxNzYxN18xNjg2MTI2MTc2MTk1XzE2Njg0N2UxLTlhYWUtNDZlZS05ZTI2LTFmOWYyYjhhNTU0Mw==?createTime=1686126177312' /></div>`),
}, this.$refs.conversation);
this.$uikit.render(ConversationContainer, null, this.$refs.conversation);
this.$uikit.render(
ChatContainer,
{
// 以下是自定义渲染,用 compile 函数包裹 html 就可以了,注意 class 要写成 className
// 安装并引入: import { compile } from "jsx-web-compiler";
// renderHeader: () => compile(`<div className="my-header">123</div>`),
// renderEmpty: () => compile("<div>This is empty</div>"),
renderMessageAvatar: (options) => {
console.log(options)
const openUserCard = () => {
console.log('???')
}
const context = {
ComplexAvatarContainer,
openUserCard,
account: options.from,
}
return compile(
`<div onClickCapture={context.openUserCard}><context.ComplexAvatarContainer account={context.account} canClick={false} /></div>`, context
)}
},
this.$refs.chat
);
Expand Down

0 comments on commit 1d27eb0

Please sign in to comment.