Skip to content

Commit

Permalink
fix(action-sheet): modify mobile problem
Browse files Browse the repository at this point in the history
  • Loading branch information
James-9696 committed Dec 24, 2024
1 parent 8d0429d commit 94bbfe0
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 10 deletions.
23 changes: 22 additions & 1 deletion examples/sites/demos/apis/actionsheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ export default {
},
mode: ['mobile'],
mobileDemo: 'ellipsis'
},
{
name: 'content-position',
type: 'Boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否显示action插槽',
'en-US': 'Whether to display action slots '
},
mode: ['mobile'],
mobileDemo: 'slot-action'
}
],
events: [
Expand Down Expand Up @@ -70,12 +81,22 @@ export default {
name: 'action',
defaultValue: '',
desc: {
'zh-CN': '<p>自定义操作项内容</p>',
'zh-CN': '<p>action插槽</p>',
'en-US': 'Click'
},
mode: ['mobile'],
mobileDemo: 'slot-action'
},
{
name: 'item',
defaultValue: '',
desc: {
'zh-CN': '<p>item插槽</p>',
'en-US': 'Click'
},
mode: ['mobile'],
mobileDemo: 'slot-item'
},
{
mode: []
}
Expand Down
1 change: 0 additions & 1 deletion examples/sites/demos/mobile/app/actionsheet/clickfn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
:visible="boxVisibility"
@update:visible="boxVisibility = $event"
@click="clickItem"
content-position
></tiny-action-sheet>
</div>
</template>
Expand Down
1 change: 0 additions & 1 deletion examples/sites/demos/mobile/app/actionsheet/ellipsis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
ellipsis
:visible="boxVisibility"
@update:visible="boxVisibility = $event"
content-position
></tiny-action-sheet>
</div>
</template>
Expand Down
8 changes: 7 additions & 1 deletion examples/sites/demos/mobile/app/actionsheet/slot-action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
:visible="boxVisibility"
@update:visible="boxVisibility = $event"
content-position
></tiny-action-sheet>
>
<template #item="data">
<div>
{{ data.item.label }}
</div>
</template>
</tiny-action-sheet>
</div>
</template>

Expand Down
1 change: 0 additions & 1 deletion examples/sites/demos/mobile/app/actionsheet/slot-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
:menus="menus"
:visible="boxVisibility"
@update:visible="boxVisibility = $event"
content-position
>
<template #item="data">
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
{
demoId: 'slot-item',
name: {
'zh-CN': '插槽',
'zh-CN': '数据插槽',
'en-US': 'events'
},
desc: {
Expand All @@ -41,7 +41,7 @@ export default {
{
demoId: 'slot-action',
name: {
'zh-CN': '插槽',
'zh-CN': 'action插槽',
'en-US': 'events'
},
desc: {
Expand Down
7 changes: 4 additions & 3 deletions packages/theme-mobile/src/action-sheet/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
.@{action-sheet-prefix-cls} {
.component-css-vars-action-sheet();

position: absolute;
bottom: 0;
width: 100%;
position: relative;
height: 100%;

&__mask {
top: 0;
Expand All @@ -42,6 +41,7 @@
transition: transform 0.3s;
z-index: 500;
overflow-y: scroll;
backface-visibility: hidden;
border-radius: 16px 16px 0px 0px;
&.is-toggle {
transform: translate(0, 0);
Expand Down Expand Up @@ -103,6 +103,7 @@

&__action {
width: 100%;
position: absolute;
background-color: var(--ti-mobile-action-sheet-action-bg-color, #fff);
}
}
Expand Down

0 comments on commit 94bbfe0

Please sign in to comment.