chore: chore: fui-date-picker top配置 改成 panelTop

This commit is contained in:
Hefeng
2023-08-31 16:41:46 +08:00
parent bf349274c7
commit 718b94ee21

View File

@ -5,7 +5,7 @@
:style="maskStyl" ref="fui_dpkm_ani" @tap.stop="maskClick"></view> :style="maskStyl" ref="fui_dpkm_ani" @tap.stop="maskClick"></view>
<!-- fix此处key值可解决Nvue端动态切换背景不生效的问题 --> <!-- fix此处key值可解决Nvue端动态切换背景不生效的问题 -->
<view :style="topBottom" :key="theme" <view :style="topBottom" :key="theme"
:class="{ 'fui-dpk__content-dark': theme === 'dark', 'fui-dpk__content-light': theme !== 'dark', 'fui-dpk__content-show': isShow&&(!top && top!==0), 'fui-dpk__content-show_top': isShow&&(top || top===0),'fui-date__picker-radius': radius,'fui-date__picker-content_top':top || top===0, 'fui-date__picker-content':!top && top!==0}" :class="{ 'fui-dpk__content-dark': theme === 'dark', 'fui-dpk__content-light': theme !== 'dark', 'fui-dpk__content-show': isShow&&(!panelTop && panelTop!==0), 'fui-dpk__content-show_top': isShow&&(panelTop || panelTop===0),'fui-date__picker-radius': radius,'fui-date__picker-content_top':panelTop || panelTop===0, 'fui-date__picker-content':!panelTop && panelTop!==0}"
ref="fui_dpk_ani"> ref="fui_dpk_ani">
<view class="fui-date__picker-header" <view class="fui-date__picker-header"
:class="{ 'fui-dpk__header-dark': theme === 'dark', 'fui-date__picker-radius': radius }" :style="headerStyl"> :class="{ 'fui-dpk__header-dark': theme === 'dark', 'fui-date__picker-radius': radius }" :style="headerStyl">
@ -391,7 +391,7 @@ export default {
type: [Number, String], type: [Number, String],
default: 0 default: 0
}, },
top: { panelTop: {
type: [Number, String], type: [Number, String],
default: undefined default: undefined
}, },
@ -457,8 +457,8 @@ export default {
return styles return styles
}, },
maskStyl() { maskStyl() {
if (this.top || this.top ===0) if (this.panelTop || this.panelTop ===0)
return `top:${Number(this.top)}rpx;background:${this.maskBackground};z-index:${Number(this.zIndex - 10)};` return `top:${Number(this.panelTop)}rpx;background:${this.maskBackground};z-index:${Number(this.zIndex - 10)};`
else else
return `background:${this.maskBackground};z-index:${Number(this.zIndex - 10)};` return `background:${this.maskBackground};z-index:${Number(this.zIndex - 10)};`
@ -467,8 +467,8 @@ export default {
}, },
topBottom() { topBottom() {
if (this.top || this.top ===0) if (this.panelTop || this.panelTop ===0)
return `top:${Number(this.top)}rpx;z-index: ${Number(this.zIndex)}` return `top:${Number(this.panelTop)}rpx;z-index: ${Number(this.zIndex)}`
else else
return `z-index: ${Number(this.zIndex)}` return `z-index: ${Number(this.zIndex)}`