chore: chore: fui-date-picker top配置 改成 panelTop
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
:style="maskStyl" ref="fui_dpkm_ani" @tap.stop="maskClick"></view>
|
||||
<!-- fix:此处key值可解决Nvue端动态切换背景不生效的问题 -->
|
||||
<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">
|
||||
<view class="fui-date__picker-header"
|
||||
:class="{ 'fui-dpk__header-dark': theme === 'dark', 'fui-date__picker-radius': radius }" :style="headerStyl">
|
||||
@ -391,7 +391,7 @@ export default {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
top: {
|
||||
panelTop: {
|
||||
type: [Number, String],
|
||||
default: undefined
|
||||
},
|
||||
@ -457,8 +457,8 @@ export default {
|
||||
return styles
|
||||
},
|
||||
maskStyl() {
|
||||
if (this.top || this.top ===0)
|
||||
return `top:${Number(this.top)}rpx;background:${this.maskBackground};z-index:${Number(this.zIndex - 10)};`
|
||||
if (this.panelTop || this.panelTop ===0)
|
||||
return `top:${Number(this.panelTop)}rpx;background:${this.maskBackground};z-index:${Number(this.zIndex - 10)};`
|
||||
else
|
||||
return `background:${this.maskBackground};z-index:${Number(this.zIndex - 10)};`
|
||||
|
||||
@ -467,8 +467,8 @@ export default {
|
||||
|
||||
},
|
||||
topBottom() {
|
||||
if (this.top || this.top ===0)
|
||||
return `top:${Number(this.top)}rpx;z-index: ${Number(this.zIndex)}`
|
||||
if (this.panelTop || this.panelTop ===0)
|
||||
return `top:${Number(this.panelTop)}rpx;z-index: ${Number(this.zIndex)}`
|
||||
else
|
||||
return `z-index: ${Number(this.zIndex)}`
|
||||
|
||||
|
Reference in New Issue
Block a user