im-ui-mobile 0.0.37 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,19 @@
1
1
  <template>
2
- <view class="im-chat" :class="[`im-chat--${type}`]" @click="handleClick">
3
- <view class="im-chat__avatar">
2
+ <view class="im-sample" :class="[`im-sample--${type}`]" @click="handleClick">
3
+ <view class="im-sample__avatar">
4
4
  <view class="avatar-fallback">
5
- <!-- <image v-if="avatar" :src="avatar" class="avatar-image" mode="aspectFill" /> -->
6
5
  <u-avatar v-if="avatar" :src="avatar" />
7
6
  <text v-else class="avatar-text">{{ displayName }}</text>
8
7
  </view>
9
8
  </view>
10
- <view class="im-chat__content">
11
- <view class="im-chat__header">
12
- <text class="im-chat__name">{{ name }}</text>
13
- <text class="im-chat__time">{{ time }}</text>
9
+ <view class="im-sample__content">
10
+ <view class="im-sample__header">
11
+ <text class="im-sample__name">{{ name }}</text>
12
+ <text class="im-sample__time">{{ time }}</text>
14
13
  </view>
15
- <view class="im-chat__message">
16
- <text class="im-chat__text">{{ lastMessage }}</text>
14
+ <view class="im-sample__message">
15
+ <text class="im-sample__text">{{ lastMessage }}</text>
17
16
  <u-badge v-if="unreadCount > 0" :max="99" :value="unreadCount" />
18
-
19
- <!-- <view v-if="unreadCount > 0" class="badge-fallback">
20
- <text class="badge-text">{{ displayUnreadCount }}</text>
21
- </view> -->
22
17
  </view>
23
18
  </view>
24
19
  </view>
@@ -91,7 +86,7 @@ const handleClick = (event: Event) => {
91
86
  </script>
92
87
 
93
88
  <style lang="scss" scoped>
94
- .im-chat {
89
+ .im-sample {
95
90
  display: flex;
96
91
  padding: 24rpx 32rpx;
97
92
  transition: background-color 0.3s;
@@ -149,7 +144,7 @@ const handleClick = (event: Event) => {
149
144
  flex: 1;
150
145
 
151
146
  /* 群聊样式 */
152
- .im-chat--group &::before {
147
+ .im-sample--group &::before {
153
148
  content: "👥 ";
154
149
  }
155
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "im-ui-mobile",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "A Vue3.0 + typescript instant messaging component library for Uniapp",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -10,6 +10,7 @@
10
10
  "libs",
11
11
  "types",
12
12
  "utils",
13
+ "plugins",
13
14
  "index.js"
14
15
  ],
15
16
  "scripts": {
@@ -0,0 +1,29 @@
1
+ import uviewPlus from 'uview-plus'
2
+
3
+ export const UViewPlusPlugin = {
4
+ install(app) {
5
+ // 安装 uview-plus
6
+ app.use(uviewPlus)
7
+
8
+ // 注册一些常用的 uview-plus 组件作为全局组件
9
+ app.component('UButton', uviewPlus.Button)
10
+ app.component('UInput', uviewPlus.Input)
11
+ app.component('UAvatar', uviewPlus.Avatar)
12
+ app.component('UBadge', uviewPlus.Badge)
13
+ app.component('UIcon', uviewPlus.Icon)
14
+ app.component('UPopup', uviewPlus.Popup)
15
+ app.component('USearch', uviewPlus.Search)
16
+ app.component('UIndexList', uviewPlus.IndexList)
17
+ app.component('UIndexItem', uviewPlus.IndexItem)
18
+ app.component('UCard', uviewPlus.Card)
19
+ app.component('UTabs', uviewPlus.Tabs)
20
+ app.component('UParse', uviewPlus.Parse)
21
+ app.component('ULink', uviewPlus.Link)
22
+ app.component('UUpload', uviewPlus.Upload)
23
+ app.component('ULineProgress', uviewPlus.LineProgress)
24
+ app.component('UModal', uviewPlus.Modal)
25
+ app.component('UTag', uviewPlus.Tag)
26
+ app.component('UForm', uviewPlus.Form)
27
+ app.component('UFormItem', uviewPlus.FormItem)
28
+ }
29
+ }
@@ -1,6 +1,6 @@
1
1
  import { AllowedComponentProps, VNodeProps } from './_common'
2
2
 
3
- declare interface ChatProps {
3
+ declare interface SampleProps {
4
4
  type: string
5
5
  avatar: string
6
6
  name: string
@@ -9,12 +9,12 @@ declare interface ChatProps {
9
9
  unreadCount: number
10
10
  }
11
11
 
12
- declare interface _Chat {
12
+ declare interface _Sample {
13
13
  new(): {
14
14
  $props: AllowedComponentProps &
15
15
  VNodeProps &
16
- ChatProps
16
+ SampleProps
17
17
  }
18
18
  }
19
19
 
20
- export declare const Chat: _Chat
20
+ export declare const Sample: _Sample
@@ -1,6 +1,6 @@
1
1
  declare module 'vue' {
2
2
  export interface GlobalComponents {
3
- ['im-chat']: typeof import('./components/chat')['Chat']
3
+ ['im-sample']: typeof import('./components/sample')['Sample']
4
4
  }
5
5
  }
6
6