levy9527 / nuxt-element-dashboard

⚡️develop your admin-dashboard fast
https://github.com/FEMessage/create-nuxt-app
MIT License
45 stars 36 forks source link

全局box-sizing: border-box导致el-time-picker组件滚动错位 #15

Closed zcqno1 closed 5 years ago

zcqno1 commented 5 years ago

el-time-picker image

检查发现错位原因是组件弹层的 .el-scrollbar__wrap 带有 box-sizing: border-box(从 global.less 里的全局设置继承)

解决办法

  1. 恢复 box-sizing
    .el-time-pannel .el-scrollbar__wrap {
    box-sizing: initial;
    }
  2. 调整偏移块高度(原为 80px)
    .el-time-spinner__list::after, .el-time-spinner__list::before {
    height: 72px;
    }
levy9527 commented 5 years ago

感谢反馈。@lianghx-319 看下怎么改合适。

2nthony commented 5 years ago

@femessage/create-nuxt-app 生成的 nuxt-element-dashboard 无此问题

他的做法是修改 global.less

*, *:before, *:after {
- box-sizing: border-box;
margin: 0;
}
levy9527 commented 5 years ago

问题在这里解决了:https://github.com/FEMessage/create-nuxt-app/releases/tag/v1.3.0