问题描述:
最近使用el-table的时候,加上子el-table(type=“expand”)后在safari浏览器上会报ResizeObserver loop completed with undelivered notifications:
@Override
<el-table
ref="goodInfoTable"
:data="form.tableData"
style="width: 100%"
row-class-name='row-expand-has'
default-expand-all
>
<el-table-column type="expand" class-name="good-child">
<template slot-scope="scope" v-if="scope.row['iscombination']">
<el-table :data="scope.row.commodityMixItemsList" class="two-list" :show-header="false">
<el-table-column width="270" class-name="good-attr" prop="goodName" label="商品信息" :show-overflow-tooltip='true'>
</el-table-column>
原因分析:
没有给子el-table加宽,也没有给子el-table-column加type
解决方案:
给子el-table加宽style=“width: 100%”
然后再给el-table-column加上 type=“index”
问题就解决了
@Override
<el-table
ref="goodInfoTable"
:data="form.tableData"
style="width: 100%"
row-class-name='row-expand-has'
default-expand-all
>
<el-table-column type="expand" class-name="good-child">
<template slot-scope="scope" v-if="scope.row['iscombination']">
<el-table :data="scope.row.commodityMixItemsList" class="two-list" :show-header="false" style="width: 100%">
<el-table-column width="270" type="index" class-name="good-attr" prop="goodName" label="商品信息" :show-overflow-tooltip='true'>
</el-table-column>