<el-table
:data="PersonList"
style="width: 100%">
<el-table-column
label="员工姓名"
prop="name">
</el-table-column>
<el-table-column
label="手机号码"
prop="tel">
</el-table-column>
<el-table-column >
<template slot="header" slot-scope="scope">
<span>固话</span>
</template>
<template slot-scope="scope">
<el-input v-model="scope.row.fixedTel" @change="setFixedTel(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<span></span>
</template>
<template slot-scope="scope">
<el-button
size="mini"
type="danger"
@click.prevent="removeDomain(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
//方法
removeDomain (item) {
const index = this.PersonList.indexOf(item)
if (index !== -1) {
this.PersonList.splice(index, 1)
}
},
element表格加输入框
最新推荐文章于 2024-07-20 19:15:34 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)