Rendering I don’t know if it’s because the company’s computers are slow or if there’s a software problem that causes the recorded motion graphics to be so laggy, but it doesn’t lag in actual operation. Code: Page display code: The main code is The entire code flow is as follows: // Use map structure to save translation list this.WebsiteLangMap.set(id,response.rows) At this point there is still a problem. this.websiteLangTableKey = !this.websiteLangTableKey; The following is the core code: <el-table v-loading="loading" :data="websiteList" @selection-change="handleSelectionChange" ref="table" key="websiteTable" row-key="id" style="width: 100%; maxin-bottom: 20px;" border > <el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column :label="td('primary key')" align="center" prop="id" /> --> <el-table-column :label="td('Parent navigation')" align="center" prop="parentId" /> <el-table-column :label="td('Navigation Name')" align="center" prop="barName" > <template slot-scope="scope" > <el-link type="primary" :underline="false" @click="toogleExpand(scope.row)" > {{scope.row.barName}} </el-link> </template> </el-table-column> <el-table-column :label="td('Is it a link')" align="center" prop="isLink" /> <el-table-column :label="td('Link address')" align="center" prop="url" /> <el-table-column :label="td('Creation Date')" align="center" prop="createTime" /> <el-table-column :label="td('Create User')" align="center" prop="createBy" /> <el-table-column :label="td('Update time')" align="center" prop="updateTime" /> <el-table-column :label="td('Update User')" align="center" prop="updateBy" /> <el-table-column :label="td('Remarks')" align="center" prop="remark" /> <el-table-column :label="td('Operation')" align="center" width="130" class-name="small-padding fixed-width" fixed="right"> <template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['cms:website:edit']" >{{td("Modify")}} </el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['cms:website:remove']" >{{td("Delete")}}</el-button> </template> </el-table-column> <el-table-column type="expand" width="1" > <template slot-scope="scope"> <el-table v-loading="loading" style="width: 100%" row-key="langId" :key="websiteLangTableKey" :data="WebsiteLangMap.get(scope.row.id)" class="table-in-table" > <!-- <el-table-column :label="td('ID primary key')" align="center" prop="langId" /> --> <!-- <el-table-column :label="td('Navigation ID')" align="center" prop="webId" /> --> <el-table-column :label="td('Language Code')" align="center" prop="langCode" /> <el-table-column :label="td('Language Name')" align="center" prop="langName" /> <el-table-column :label="td('中文')" align="center" prop="langCn" /> <el-table-column :label="td('Language Translation')" align="center" prop="langTranslate" /> <el-table-column :label="td('Remarks')" align="center" prop="remark" /> <el-table-column :label="td('Operation')" align="center" width="130" class-name="small-padding fixed-width" fixed="right"> <template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateLang(scope.row)" v-hasPermi="['cms:websiteLang:edit']" >{{td("Modify")}} </el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteLang(scope.row)" v-hasPermi="['cms:websiteLang:remove']" >{{td("Delete")}}</el-button> </template> </el-table-column> </el-table> </template> </el-table-column> </el-table> //Embedded table toogleExpand(row) { this.getListLang(row.id); let $table = this.$refs.table; $table.toggleRowExpansion(row) }, /** Query navigation translation list*/ getListLang(id) { // Get the translation list based on the navigation ID this.LangQueryParams.webId = id; listWebsiteLang(this.LangQueryParams).then(response => { // Use map structure to save translation list this.WebsiteLangMap.set(id,response.rows) this.websiteLangTableKey = !this.websiteLangTableKey; this.resetLang(); }); }, <style lang="scss" scoped> .app-container { ::v-deep { .el-table th { background: #ddeeff; } .el-table__expanded-cell { border-bottom: 0px; border-right: 0px; padding: 0px 0px 0px 47px; } } .table-in-table { border-top: 0px; } } </style> This concludes this article about the example of how to implement embedded table in vue+elementUI. For more relevant vue element embedded table content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Deployment and configuration of Apache service under Linux
The solution to the background tiling or border br...
After switching from Vue2's writing style to ...
Mysql installation, configuration, and optimizati...
Preface I made a loading style component before. ...
Solution to the problem of automatic disconnectio...
1. What is Docker Swarm? Docker Swarm is a cluste...
The implementation principle of chain programming...
# contains a location information. The default anc...
Update: Recently, it was discovered that the serv...
The correspondence between tensorflow version and...
Table of contents 1. Features 2. Examples 3. Opti...
Table of contents Props comparison of class compo...
Table of contents 1. Union Type 2. Crossover Type...
In this section, the author describes the special...
As shown in the figure: Table Data For such a tre...