Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(action-sheet): modify mobile problem #2692

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading