Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@2.12.0/lib/index.js"></script>
<link rel="stylesheet" href="//unpkg.com/element-ui@2.12.0/lib/theme-chalk/index.css">
<div id="app">
<template>
  <div class="page-content">
    <div class="page-head">
     <el-row class="query-box">
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-select
              placeholder="请选择"
          >
            <el-option label="全选" value=""></el-option>
          </el-select>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-input size="mini" class="query-input"></el-input>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-input size="mini" class="query-input half-mini-input"></el-input>
          <span class="division-line">~</span>
          <el-input size="mini" class="query-input half-mini-input"></el-input>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-select
              placeholder="请选择"
          >
            <el-option label="全选" value=""></el-option>
          </el-select>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-input size="mini" class="query-input"></el-input>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-input size="mini" class="query-input half-mini-input"></el-input>
          <span class="division-line">~</span>
          <el-input size="mini" class="query-input half-mini-input"></el-input>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-select
              placeholder="请选择"
          >
            <el-option label="全选" value=""></el-option>
          </el-select>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-input size="mini" class="query-input"></el-input>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-input size="mini" class="query-input half-mini-input"></el-input>
          <span class="division-line">~</span>
          <el-input size="mini" class="query-input half-mini-input"></el-input>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-select
              placeholder="请选择"
          >
            <el-option label="全选" value=""></el-option>
          </el-select>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-input size="mini" class="query-input"></el-input>
        </el-col>
        <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="3" class="query-item">
          <span class="query-title">XXXX:</span>
          <el-input size="mini" class="query-input half-mini-input"></el-input>
          <span class="division-line">~</span>
          <el-input size="mini" class="query-input half-mini-input"></el-input>
        </el-col>
      </el-row>

    </div>

    <div class="page-body">
      <div class="table-box">
        <el-table
          border
          class="question-table"
          :data="tableData"
          height="100%"
      >
        <el-table-column
            prop="date"
            label="日期"
            width="180">
        </el-table-column>
        <el-table-column
            prop="name"
            label="姓名"
            width="180">
        </el-table-column>
        <el-table-column
            prop="address"
            label="地址"
            width="300">
        </el-table-column>
        <el-table-column
            prop="address"
            label="地址"
            width="300">
        </el-table-column>
        <el-table-column
            prop="address"
            label="地址"
            width="300">
        </el-table-column>
        <el-table-column
            prop="address"
            label="地址"
            width="300">
        </el-table-column>
      </el-table>
      </div>
      
    </div>

    <div class="page-foot">
      <p>底部内容</p>
    </div>

  </div>
</template>
</div>
              
            
!

CSS

              
                *
  box-sizing: border-box
  
  
html,body
  width: 100%
  height: 100%
#app
  width: 100%
  height: 100%
.page-content
  height: 100%
  display: flex
  flex-direction: column
  padding: 10px

.page-head
  flex-shrink: 0
  padding: 10px
  border: 1px solid #f0f0f0


.page-body
  flex: 1
  overflow: auto
  padding: 10px 0
  background-color: #fff
  .table-box  
    overflow: auto
    height: 100%

.page-foot
  flex-shrink: 0
  padding: 10px
  background-color: #e8e8e8


.split-line
  /* 分割线
  border-bottom: 1px solid #EEEEEE

.query-box
  /* 搜索框容器
  position: relative
  font-size: 0
  .btn-search
    width: 100%
  .query-item
    padding-left: 50px
    position: relative
    text-align: left
    margin: 5px 0
  .query-title
    display: inline-block
    max-width: 70px
    padding-right: 3px
    vertical-align: top
    font-size: 12px
    line-height: 28px
    position: absolute
    top: 0
    left: 50px
    transform: translateX(-100%)
    &.long-title
      line-height: 14px
  .query-input
    display: inline-block
    vertical-align: top
    .el-input__inner
      padding-left: 8px
  .half-mini-input
    width: calc(50% - 6px)
    &:last-child
      float: right
  .division-line
    display: inline-block
    width: 12px
    text-align: center
    height: 28px
    line-height: 28px
    font-size: 14px
  .el-select
    width: 100%
  .el-checkbox
    margin: 5px
    .el-checkbox__label
      padding-left: 5px

              
            
!

JS

              
                var Main = {
      data() {
      const generateData = _ => {
        const data = [];
        for (let i = 1; i <= 115; i++) {
          data.push({
            date: '2016-05-02',
            name: '王小虎'+i,
            address: '上海市普陀区金沙江路 1518 弄',
          });
        }
        return data;
      };
      return {
        tableData: generateData()
      }
    },
      methods:{
        setRowClassName(row) {
          console.log(row)
       
        if (row.row.selected) {
          return 'selected';
        }
        return '';
      },
      }
    }
Vue.use(ELEMENT,{size:'mini'});
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
              
            
!
999px

Console