The page stutters when there are too many el-select,select options nested in el-table

topic description

there is a table to display color information, and each row has a drop-down selection component that can be used to select a variety of colors (there may be thousands of color data). There is also a button, click the button to add a new line.

related codes

<el-table-column label="" prop="colorCode">
    <template scope="scope">
        <mc-input :readOnly="batchColorData.readOnly" :colors="colors"                 
         :obj="scope.row" attr="colorCode" attrDesc="colorName"></mc-input>
    </template>
</el-table-column>

what result do you expect? What is the error message actually seen?

problem description

mc-input is an el-select component I encapsulated. The problem now is that the page is particularly stuffy. When there are many select options, there will be thousands of pieces of data. When I add a new row or click the drop-down box to select a color, the page reaction time is very long. How can we solve the problem of stutter on the page?


Master Lou, Hello ~
provides two ideas.
1, bulk loading or paging loading of data. Portal
2. When the page is loaded, the data is requested to load asynchronously (wrapped with setTimeout () ) and rendered

Menu