Skip to content

Commit e816b1b

Browse files
authored
fix(action-sheet): modify mobile problem (#2692)
1 parent 647561d commit e816b1b

File tree

7 files changed

+35
-10
lines changed

7 files changed

+35
-10
lines changed

examples/sites/demos/apis/actionsheet.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ export default {
3737
},
3838
mode: ['mobile'],
3939
mobileDemo: 'ellipsis'
40+
},
41+
{
42+
name: 'content-position',
43+
type: 'Boolean',
44+
defaultValue: 'false',
45+
desc: {
46+
'zh-CN': '是否显示action插槽',
47+
'en-US': 'Whether to display action slots '
48+
},
49+
mode: ['mobile'],
50+
mobileDemo: 'slot-action'
4051
}
4152
],
4253
events: [
@@ -70,12 +81,22 @@ export default {
7081
name: 'action',
7182
defaultValue: '',
7283
desc: {
73-
'zh-CN': '<p>自定义操作项内容</p>',
84+
'zh-CN': '<p>action插槽</p>',
7485
'en-US': 'Click'
7586
},
7687
mode: ['mobile'],
7788
mobileDemo: 'slot-action'
7889
},
90+
{
91+
name: 'item',
92+
defaultValue: '',
93+
desc: {
94+
'zh-CN': '<p>item插槽</p>',
95+
'en-US': 'Click'
96+
},
97+
mode: ['mobile'],
98+
mobileDemo: 'slot-item'
99+
},
79100
{
80101
mode: []
81102
}

examples/sites/demos/mobile/app/actionsheet/clickfn.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
:visible="boxVisibility"
1212
@update:visible="boxVisibility = $event"
1313
@click="clickItem"
14-
content-position
1514
></tiny-action-sheet>
1615
</div>
1716
</template>

examples/sites/demos/mobile/app/actionsheet/ellipsis.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
ellipsis
1212
:visible="boxVisibility"
1313
@update:visible="boxVisibility = $event"
14-
content-position
1514
></tiny-action-sheet>
1615
</div>
1716
</template>

examples/sites/demos/mobile/app/actionsheet/slot-action.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
:visible="boxVisibility"
1313
@update:visible="boxVisibility = $event"
1414
content-position
15-
></tiny-action-sheet>
15+
>
16+
<template #item="data">
17+
<div>
18+
{{ data.item.label }}
19+
</div>
20+
</template>
21+
</tiny-action-sheet>
1622
</div>
1723
</template>
1824

examples/sites/demos/mobile/app/actionsheet/slot-item.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
:menus="menus"
1111
:visible="boxVisibility"
1212
@update:visible="boxVisibility = $event"
13-
content-position
1413
>
1514
<template #item="data">
1615
<div>

examples/sites/demos/mobile/app/actionsheet/webdoc/actionsheet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default {
2929
{
3030
demoId: 'slot-item',
3131
name: {
32-
'zh-CN': '插槽',
32+
'zh-CN': '数据插槽',
3333
'en-US': 'events'
3434
},
3535
desc: {
@@ -41,7 +41,7 @@ export default {
4141
{
4242
demoId: 'slot-action',
4343
name: {
44-
'zh-CN': '插槽',
44+
'zh-CN': 'action插槽',
4545
'en-US': 'events'
4646
},
4747
desc: {

packages/theme-mobile/src/action-sheet/index.less

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
.@{action-sheet-prefix-cls} {
2020
.component-css-vars-action-sheet();
2121

22-
position: absolute;
23-
bottom: 0;
24-
width: 100%;
22+
position: relative;
23+
height: 100%;
2524

2625
&__mask {
2726
top: 0;
@@ -42,6 +41,7 @@
4241
transition: transform 0.3s;
4342
z-index: 500;
4443
overflow-y: scroll;
44+
backface-visibility: hidden;
4545
border-radius: 16px 16px 0px 0px;
4646
&.is-toggle {
4747
transform: translate(0, 0);
@@ -103,6 +103,7 @@
103103

104104
&__action {
105105
width: 100%;
106+
position: absolute;
106107
background-color: var(--ti-mobile-action-sheet-action-bg-color, #fff);
107108
}
108109
}

0 commit comments

Comments
 (0)