Skip to content

Commit 81ed772

Browse files
committed
chore(ChatList): support skyline render
1 parent 0e4e8e5 commit 81ed772

File tree

3 files changed

+32
-76
lines changed

3 files changed

+32
-76
lines changed

packages/pro-components/chat/chat-list/chat-list.less

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
color: @chat-text-color;
1313

1414
&__content {
15-
flex: 1;
1615
overflow-y: auto;
1716
overflow-x: hidden;
1817
width: 100%;
@@ -26,10 +25,15 @@
2625
transform: scaleY(-1);
2726
}
2827
}
28+
}
2929

30-
.placeholder {
31-
flex-grow: 1;
32-
flex-shrink: 1;
33-
}
30+
&__placeholder {
31+
flex-grow: 1;
32+
flex-shrink: 1;
33+
}
34+
35+
&__footer {
36+
flex-grow: 0;
37+
flex-shrink: 0;
3438
}
3539
}

packages/pro-components/chat/chat-list/chat-list.wxml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
bindscrolltolower="handlerScrollToLower"
1515
type="list"
1616
>
17-
<block wx:if="{{reverse}}">
18-
<view class="placeholder"></view>
19-
</block>
2017
<!-- /**
2118
* 1. 两种方式获取要渲染的 list
2219
* a. props 传 data
@@ -40,6 +37,8 @@
4037
</block>
4138
<slot wx:else />
4239
</scroll-view>
40+
41+
<view wx:if="{{reverse}}" class="{{classPrefix}}__placeholder"></view>
4342
<view class="{{classPrefix}}__footer">
4443
<slot name="footer" />
4544
</view>

packages/tdesign-miniprogram/example/app.json

Lines changed: 21 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -98,127 +98,79 @@
9898
"subpackages": [
9999
{
100100
"root": "pages/chat-list/",
101-
"pages": [
102-
"chat-list"
103-
]
101+
"pages": ["chat-list"]
104102
},
105103
{
106104
"root": "pages/chat-content/",
107-
"pages": [
108-
"chat-content"
109-
]
105+
"pages": ["chat-content"]
110106
},
111107
{
112108
"root": "pages/chat-actionbar/",
113-
"pages": [
114-
"chat-actionbar"
115-
]
109+
"pages": ["chat-actionbar"]
116110
},
117111
{
118112
"root": "pages/chat-loading/",
119-
"pages": [
120-
"chat-loading"
121-
]
113+
"pages": ["chat-loading"]
122114
},
123115
{
124116
"root": "pages/chat-thinking/",
125-
"pages": [
126-
"chat-thinking"
127-
]
117+
"pages": ["chat-thinking"]
128118
},
129119
{
130120
"root": "pages/attachments/",
131-
"pages": [
132-
"attachments"
133-
]
121+
"pages": ["attachments"]
134122
},
135123
{
136124
"root": "pages/chat-markdown/",
137-
"pages": [
138-
"chat-markdown"
139-
]
125+
"pages": ["chat-markdown"]
140126
},
141127
{
142128
"root": "pages/chat-sender/",
143-
"pages": [
144-
"chat-sender"
145-
]
129+
"pages": ["chat-sender"]
146130
},
147131
{
148132
"root": "pages/side-bar/",
149-
"pages": [
150-
"side-bar",
151-
"base/index",
152-
"switch/index",
153-
"custom/index",
154-
"with-icon/index"
155-
]
133+
"pages": ["side-bar", "base/index", "switch/index", "custom/index", "with-icon/index"]
156134
},
157135
{
158136
"root": "pages/action-sheet/",
159-
"pages": [
160-
"action-sheet"
161-
]
137+
"pages": ["action-sheet"]
162138
},
163139
{
164140
"root": "pages/avatar/",
165-
"pages": [
166-
"avatar",
167-
"skyline/avatar"
168-
]
141+
"pages": ["avatar", "skyline/avatar"]
169142
},
170143
{
171144
"root": "pages/calendar/",
172-
"pages": [
173-
"calendar"
174-
]
145+
"pages": ["calendar"]
175146
},
176147
{
177148
"root": "pages/dialog/",
178-
"pages": [
179-
"dialog",
180-
"skyline/dialog"
181-
]
149+
"pages": ["dialog", "skyline/dialog"]
182150
},
183151
{
184152
"root": "pages/picker/",
185-
"pages": [
186-
"picker",
187-
"skyline/picker"
188-
]
153+
"pages": ["picker", "skyline/picker"]
189154
},
190155
{
191156
"root": "pages/rate/",
192-
"pages": [
193-
"rate"
194-
]
157+
"pages": ["rate"]
195158
},
196159
{
197160
"root": "pages/swiper/",
198-
"pages": [
199-
"swiper",
200-
"skyline/swiper"
201-
]
161+
"pages": ["swiper", "skyline/swiper"]
202162
},
203163
{
204164
"root": "pages/swipe-cell/",
205-
"pages": [
206-
"swipe-cell"
207-
]
165+
"pages": ["swipe-cell"]
208166
},
209167
{
210168
"root": "pages/tree-select/",
211-
"pages": [
212-
"tree-select"
213-
]
169+
"pages": ["tree-select"]
214170
},
215171
{
216172
"root": "pages/indexes/",
217-
"pages": [
218-
"indexes",
219-
"base/index",
220-
"custom/index"
221-
]
173+
"pages": ["indexes", "base/index", "custom/index"]
222174
}
223175
],
224176
"themeLocation": "theme.json",
@@ -248,7 +200,8 @@
248200
"defaultDisplayBlock": true,
249201
"defaultContentBox": true,
250202
"sdkVersionBegin": "3.4.3",
251-
"sdkVersionEnd": "15.255.255"
203+
"sdkVersionEnd": "15.255.255",
204+
"enableScrollViewAutoSize": true
252205
}
253206
}
254207
}

0 commit comments

Comments
 (0)