1
1
<!--Title-->
2
2
< section class ="mb-4 " id ="a-introduction ">
3
- < h2 class ="section-heading "> React Chat - API</ h2 >
3
+ < h2 class ="section-heading "> React Chat- API</ h2 >
4
4
5
5
<!-- Description -->
6
- < p > In this section you will find advanced information about the Chat component. You will find out which modules
7
- are required, what are the possibilities of configuring the component, and what events and methods you can use in
8
- working with it.</ p >
6
+ < p > 在本节中,您将找到有关“聊天”组件的高级信息。您将发现需要哪些模块,配置组件的可能性以及在使用该组件时可以使用的事件和方法。</ p >
9
7
<!-- Description -->
10
8
11
9
< hr class ="my-5 ">
@@ -16,19 +14,18 @@ <h2 class="section-heading">React Chat - API</h2>
16
14
< section class ="mb-4 " id ="a-import ">
17
15
18
16
<!--Title-->
19
- < h3 class ="secondary-heading mb-3 "> Chat import statement </ h3 >
17
+ < h3 class ="secondary-heading mb-3 "> 导入账单 </ h3 >
20
18
21
19
<!-- Description -->
22
- < p > Chat is more like template which we prepared to use with structured data, for example from external API. There is
23
- a need to import few components to build chat window.</ p >
20
+ < p > 聊天更像是我们准备用于结构化数据(例如来自外部API)的模板。需要导入少量组件来构建聊天窗口。</ p >
24
21
<!-- Description -->
25
22
26
23
<!--Section: Code-->
27
24
< section >
28
25
< mdbsnippet >
29
26
30
27
< code data-lang ="javascript " data-name ="JS ">
31
- import { MDBCard, MDBCardBody, MDBRow, MDBCol, MDBListGroup, MDBListGroupItem, MDBAvatar, MDBBadge, MDBIcon, MDBBtn, MDBScrollbar } from "mdbreact";
28
+ 从“ mdbreact”导入{ MDBCard, MDBCardBody, MDBRow, MDBCol, MDBListGroup, MDBListGroupItem, MDBAvatar, MDBBadge, MDBIcon, MDBBtn, MDBScrollbar};
32
29
</ code >
33
30
34
31
</ mdbsnippet >
@@ -44,75 +41,74 @@ <h3 class="secondary-heading mb-3">Chat import statement</h3>
44
41
< section class ="mb-4 " id ="a-friends ">
45
42
46
43
<!--Title-->
47
- < h3 class ="secondary-heading mb-3 "> Chat - Friend Properties </ h2 >
44
+ < h3 class ="secondary-heading mb-3 "> 聊天-朋友属性 </ h2 >
48
45
49
46
<!-- Description -->
50
- < p > The table below shows the structure of the 'friend' object which is destructured then as props of the Friend
51
- component.</ p >
47
+ < p > 下表显示了“朋友”对象的结构,该对象随后被解构为Friend组件的道具。</ p >
52
48
<!-- Description -->
53
49
54
50
<!-- Table -->
55
51
< div >
56
52
< table id ="dtBasicExample " class ="table-responsive-md table table-striped table-bordered ">
57
53
< thead >
58
54
< tr >
59
- < th > < strong > Name </ strong > </ th >
60
- < th > < strong > Type </ strong > </ th >
61
- < th > < strong > Default </ strong > </ th >
62
- < th > < strong > Description </ strong > </ th >
63
- < th > < strong > Example </ strong > </ th >
55
+ < th > < strong > 名称 </ strong > </ th >
56
+ < th > < strong > 类型 </ strong > </ th >
57
+ < th > < strong > 默认 </ strong > </ th >
58
+ < th > < strong > 描述 </ strong > </ th >
59
+ < th > < strong > 范例 </ strong > </ th >
64
60
</ tr >
65
61
</ thead >
66
62
< tbody >
67
63
< tr >
68
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> name </ code > </ td >
69
- < td > < i > string </ i > </ td >
64
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 名称 </ code > </ td >
65
+ < td > < i > 字符串 </ i > </ td >
70
66
< td > < code > </ code > </ td >
71
- < td > Name of the user. </ td >
72
- < td > < code class ="language-markup " style ="word-break: normal "> name: "John Doe" </ code > </ td >
67
+ < td > 用户名称 </ td >
68
+ < td > < code class ="language-markup " style ="word-break: normal "> 名称:“约翰·杜伊” </ code > </ td >
73
69
</ tr >
74
70
< tr >
75
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> avatar </ code > </ td >
76
- < td > < i > string </ i > </ td >
71
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 头像 </ code > </ td >
72
+ < td > < i > 字符串 </ i > </ td >
77
73
< td > < code > </ code > </ td >
78
- < td > URL for the user's avatar </ td >
79
- < td > < code class ="language-markup "> avatar: " https://mydomain.com/avatars/john_doe" </ code > </ td >
74
+ < td > 用户头像的网址 </ td >
75
+ < td > < code class ="language-markup "> 头像:“ https://mydomain.com/avatars/john_doe” </ code > </ td >
80
76
</ tr >
81
77
< tr >
82
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> message </ code > </ td >
83
- < td > < i > string </ i > </ td >
78
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 信息 </ code > </ td >
79
+ < td > < i > 字符串 </ i > </ td >
84
80
< td > < code > </ code > </ td >
85
- < td > User's chat message </ td >
86
- < td > < code class ="language-markup "> message: "Hello, how are you?" </ code > </ td >
81
+ < td > 用户的聊天消息 </ td >
82
+ < td > < code class ="language-markup "> 消息:“你好,你好吗?” </ code > </ td >
87
83
</ tr >
88
84
< tr >
89
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> when </ code > </ td >
90
- < td > < i > string </ i > </ td >
85
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 时间 </ code > </ td >
86
+ < td > < i > 字符串 </ i > </ td >
91
87
< td > < code > </ code > </ td >
92
- < td > Desciption, when message has been received </ td >
93
- < td > < code class ="language-markup "> when: "1 minute ago" </ code > </ td >
88
+ < td > 接收消息时的描述 </ td >
89
+ < td > < code class ="language-markup "> 时间:“ 1分钟前” </ code > </ td >
94
90
</ tr >
95
91
< tr >
96
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> toRespond </ code > </ td >
97
- < td > < i > number </ i > </ td >
92
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 回复 </ code > </ td >
93
+ < td > < i > 数字 </ i > </ td >
98
94
< td > < code > </ code > </ td >
99
- < td > Amount of messages to respond indicator </ td >
100
- < td > < code class ="language-markup " style ="word-break: normal "> toRespond: 2</ code > </ td >
95
+ < td > 响应消息量指示器 </ td >
96
+ < td > < code class ="language-markup " style ="word-break: normal "> 响应: 2</ code > </ td >
101
97
</ tr >
102
98
103
99
< tr >
104
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> seen </ code > </ td >
105
- < td > < i > boolean </ i > </ td >
100
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 人浏览 </ code > </ td >
101
+ < td > < i > 布尔值 </ i > </ td >
106
102
< td > < code > </ code > </ td >
107
- < td > Indicate that your message was seen </ td >
108
- < td > < code class ="language-markup "> seen: false </ code > </ td >
103
+ < td > 表示您的讯息已被看到 </ td >
104
+ < td > < code class ="language-markup "> 看到:错误 </ code > </ td >
109
105
</ tr >
110
106
< tr >
111
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> active </ code > </ td >
112
- < td > < i > boolean </ i > </ td >
107
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 活动 </ code > </ td >
108
+ < td > < i > 布尔值 </ i > </ td >
113
109
< td > < code > </ code > </ td >
114
- < td > Highlights the currently opened user chat window </ td >
115
- < td > < code class ="language-markup "> active: true </ code > </ td >
110
+ < td > 突出显示当前打开的用户聊天窗口 </ td >
111
+ < td > < code class ="language-markup "> 活动:真实 </ code > </ td >
116
112
</ tr >
117
113
</ tbody >
118
114
</ table >
@@ -127,53 +123,52 @@ <h3 class="secondary-heading mb-3">Chat - Friend Properties</h2>
127
123
< section class ="mb-4 " id ="a-messages ">
128
124
129
125
<!--Title-->
130
- < h3 class ="secondary-heading mb-3 "> Chat - Message Properties </ h2 >
126
+ < h3 class ="secondary-heading mb-3 "> 聊天-消息属性 </ h2 >
131
127
132
128
<!-- Description -->
133
- < p > The table below shows the structure of the 'message' object which is destructured then as props of the
134
- ChatMessage component.</ p >
129
+ < p > 下表显示了“消息”对象的结构,该对象随后被分解为ChatMessage组件的道具。</ p >
135
130
<!-- Description -->
136
131
137
132
<!-- Table -->
138
133
< div >
139
134
< table id ="dtBasicExample " class ="table-responsive-md table table-striped table-bordered ">
140
135
< thead >
141
136
< tr >
142
- < th > < strong > Name </ strong > </ th >
143
- < th > < strong > Type </ strong > </ th >
144
- < th > < strong > Default </ strong > </ th >
145
- < th > < strong > Description </ strong > </ th >
146
- < th > < strong > Example </ strong > </ th >
137
+ < th > < strong > 名称 </ strong > </ th >
138
+ < th > < strong > 类型 </ strong > </ th >
139
+ < th > < strong > 默认 </ strong > </ th >
140
+ < th > < strong > 描述 </ strong > </ th >
141
+ < th > < strong > 范例 </ strong > </ th >
147
142
</ tr >
148
143
</ thead >
149
144
< tbody >
150
145
< tr >
151
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> author </ code > </ td >
152
- < td > < i > string </ i > </ td >
146
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 作者 </ code > </ td >
147
+ < td > < i > 字符串 </ i > </ td >
153
148
< td > < code > </ code > </ td >
154
- < td > User name of the message author </ td >
155
- < td > < code class ="language-markup " style ="word-break: normal "> author: "John Doe" </ code > </ td >
149
+ < td > 消息作者的用户名 </ td >
150
+ < td > < code class ="language-markup " style ="word-break: normal "> 作者:“约翰·多伊” </ code > </ td >
156
151
</ tr >
157
152
< tr >
158
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> avatar </ code > </ td >
159
- < td > < i > string </ i > </ td >
153
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 头像 </ code > </ td >
154
+ < td > < i > 字符串 </ i > </ td >
160
155
< td > < code > </ code > </ td >
161
- < td > URL for the user's avatar </ td >
162
- < td > < code class ="language-markup "> avatar: " https://mydomain.com/avatars/john_doe" </ code > </ td >
156
+ < td > 用户头像的网址 </ td >
157
+ < td > < code class ="language-markup "> 头像:“ https://mydomain.com/avatars/john_doe” </ code > </ td >
163
158
</ tr >
164
159
< tr >
165
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> message </ code > </ td >
166
- < td > < i > string </ i > </ td >
160
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 信息 </ code > </ td >
161
+ < td > < i > 字符串 </ i > </ td >
167
162
< td > < code > </ code > </ td >
168
- < td > User's chat message </ td >
169
- < td > < code class ="language-markup "> message: "Hello, how are you?" </ code > </ td >
163
+ < td > 用户的聊天消息 </ td >
164
+ < td > < code class ="language-markup "> 消息:“你好,你好吗?” </ code > </ td >
170
165
</ tr >
171
166
< tr >
172
- < td > < code class ="highlighter-rouge " style ="word-break: normal "> when </ code > </ td >
173
- < td > < i > string </ i > </ td >
167
+ < td > < code class ="highlighter-rouge " style ="word-break: normal "> 时间 </ code > </ td >
168
+ < td > < i > 字符串 </ i > </ td >
174
169
< td > < code > </ code > </ td >
175
- < td > Desciption, when message has been received </ td >
176
- < td > < code class ="language-markup "> when: "1 minute ago" </ code > </ td >
170
+ < td > 接收消息时的描述 </ td >
171
+ < td > < code class ="language-markup "> 时间:“ 1分钟前” </ code > </ td >
177
172
</ tr >
178
173
</ tbody >
179
174
</ table >
0 commit comments