vue table表格行内编辑

这是一个关于Vue组件的示例,展示如何实现表格内的行编辑功能。用户可以点击编辑按钮激活行内编辑,通过输入框修改表格单元格数据,并通过保存和取消按钮进行确认或回退。代码中包括了编辑、保存、取消操作的处理方法,以及调用API接口更新数据。
摘要由CSDN通过智能技术生成
<template>
  <div class="disableLang">
    <div>
      <template slot="header">
        <el-form
          :inline="true"
          :model="formTitle"
          label-position="left"
          ref="formTitle"
        >
          <el-row>
            <el-col :span="1"><xyy-button @click="newIncrease">+新增</xyy-button></el-col>
            <el-col :span="12" class="disableLangInput" v-if ="disableLangInputShow">
              <el-input v-model="formTitle.search"></el-input>
              <xyy-button @click="handelSave">保存</xyy-button>
            </el-col>
          </el-row>
        </el-form>
      </template>

      <template slot="body">
        <div>
          <el-table
            :col="col"
            :data="tableData"
            :list-query="listQuery"
            :operation="operation"
            :offset-top="240"
            @get-data="seachDataList"
          >
            <template slot="words" slot-scope="{col}">
              <el-table-column
                :key="col.index"
                :label="col.name"
                :prop="col.index"
                :width="
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值