Code Monkey home page Code Monkey logo

Comments (4)

unix avatar unix commented on May 17, 2024

你这里的代码标签都没有闭合,应该是不能正常工作的。另外请用代码格式贴上代码。

from element-angular.

yinjs avatar yinjs commented on May 17, 2024

<el-table class="app-list-content-table" *ngIf="companyList" [model]="companyList.elements"> <el-table-column model-key="id" label="ID" width="300"></el-table-column> <el-table-column model-key="name" label="Name" width="250"></el-table-column> <el-table-column label="Actions" width="120"> <ng-template #slot let-scope="scope"> <el-button type="text" size="small"> <a [routerLink]="['/companies', scope.rowData.id]" routerLinkActive="active">View</a> </el-button> <el-button type="text" size="small" *ngIf="scope.rowData?.blocked" (click)="setBlock(scope.rowData.id, false)">Unblock</el-button> <el-button type="text" size="small" *ngIf="!scope.rowData?.blocked" (click)="setBlock(scope.rowData.blocked, true)">Block</el-button> </ng-template> </el-table-column> </el-table>

from element-angular.

yinjs avatar yinjs commented on May 17, 2024

如果在table column中加一列block先把值读出来是有true/false的,最后一列中的ngif也能正常了,但是我不想要显式的出来block列,只是希望在最后一列actions中根据blocked的值切换button

from element-angular.

unix avatar unix commented on May 17, 2024

请注意组织好语言、代码格式等,问题不可读我也不知道你想说什么。
这个 issue 先关闭了,如果你准备好了相关信息请重开一个 issue。
谢谢你的关注。

from element-angular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.