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
1. Background In the context of rapid updates and...
This article records the installation and configu...
Table of contents Requirements encountered in act...
Uninstall the old version of MySQL (skip this ste...
Docker Overview Docker is an open source software...
Some students said that they encountered the prob...
Preface So I wrote this blog. This blog also reco...
1. Run the .sh file You can run it directly using...
Create a user: create user 'oukele'@'...
The RHEL/CentOS series of Linux operating systems...
I finished learning SQL by myself not long ago, a...
Table of contents Importing JavaScript 1. Interna...
Table of contents 1. Data Type 1.1 Why do we need...
The one above shows the system time, and the one ...
Table of contents Causes of MySQL Table Fragmenta...