首页 > 其他分享 >element-ui的collapse中嵌套table表格 的 高度跳跃 问题

element-ui的collapse中嵌套table表格 的 高度跳跃 问题

时间:2023-02-16 17:34:48浏览次数:46  
标签:collapse 王小虎 普陀区 element ui address date prop name

 

 

<script src="//unpkg.com/[email protected]/dist/vue.js"></script>
<script src="//unpkg.com/[email protected]/lib/index.js"></script>
<div id="app">
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item title="一致性 Consistency" name="1">
<el-table
ref="table1"
:data="tableData"
border
style="width: 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="地址">
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item title="反馈 Feedback" name="2">
<el-table
:data="tableData2"
border
style="width: 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="地址">
</el-table-column>
</el-collapse-item>
</el-collapse>
</div>

 

 

 

 

 

 

 

 

var Main = {
data() {
return {
activeNames: ['1'],
tableData: [{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
tableData2: [{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}]
};
},
watch: {
activeNames(newV) {
this.$refs.table1.$ready = false
}
},
methods: {
handleChange(val) {
console.log(val);
}
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')

标签:collapse,王小虎,普陀区,element,ui,address,date,prop,name
From: https://www.cnblogs.com/wsj1/p/17127534.html

相关文章