0.0.3 • Published 1 year ago

@frontend_worker/v-table-height v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

出现的频率较高,表格或卡片高度自适应

image

import tableHeight from '@frontend_worker/v-table-height/dist/tableHeight'

Vue.use(tableHeight)
<el-table
    :data="tableData"
    v-table-height="{bottomOffset: 70, callback: height => tableHeight = height}"
    :max-height="tableHeight"
    style="width: 100%">
    <el-table-column
        width="100"
        label="序号"
        type="index"
        :index="indexMethod">
    </el-table-column>    
    <el-table-column
        prop="createTime"
        label="融资编号">
    </el-table-column>
    <el-table-column
        prop="dictLabel"
        label="供应商名称">
    </el-table-column>
    <el-table-column
        prop="dictType"
        label="商品信息">
    </el-table-column>
    <el-table-column
        prop="dictLabel"
        label="融资金额(元)">
    </el-table-column>
    <el-table-column
        prop="dictType"
        label="状态">
    </el-table-column>
    <el-table-column
        prop="opt"
        width="200"
        label="操作">
        <template slot-scope="scope">
          <div
              class="primary-color pointer"
              @click="goToDeal(scope.row)">审核</div>
        </template>
    </el-table-column>
</el-table>
export default {
    data() {
        return {
            tableHeight: 0,
        };
    },
}
属性说明类型默认值
bottomOffset底部偏移量Number0
callback回调事件event返回一个高度
0.0.3

1 year ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago