<template> <div> <el-table :data="data" height="300" border :show-header="true" style="width: 100%;margin-top: 10px" > <el-table-column v-for="column of columns" :key="column.id" :prop="column.value" :label="column.text" :width="column.width" align="center"></el-table-column> </el-table> </div> </template> <script> export default { props:{ columns:{ type: Array, default:()=>[] }, data:{ type:Array, default:()=>[] } } } </script> <style></style>