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
MySQL supports nested transactions, but not many ...
Table of contents Preface Introduction-Official E...
Preface This article introduces how to use the ne...
Before using jQuery to complete the fade-in and f...
hint This plug-in can only be accessed under the ...
Preface The Boost library is a portable, source-c...
Mainly use the preserve-3d and perspective proper...
For various reasons, sometimes you need to modify...
Preface Recently, when working on a high-availabi...
First, let’s take a look at a CSS carousel animat...
Table of contents Preface: 1. Concept 2. The bene...
The blogger said : I have been writing a series o...
MySQL query not using index aggregation As we all...
Table of contents 1. this keyword 2. Custom attri...
1. Arrange CSS in alphabetical order Not in alphab...