原文链接:https://blog.csdn.net/qq_42335214/article/details/112705193?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2aggregatepagefirst_rank_ecpm_v1~rank_aggregation-17-112705193.pc_agg_rank_aggregation&utm_term=elementui%E6%97%A5%E6%9C%9F%E6%97%B6%E9%97%B4%E9%80%89%E6%8B%A9%E5%99%A8%E5%8F%AA%E8%83%BD%E9%80%89%E5%88%B0%E5%B0%8F%E6%97%B6&spm=1000.2123.3001.4430
在组件上添加补充类名popper-class="noneMinute",然后在css中添加样式,切记不能放在scoped中。

<DatePicker
  v-model="time"
  type="datetimerange"
  format="yyyy-MM-dd H"
  value-format="yyyy-MM-dd H"
  range-separator=""
  start-placeholder="开始日期"
  end-placeholder="结束日期"
  popper-class="noneMinute"
>
</DatePicker>
.noneMinute .el-time-spinner__wrapper{
    width: 100%
}   
.noneMinute .el-scrollbar:nth-of-type(2){
   display: none
}
GitHub 加速计划 / eleme / element
54.06 K
14.63 K
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:2 个月前 )
c345bb45 6 个月前
a07f3a59 * Update transition.md * Update table.md * Update transition.md * Update table.md * Update transition.md * Update table.md * Update table.md * Update transition.md * Update popover.md 7 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐