Skip to content

Commit 8352839

Browse files
committed
fix: 统一demo样式
1 parent 5301904 commit 8352839

File tree

9 files changed

+83
-81
lines changed

9 files changed

+83
-81
lines changed

copilot-demo/pages/Actions/index.axml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
<view class="navigation-bar" />
2+
13
<ant-container title="基础用法">
24
<ant-actions items="{{basicActions}}" onItemTap="handleTapAction" />
35
</ant-container>
46

5-
<ant-container title="配合bubble使用">
7+
<ant-container title="配合 Bubble 使用">
68
<ant-switch checked="{{ showBubble }}" onChange="toggleBubble" />
79
<ant-bubble
810
a:if="{{ showBubble }}"

copilot-demo/pages/Actions/index.json5

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
/// #if ALIPAY
77
"defaultTitle": "Actions",
8+
"transparentTitle": "auto",
9+
"titlePenetrate": "YES",
810
/// #endif
911

1012
"usingComponents": {

copilot-demo/pages/Bubble/index.json copilot-demo/pages/Bubble/index.json5

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
/// #if WECHAT
3+
"navigationBarTitleText": "Bubble",
4+
/// #endif
5+
6+
/// #if ALIPAY
7+
"defaultTitle": "Bubble",
8+
"transparentTitle": "auto",
9+
"titlePenetrate": "YES",
10+
/// #endif
211
"usingComponents": {
312
"ant-bubble": "../../../src/Bubble/index",
413
"ant-actions": "../../../src/Actions/index",

copilot-demo/pages/Bubble/index.less

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.navigation-bar {
2-
height: var(--tf-status-bar-height);
3-
}
4-
51
.ant-copilot-bubble-name {
62
font-weight: 400;
73
font-size: 24rpx;

copilot-demo/pages/Sender/index.axml

+52-57
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,56 @@
1-
<view class="page">
2-
<view class="content">
3-
<ant-container title="基础用法">
4-
<ant-sender value="{{value}}" onChange="handleChange" onSubmit="handleSend" />
5-
</ant-container>
1+
<view class="navigation-bar" />
62

7-
<ant-container title="发送loading状态">
8-
<ant-sender
9-
value="{{value1}}"
10-
placeholder="输入你想说的话..."
11-
onChange="handleChange1"
12-
onSubmit="handleSend1"
13-
onCancel="handleCancel"
14-
loading="{{loading}}"
15-
/>
16-
</ant-container>
173

18-
<ant-container title="禁用状态">
19-
<ant-sender disabled="{{true}}" placeholder="输入框已禁用" />
20-
</ant-container>
4+
<ant-container title="基础用法">
5+
<ant-sender value="{{value}}" onChange="handleChange" onSubmit="handleSend" />
6+
</ant-container>
7+
8+
<ant-container title="发送 loading 状态">
9+
<ant-sender
10+
value="{{value1}}"
11+
placeholder="输入你想说的话..."
12+
onChange="handleChange1"
13+
onSubmit="handleSend1"
14+
onCancel="handleCancel"
15+
loading="{{loading}}"
16+
/>
17+
</ant-container>
2118

22-
<ant-container title="配合upload组件">
23-
<ant-sender
24-
value="{{value3}}"
25-
placeholder="可以配合其他组件使用"
26-
onChange="handleChange3"
27-
onSubmit="handleSend3"
28-
>
29-
<view slot="input-header">
30-
<ant-upload defaultFileList="{{[{ url: 'https://gw.alipayobjects.com/mdn/rms_226d75/afts/img/A*znK_ToIL8rQAAAAAAAAAAAAAARQnAQ', status: 'done' }]}}" />
31-
</view>
32-
</ant-sender>
33-
</ant-container>
19+
<ant-container title="禁用状态">
20+
<ant-sender disabled="{{true}}" placeholder="输入框已禁用" />
21+
</ant-container>
3422

35-
<ant-container title="配合bubble和prompts">
36-
<scroll-view scroll-y style="height: 600rpx;" scroll-into-view="{{scrollToView}}">
37-
<view a:for="{{bubbleList}}" id="msg-{{index}}">
38-
<ant-bubble
39-
content="{{item.content}}"
40-
placement="{{index%2 ? 'end' : 'start'}}"
41-
shape="{{index%2 ? 'corner' : 'default'}}"
42-
typing="{{index%2 === 0}}"
43-
/>
44-
</view>
45-
</scroll-view>
46-
<ant-sender
47-
value="{{value4}}"
48-
placeholder="组合使用"
49-
onChange="handleChange4"
50-
onSubmit="handleSend4"
51-
>
52-
<ant-prompts
53-
slot="header"
54-
items="{{horizontalList}}"
55-
vertical="{{false}}"
56-
onItemTap="onItemTap"
57-
></ant-prompts>
58-
</ant-sender>
59-
</ant-container>
60-
</view>
61-
</view>
23+
<ant-container title="配合 ImageUpload 组件">
24+
<ant-sender
25+
value="{{value3}}"
26+
placeholder="可以配合其他组件使用"
27+
onChange="handleChange3"
28+
onSubmit="handleSend3"
29+
>
30+
<view slot="input-header">
31+
<ant-upload defaultFileList="{{[{ url: 'https://gw.alipayobjects.com/mdn/rms_226d75/afts/img/A*znK_ToIL8rQAAAAAAAAAAAAAARQnAQ', status: 'done' }]}}" />
32+
</view>
33+
</ant-sender>
34+
</ant-container>
35+
36+
<ant-container title="配合 Bubble 和 Prompts">
37+
<scroll-view scroll-y style="height: 600rpx;" scroll-into-view="{{scrollToView}}">
38+
<view a:for="{{bubbleList}}" id="msg-{{index}}">
39+
<ant-bubble
40+
content="{{item.content}}"
41+
placement="{{index%2 ? 'end' : 'start'}}"
42+
shape="{{index%2 ? 'corner' : 'default'}}"
43+
typing="{{index%2 === 0}}"
44+
/>
45+
</view>
46+
</scroll-view>
47+
<ant-sender value="{{value4}}" placeholder="组合使用" onChange="handleChange4" onSubmit="handleSend4">
48+
<ant-prompts
49+
slot="header"
50+
items="{{horizontalList}}"
51+
vertical="{{false}}"
52+
onItemTap="onItemTap"
53+
>
54+
</ant-prompts>
55+
</ant-sender>
56+
</ant-container>

copilot-demo/pages/Sender/index.json copilot-demo/pages/Sender/index.json5

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
/// #if WECHAT
3+
"navigationBarTitleText": "Sender",
4+
/// #endif
5+
6+
/// #if ALIPAY
7+
"defaultTitle": "Sender",
8+
"transparentTitle": "auto",
9+
"titlePenetrate": "YES",
10+
/// #endif
211
"usingComponents": {
312
"ant-sender": "../../../src/Sender/index",
413
"ant-upload": "../../../src/ImageUpload/index",

copilot-demo/pages/Sender/index.less

-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +0,0 @@
1-
.page {
2-
min-height: 100vh;
3-
background: var(--color-background);
4-
box-sizing: border-box;
5-
padding-bottom: 200rpx;
6-
}
7-
8-
.navigation-bar {
9-
margin-bottom: 24rpx;
10-
height: var(--tf-status-bar-height);
11-
}
12-
13-
.content {
14-
padding: 24rpx;
15-
}

copilot-demo/pages/ThoughtChain/index.json5

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
/// #if WECHAT
3-
"navigationBarTitleText": "ThoughtChain 组件",
3+
"navigationBarTitleText": "ThoughtChain",
44
/// #endif
55

66
/// #if ALIPAY
7-
"defaultTitle": "ThoughtChain 组件",
7+
"defaultTitle": "ThoughtChain",
8+
"transparentTitle": "auto",
9+
"titlePenetrate": "YES",
810
/// #endif
911

1012
"usingComponents": {

copilot-demo/pages/Welcome/index.json5

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
/// #if WECHAT
3-
"navigationBarTitleText": "Welcome 组件",
3+
"navigationBarTitleText": "Welcome",
44
/// #endif
55

66
/// #if ALIPAY
7-
"defaultTitle": "Welcome 组件",
7+
"defaultTitle": "Welcome",
8+
"transparentTitle": "auto",
9+
"titlePenetrate": "YES",
810
/// #endif
911

1012
"usingComponents": {

0 commit comments

Comments
 (0)