当前位置:网站首页>el-table中加入el-input框和el-input-number框,实现el-table的可编辑功能
el-table中加入el-input框和el-input-number框,实现el-table的可编辑功能
2022-07-30 05:08:00 【刚刚好ā】
实现效果:

实现方法:
<el-table class="drow_table" :data="tableData" style="width: 100%" row-key="id">
<el-table-column type="selection" width="45px"></el-table-column>
<el-table-column type="index" label="序号" width="50px"></el-table-column>
<el-table-column label="小数位数" property="digit" width="140px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.digit" @change="handleChange" :min="0" :max="5" label="描述文字"></el-input-number>
</template>
</el-table-column>
<el-table-column label="上限" property="maxVal">
<template slot-scope="scope">
<el-input v-model="scope.row.maxVal"></el-input>
</template>
</el-table-column>
<el-table-column label="下限" property="minVal">
<template slot-scope="scope">
<el-input v-model="scope.row.minVal"></el-input>
</template>
</el-table-column>
</el-table>methods:{
// InputNumber 计数器
handleChange(value) {
console.log(value)
},}在需要加入el-input和el-input-number的列使用template即可。
边栏推荐
- Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction
- 容器化 | 构建 RadonDB MySQL 集群监控平台
- Usage when saving pointers in std::vector
- go语言学习笔记四
- WPF introduces ttf icon file usage record
- Image stitching (registration) case based on OpenCV
- POJ1321 棋盘问题(详解)
- Small programs use npm packages to customize global styles
- ThinkPHP high imitation blue play cloud network disk system source code / docking easy payment system program
- Simulation Problem (Part 1)
猜你喜欢

小程序使用npm包定制全局样式

GO language study notes one

GCC Rust is approved to be included in the mainline code base, or will meet you in GCC 13

Golang eight-legged text finishing (continuous handling)

六、读取应用配置+日志配置

Hexagon_V65_Programmers_Reference_Manual (10)

Small program npm package--API Promise

Acwing完全数

美国再次加息75个基点 陷入“技术性衰退”?加密市场却呈现复苏力量

Plan for many situations in the processing chain
随机推荐
Protobuf compound data types, speaking, reading and writing
六、读取应用配置+日志配置
SaaS多租户数据隔离的三种解决方案
Predictive maintenance scheduling of multiple power equipment based on data-driven fault prediction
Dynamically bind href url
Intermediate - interview questions
斐波那契数列的递归优化《备忘录递归》
Record of problems encountered by the pyinstaller packager
Summary of skills in using ms project2010 project management software
SVN 查看用户名密码
L2-020 功夫传人
go语言学习笔记二
暴力递归到动态规划 05 (贴纸拼词)
Hexagon_V65_Programmers_Reference_Manual(11)
DLL说明(1)
C. Travelling Salesman and Special Numbers (binary + combination number)
Acwing perfect number
handler+message [message mechanism]
聊一聊什么是SaaS,以及遇到的问题......
Image stitching (registration) case based on OpenCV