首页 > 其他分享 >vue table刷新单行数据

vue table刷新单行数据

时间:2022-12-10 14:35:13浏览次数:36  
标签:index vue 单行 table tabIndex data response row

1.给el-table加上标记方法 <el-table v-loading="loading" :data="tagList1" @selection-change="handleSelectionChange1" :row-class-name="tableRowClassName">   tableRowClassName({ row, rowIndex }) {       row.index = rowIndex;     },   2.提交数据到后台,重新获取此行数据   confirmBut(row, type, tabIndex){       let _this = this       let putParam = {"confirmId": row.confirmId, "type":type}       editConfirmInfo(putParam).then(res =>{         if(res.code == 200){           //更改单行数据           //重新去数据库中获取           this.msgSuccess("成功");           _this.changeLine(row, tabIndex)         }else{           this.msgError("失败,刷新页面查看事件是否已被确认!")         }       })     },   changeLine(row, tabIndex){       selectSmtTagAllById(row.id).then(response => {         if(tabIndex==1){           this.tagList1.splice(row.index,1,response.data)         }else if(tabIndex==2){           this.tagList2.splice(row.index,1,response.data)         }else if(tabIndex==3){           this.tagList3.splice(row.index,1,response.data)         }               });     },

标签:index,vue,单行,table,tabIndex,data,response,row
From: https://www.cnblogs.com/cw828/p/16971538.html

相关文章

  • 在ubuntu下 service iptables start启动iptables失败
    尝试通过执行serviceiptablesstart启动iptables失败,提示iptables:unrecognizedservice。可以通过modprobeip_tables启动。补充:1、service可以控制系统服务(打开、......
  • 路由 rtable dst_entry 数据结构
    /*rt_flags是一组标志位,按目的入口查询的执行顺序:如果路由使用本地环回接口,则rt_flags上加标志RTCF_LOCAL,如果路由结果类型是广播,则加标志RTCF_BROADCAST和RTCF_LOCAL,......
  • vue项目中的图片操作【一】
    要命!这么多年,技术还是有点菜!怎么搞的,前端不擅长也就算了,简单的图片操作咋也不会img标签图片显示异常大概就写了个img标签,src地址写了网络图片地址,访问就报错403。哎!这个网络......
  • vue项目中的图片操作【二】
    加油!还要继续努力哦~祝大家都能成为,自由而无用的灵魂。img标签图片居中img标签图片居中,当然啦!就单纯设置img标签属性,让它居中还是有点难度的,所以我们需要借助div标签。示例:<......
  • SpringBoot+Vue项目餐饮管理系统
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • 深入理解Vuex之getters、mapState、mapGetters
    1、getters的1.1概念当state中的数据需要经过加工后再时,可以getters加工。1.2在store中追加getters配置constgetters={ bigSum(state){ returnstate.......
  • 深入理解Vuex、原理详解、实战应用
    辅助理解vuex的工作原理:好比一个客户(VueComponents)去饭店吃饭,客人首先和服务员(Actions)对接,然后服务员再将客户的需求讲述给厨房的厨师(Mutations)。存在一种情况、客户和厨......
  • Vue中关于数组与对象修改触发页面更新的机制与原理简析
    Vue中关于数组与对象修改触发页面更新的机制与原理简析相关问题数组使用索引直接赋值与直接修改数组length时,不会触发页面更新。例如:<script>exportdefault{n......
  • vue2 购物车21
    main:importVuefrom'vue'importAppfrom'./App.vue'//vantimportVantfrom'vant';import'vant/lib/index.css';import{NavBar,SubmitBar,Card,Checkb......
  • ant-design Table fixed 定位导致高度不一致(解决方案)
    <a-table:columns="columns":rowKey="record=>record.rowId":data-source="data":scroll="{x:true}":pagination='false'    当点击按钮编辑ta......