码迷,mamicode.com
首页 > 其他好文 > 详细

增加页面滚动条

时间:2019-10-11 18:30:40      阅读:283      评论:0      收藏:0      [点我收藏+]

标签:ati   flow   textarea   overflow   tag   enter   put   index   key   

增加页面滚动条

1、给el-drawer增加滚动条

直接添加这个属性名

custom-class="overflow-auto"
<el-drawer
      title="应用详情"
      :visible.sync="showServiceDialog"
      custom-class="overflow-auto"
      direction="rtl"
      size="70%">
      <el-form ref="serviceForm" label-width="110px" label-position="right"
               :model="registryInfo"
               :disabled="operationType === 'view'">
        <el-row :gutter="20">
          <el-col :span="10">
            <el-form-item label="应用名" prop="applicationName">
              <el-input v-model="registryInfo.appInfo.applicationName" :disabled="operationType === 'modify'" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="10">
            <el-form-item label="集群" prop="groupName">
              <el-input v-model="registryInfo.appInfo.groupName" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="10">
            <el-form-item label="元数据" prop="metadata">
              <el-input v-model="registryInfo.metadata" type="textarea" rows="8" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <el-lable style="padding: 20px">
        集群:{{ registryInfo.appInfo.groupName }}
      </el-lable>
      <el-table
        :data="registryInfo.instanceInfos"
        stripe
        style="width: 100%">
        <el-table-column
          prop="ip"
          label="IP"
          align="center" />
        <el-table-column
          prop="port"
          label="端口"
          align="center" />
        <el-table-column
          prop="weight"
          label="权重"
          align="center" />
        <el-table-column
          prop="healthy"
          label="健康状态"
          align="center">
          <template slot-scope="scope">
            <el-tag :type="scope.row.enable ? 'success' : 'danger'">
              {{ scope.row.enable ? 'true' : 'false' }}
            </el-tag>
          </template>
        </el-table-column>

        <el-table-column
          prop="metadata"
          label="元数据"
          align="center">
          <template slot-scope="scope">
            <p v-for="item in scope.row.metadata" :key="item">
              {{ item }}
            </p>

          </template>
        </el-table-column>


        <el-table-column
          fixed="right"
          label="操作"
          align="center" />
      </el-table>
    </el-drawer>

index.less

.overflow-auto {
  overflow: auto !important;
}

增加页面滚动条

标签:ati   flow   textarea   overflow   tag   enter   put   index   key   

原文地址:https://www.cnblogs.com/zhizhi0810/p/11655573.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!