为什么page-container弹出的框不是半页式?

小程序 文章 2022-02-23 15:00 716 0 全屏看文

AI助手支持GPT4.0

为什么page-container弹出的框不是半页式?Why is the page-container popup box not half-paged?

为什么page-container弹出的框不是半页式?
  data: {    showfalse,    duration: 300,    position: 'right',    round: true,    overlay: true,    customStyle: '99',    overlayStyle: '999'  },  popup(res){    const position = res.currentTarget.dataset.position    let customStyle = ''    let duration = this.data.duration    switch(position) {      case 'top':      case 'bottom':         customStyle = 'height: 50%;'        break      case 'right':        break    }    customStyle = 'height:50;'    this.setData({      position,      showtrue,      customStyle,      duration    })      },  onAfterLeave(res) {    // console.log(res)  },

  data: {    show: false,    duration: 300,    position: 'right',    round: true,    overlay: true,    customStyle: '99',    overlayStyle: '999'  },  popup(res){    const position = res.currentTarget.dataset.position    let customStyle = ''    let duration = this.data.duration    switch(position) {      case 'top':      case 'bottom':         customStyle = 'height: 50%;'        break      case 'right':        break    }    customStyle = 'height:50;'    this.setData({      position,      show: true,      customStyle,      duration    })      },  onAfterLeave(res) {    // console.log(res)  },

回答:

老张:

1、改成position:'bottom'

谦🍂:改了 不知道为啥没变化
brave:
customStyle = 'height:50vh;'
谦🍂:改了 没变化
谦🍂:丢了 在评论区
brave:自己都没绑定。。。。
谦🍂:这样啊 感谢

-EOF-

AI助手支持GPT4.0