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]新增window全屏模式,新增允许元素超出白色区域,新增距离底部距离 #42

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
21 changes: 19 additions & 2 deletions ui/components/ui-modal/ui-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
class="ui-modal"
:class="[align, tpl, name == target ? 'show' : 'hide', { 'bg-mask-80': mask||mask=='80'}, { 'bg-mask-20': mask == '20' }, { 'bg-mask-40': mask == '40'}]"
@tap="_cancel"
:style="{ top: (noNav ? 0 : sys_navBar + top) + 'px' }"
:style="{ top: (noNav ? 0 : sys_navBar + top) + 'px' , bottom : bottom +'rpx'}"
>
<view :style="dialog" class="ui-dialog" :class="[transparent? 'bg-none' : '',ui]" @tap.stop>
<view :style="{overflow : (visible ? 'visible' : 'hidden') , dialog}" class="ui-dialog" :class="[transparent? 'bg-none' : '',ui]" @tap.stop>
<view class="ui-modal-title border-bottom" v-if="title != ''"><ui-title :title="title" align="center" text="text-xl"></ui-title></view>
<slot v-if="name != 'sys_dialog'"></slot>
<view class="ui-modal-content" v-if="content != ''">{{ content }}</view>
Expand Down Expand Up @@ -96,6 +96,16 @@ export default {
top: {
type: Number,
default: 0
},
/* 白色区域向上偏移,多用于显示底部tabbar */
bottom :{
type:Number,
default:0
},
/* 是否允许内部组件超出白色区域*/
overflowVisible :{
type: Boolean,
default:false
}
},
data() {
Expand Down Expand Up @@ -161,6 +171,13 @@ export default {
perspective: 2000rpx;
transition: 0.3s;
pointer-events: none;
&.window{
.ui-dialog{
width: 100vw;
height: 100vh;
@include flex-center;
}
}
.ui-dialog {
position: relative;
display: inline-block;
Expand Down