已训练完毕,聚类分为5组 <_el-divider">
当前位置:   article > 正文

element-ui中分割线<el-divider>标签修改间距与虚线样式

el-divider
<template>
    <div style="margin-left:5%;margin-right:5%;">
      <el-row>
        <div style="height:200px">

        </div>
      </el-row>
      <el-row>
        <span>已训练完毕,聚类分为5组</span>
      </el-row>
      <el-divider></el-divider>
      <el-row style="text-align: center">
        <img src="@/assets/algorithm_demo3.png" style="margin: 0 auto;">
      </el-row>
      <el-row>
        <el-collapse v-model="activeNames" @change="handleChange">

          <el-row v-for="(item,index) in objArr">
            <el-collapse-item :title="'当前为第'+item.id+'组,共'+item.list+'条,为您展示前10条数据'" :name="index">
              <div class="infinite-list-wrapper" style="overflow:auto;height: 200px" v-infinite-scroll="load" infinite-scroll-disabled="disabled">
                <ul class="list" >
                  <li v-for="i in count" class="list-item">{{ i }}</li>
                </ul>
                <p v-if="loading">加载中...</p>
                <p v-if="noMore">没有更多了</p>
              </div>
            </el-collapse-item>
          </el-row>

        </el-collapse>
      </el-row>

    </div>
</template>

<script>
    export default {
        name: "slider3",
        data() {
          return{
            count: 10,
            loading: false,
            activeNames: ['1'],
            objArr: [
              {id: 1,
                list: 200
              },
              {
                id: 2,
                list: 2000
              },
              {
                id: 3,
                list: 5000
              },
              {
                id: 4,
                list: 4600
              },
              {
                id: 5,
                list: 30000
              }
            ]
          }
        },
      computed: {
        noMore () {
          return this.count >= 20
        },
        disabled () {
          return this.loading || this.noMore
        }
      },
      methods: {
        load () {
          this.loading = true
          setTimeout(() => {
            this.count += 2
            this.loading = false
          }, 2000)
        }
      }
    }
</script>

<style scoped>
  .el-divider{
    margin: 8px 0;
    background: 0 0;
    border-top: 1px solid #E6EBF5;
  }
</style>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94

发现element-ui的分割线间距有点大,且未提供虚线样式。
于是使用了下面链接文章的方式
https://blog.csdn.net/zzzsheng/article/details/104000968

在最下方直接修改原来的样式

/* el-divider 修改高度&虚线效果 */
 .el-divider--horizontal{
     margin: 8px 0;
     background: 0 0;
     border-top: 1px dashed #e8eaec;
 } 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

效果图如下:
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/113640
推荐阅读
相关标签