需求
在el-table中想要直接点击单元格直接由文字显示变为编辑框状态,而非一整行编辑或者通过展示模态框编辑,这样目标性会比较清楚且页面较简洁。下面直接上代码!
实现效果
html代码
@blur=’blurInput(scope.row.id,”name”,scope.row.name)’ v-focus>
{
{scope.row.name}}
type=”date” :clearable=”false” value-format=”yyyy-MM-dd” placeholder=”请选择开始日期”
@blur=’blurInput(scope.row.id,”planStartTime”,scope.row.planStartTime)’ v-focus>
{
{scope.row.planStartTime}}
js代码
export default {
data() {
return {
//表格数据
tableList: [
{
id: 0,
name: “规划许可阶段”,
planStartTime: “2021-0