Skip to content

Commit a1185fb

Browse files
committed
fix: code formatter
1 parent 450f079 commit a1185fb

11 files changed

Lines changed: 68 additions & 121 deletions

File tree

packages/pro-components/chat/chat-record/_example/base/index.wxml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,26 @@
2626
</block>
2727
<view slot="footer">
2828
<t-chat-sender
29-
value="{{value}}"
30-
loading="{{loading}}"
31-
disabled="{{disabled}}"
32-
autoRiseWithKeyboard="{{true}}"
33-
renderPresets="{{renderPresets}}"
34-
allowSpeech="{{true}}"
35-
placeholder="{{placeholder}}"
36-
bind:send="onSend"
37-
bind:stop="onStop"
38-
bind:focus="onFocus"
39-
bind:keyboardheightchange="onKeyboardHeightChange"
29+
value="{{value}}"
30+
loading="{{loading}}"
31+
disabled="{{disabled}}"
32+
autoRiseWithKeyboard="{{true}}"
33+
renderPresets="{{renderPresets}}"
34+
allowSpeech="{{true}}"
35+
placeholder="{{placeholder}}"
36+
bind:send="onSend"
37+
bind:stop="onStop"
38+
bind:focus="onFocus"
39+
bind:keyboardheightchange="onKeyboardHeightChange"
4040
>
41-
<view slot="speech">
42-
<t-chat-record bind:recognize="handleRecognize">
43-
<view slot="speechInput" class="speech-slot-btn"> 按住说话 </view>
44-
<view slot="speechNoAuth" class="speech-btn-error"> 请授权麦克风权限 </view>
45-
</t-chat-record>
46-
</view>
47-
</t-chat-sender>
48-
</view>
41+
<view slot="speech">
42+
<t-chat-record bind:recognize="handleRecognize">
43+
<view slot="speechInput" class="speech-slot-btn"> 按住说话 </view>
44+
<view slot="speechNoAuth" class="speech-btn-error"> 请授权麦克风权限 </view>
45+
</t-chat-record>
46+
</view>
47+
</t-chat-sender>
48+
</view>
4949
</t-chat>
5050
</view>
5151
<t-toast id="t-toast" />

packages/pro-components/chat/chat-record/_example/base/index.wxss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
padding: 0 32rpx;
1313
}
1414

15-
1615
.speech-slot-btn,
1716
.speech-btn-error {
1817
/* 不设置 height,让 chat-sender 父容器的 min-height(134rpx) 自然撑起,
@@ -57,14 +56,13 @@
5756
width: 64rpx;
5857
height: 64rpx;
5958
background-color: #fff;
60-
border: 1px solid #DCDCDC;
59+
border: 1px solid #dcdcdc;
6160
}
6261
.voice-input-button {
6362
font-size: 36rpx;
6463
color: #000;
6564
}
6665

67-
6866
wx-button:after {
6967
border: none;
7068
}

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
}
1616

1717
@keyframes wave {
18-
1918
0%,
2019
100% {
2120
transform: scaleY(1);
@@ -39,7 +38,7 @@
3938

4039
// 遮罩层
4140
@chat-record-mask-z-index: 5100;
42-
@chat-record-mask-bg: rgba(0, 0, 0, 0.80);
41+
@chat-record-mask-bg: rgba(0, 0, 0, 0.8);
4342
@chat-record-mask-blur: blur(5px);
4443

4544
// 主容器
@@ -57,7 +56,7 @@
5756
// 气泡颜色
5857
@chat-record-color-blue: #2979ff;
5958
@chat-record-color-red: #ff5252;
60-
@chat-record-color-white: #FFFFFF;
59+
@chat-record-color-white: #ffffff;
6160

6261
@chat-record-cancel-font-size: 32rpx;
6362

@@ -105,8 +104,8 @@
105104
@chat-record-circle-size: 2000rpx;
106105
@chat-record-circle-border-radius: 2000rpx;
107106
@chat-record-circle-bottom: -1700rpx;
108-
@chat-record-circle-border: 4rpx solid #FFFFFF;
109-
@chat-record-circle-bg-default: #DCDCDC;
107+
@chat-record-circle-border: 4rpx solid #ffffff;
108+
@chat-record-circle-bg-default: #dcdcdc;
110109
@chat-record-circle-bg-active: #4a4a4a;
111110

112111
// 异形按钮
@@ -116,7 +115,7 @@
116115
@chat-record-shape-btn-padding-bottom: 180rpx;
117116
@chat-record-shape-btn-hint-top: -50rpx;
118117
@chat-record-shape-btn-hint-font-size: 24rpx;
119-
@chat-record-shape-btn-hint-color: #A3A3A3;
118+
@chat-record-shape-btn-hint-color: #a3a3a3;
120119
@chat-record-shape-btn-label-font-size: 28rpx;
121120
@chat-record-shape-btn-label-line-height: 44rpx;
122121
@chat-record-shape-btn-label-color: #fff;
@@ -146,7 +145,6 @@
146145
// ==================== 主容器 ====================
147146

148147
.@{chat-record} {
149-
150148
// 录音按钮
151149
&-hook {
152150
width: 100%;
@@ -164,9 +162,7 @@
164162
// ==================== 遮罩层和主容器 ====================
165163

166164
&-audio-input {
167-
168165
&.show {
169-
170166
.@{chat-record}-audio-input__mask,
171167
.@{chat-record}-audio-input__main {
172168
opacity: 1;
@@ -313,7 +309,7 @@
313309

314310
// 文案颜色:发送态黑色 60%,取消态红色
315311
.tips-send {
316-
color: rgba(0, 0, 0, 0.60);
312+
color: rgba(0, 0, 0, 0.6);
317313
}
318314

319315
.tips-cancel {
@@ -378,9 +374,9 @@
378374
}
379375

380376
.btn-text {
381-
color: #FFF;
377+
color: #fff;
382378
text-align: center;
383-
font-family: "PingFang SC";
379+
font-family: 'PingFang SC';
384380
font-size: @chat-record-cancel-text-font-size;
385381
font-weight: 600;
386382
line-height: @chat-record-cancel-text-line-height;
@@ -403,8 +399,8 @@
403399
transition: background-color @chat-record-transition-fast;
404400

405401
text {
406-
color: rgba(0, 0, 0, 0.90);
407-
font-family: "PingFang SC";
402+
color: rgba(0, 0, 0, 0.9);
403+
font-family: 'PingFang SC';
408404
font-size: @chat-record-send-btn-font-size;
409405
font-weight: 600;
410406
line-height: @chat-record-send-btn-line-height;

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
</slot>
1414
</view>
1515

16-
<button
17-
wx:else
18-
class="{{classPrefix}}-hook {{classPrefix}}-hook--no-auth"
19-
bindtap="requestRecordAuth"
20-
>
16+
<button wx:else class="{{classPrefix}}-hook {{classPrefix}}-hook--no-auth" bindtap="requestRecordAuth">
2117
<slot name="speechNoAuth">
2218
<view>{{globalConfig.requestAuth}}</view>
2319
</slot>
@@ -36,8 +32,10 @@
3632
style="bottom: {{bottomHeight}}rpx;"
3733
>
3834
<!-- 录音阶段:音波动画(独立在提示文字上方) -->
39-
<view wx:if="{{processStatus === 'recording'}}"
40-
class="audio-wave-outer audio-wave {{interactStatus === 'release_cancel' ? 'wave-red' : 'wave-blue'}}">
35+
<view
36+
wx:if="{{processStatus === 'recording'}}"
37+
class="audio-wave-outer audio-wave {{interactStatus === 'release_cancel' ? 'wave-red' : 'wave-blue'}}"
38+
>
4139
<block wx:for="{{waveList}}" wx:key="*this">
4240
<view class="wave-item" />
4341
</block>
@@ -56,9 +54,14 @@
5654
</view>
5755

5856
<!-- 录音阶段:全宽大按钮(纯色空按钮,仅承载手势) -->
59-
<view wx:if="{{processStatus === 'recording'}}"
57+
<view
58+
wx:if="{{processStatus === 'recording'}}"
6059
class="record-main-btn {{interactStatus === 'release_cancel' ? 'is-cancel' : 'is-record'}}"
61-
catchtouchstart="startRecord" catchtouchend="stopRecord" catchtouchmove="touchmove" catchtouchcancel="touchcancel">
60+
catchtouchstart="startRecord"
61+
catchtouchend="stopRecord"
62+
catchtouchmove="touchmove"
63+
catchtouchcancel="touchcancel"
64+
>
6265
</view>
6366

6467
<!-- 确认按钮区(Send/Cancel) -->

packages/pro-components/chat/chat-sender/_example/chat-sender.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
"file-citation": "./file-citation",
1010
"record": "./record"
1111
}
12-
}
12+
}

packages/pro-components/chat/chat-sender/_example/record/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Page({
4747
console.log('语音识别结果:', voiceMsg);
4848

4949
// 将语音识别结果设置到输入框中
50-
if(voiceMsg.voiceText) {
50+
if (voiceMsg.voiceText) {
5151
this.setData({
5252
query: voiceMsg.voiceText,
5353
});

packages/pro-components/chat/chat-sender/_example/record/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
bind:keyboardheightchange="onKeyboardHeightChange"
1212
>
1313
<view slot="speech">
14-
<t-chat-record bind:recognize="handleRecognize">
14+
<t-chat-record bind:recognize="handleRecognize">
1515
<view slot="speechInput" class="speech-slot-btn"> 按住说话 </view>
1616
<view slot="speechNoAuth" class="speech-btn-error"> 请授权麦克风权限 </view>
1717
</t-chat-record>

packages/pro-components/chat/chat-sender/_example/record/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
width: 64rpx;
7373
height: 64rpx;
7474
background-color: #fff;
75-
border: 1px solid #DCDCDC;
75+
border: 1px solid #dcdcdc;
7676
}
7777
.voice-input-button {
7878
font-size: 36rpx;

packages/tdesign-miniprogram/example/app.json

Lines changed: 20 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -103,133 +103,83 @@
103103
"subpackages": [
104104
{
105105
"root": "pages/chat-list/",
106-
"pages": [
107-
"chat-list"
108-
]
106+
"pages": ["chat-list"]
109107
},
110108
{
111109
"root": "pages/chat-content/",
112-
"pages": [
113-
"chat-content"
114-
]
110+
"pages": ["chat-content"]
115111
},
116112
{
117113
"root": "pages/chat-actionbar/",
118-
"pages": [
119-
"chat-actionbar"
120-
]
114+
"pages": ["chat-actionbar"]
121115
},
122116
{
123117
"root": "pages/chat-loading/",
124-
"pages": [
125-
"chat-loading"
126-
]
118+
"pages": ["chat-loading"]
127119
},
128120
{
129121
"root": "pages/chat-thinking/",
130-
"pages": [
131-
"chat-thinking"
132-
]
122+
"pages": ["chat-thinking"]
133123
},
134124
{
135125
"root": "pages/attachments/",
136-
"pages": [
137-
"attachments"
138-
]
126+
"pages": ["attachments"]
139127
},
140128
{
141129
"root": "pages/chat-markdown/",
142-
"pages": [
143-
"chat-markdown"
144-
]
130+
"pages": ["chat-markdown"]
145131
},
146132
{
147133
"root": "pages/chat-sender/",
148-
"pages": [
149-
"chat-sender"
150-
]
134+
"pages": ["chat-sender"]
151135
},
152136
{
153137
"root": "pages/chat-record/",
154-
"pages": [
155-
"chat-record"
156-
]
138+
"pages": ["chat-record"]
157139
},
158140
{
159141
"root": "pages/side-bar/",
160-
"pages": [
161-
"side-bar",
162-
"base/index",
163-
"switch/index",
164-
"custom/index",
165-
"with-icon/index"
166-
]
142+
"pages": ["side-bar", "base/index", "switch/index", "custom/index", "with-icon/index"]
167143
},
168144
{
169145
"root": "pages/action-sheet/",
170-
"pages": [
171-
"action-sheet"
172-
]
146+
"pages": ["action-sheet"]
173147
},
174148
{
175149
"root": "pages/avatar/",
176-
"pages": [
177-
"avatar",
178-
"skyline/avatar"
179-
]
150+
"pages": ["avatar", "skyline/avatar"]
180151
},
181152
{
182153
"root": "pages/calendar/",
183-
"pages": [
184-
"calendar"
185-
]
154+
"pages": ["calendar"]
186155
},
187156
{
188157
"root": "pages/dialog/",
189-
"pages": [
190-
"dialog",
191-
"skyline/dialog"
192-
]
158+
"pages": ["dialog", "skyline/dialog"]
193159
},
194160
{
195161
"root": "pages/picker/",
196-
"pages": [
197-
"picker",
198-
"skyline/picker"
199-
]
162+
"pages": ["picker", "skyline/picker"]
200163
},
201164
{
202165
"root": "pages/rate/",
203-
"pages": [
204-
"rate"
205-
]
166+
"pages": ["rate"]
206167
},
207168
{
208169
"root": "pages/swiper/",
209-
"pages": [
210-
"swiper",
211-
"skyline/swiper"
212-
]
170+
"pages": ["swiper", "skyline/swiper"]
213171
},
214172
{
215173
"root": "pages/swipe-cell/",
216-
"pages": [
217-
"swipe-cell"
218-
]
174+
"pages": ["swipe-cell"]
219175
},
220176
{
221177
"root": "pages/tree-select/",
222-
"pages": [
223-
"tree-select"
224-
]
178+
"pages": ["tree-select"]
225179
},
226180
{
227181
"root": "pages/indexes/",
228-
"pages": [
229-
"indexes",
230-
"base/index",
231-
"custom/index"
232-
]
182+
"pages": ["indexes", "base/index", "custom/index"]
233183
}
234184
],
235185
"themeLocation": "theme.json",

0 commit comments

Comments
 (0)