最后
整理面试题,不是让大家去只刷面试题,而是熟悉目前实际面试中常见的考察方式和知识点,做到心中有数,也可以用来自查及完善知识体系。
开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
《前端基础面试题》,《前端校招面试题精编解析大全》,《前端面试题宝典》,《前端面试题:常用算法》
<el-table-column :show-overflow-tooltip="true" prop="price" label="单价">
<template slot-scope="scope">
<el-input v-model.number="scope.row.price" />
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" prop="deliverNum" label="发货数量">
<template slot-scope="scope">
<el-input v-model.number="scope.row.deliverNum" oninput="value=value.replace(/[^\d]/g,'')" @focus="onfoucs(scope)" @blur="blurUsername(scope)" />
</template>
</el-table-column>
2. js方法定义:
// 手动单选(订单)
itemHandleSelectionChange(selection, row) { //selection为当前所选数据集合,row为当前选中行数据
const selected = selection.length && selection.indexOf(row) !== -1
if (selected === true) { //这里只需判断是否勾选,进行相应赋值操作即可
row.deliverNum = row.unShippedNumTemp
} else {
row.deliverNum = 0
}
},
// 手动全选(订单)
itemHandleSelectionAll(selection) {
console.log(全选----
, selection)
if (selection.length !== 0) {
selection.map(v => { v.deliverNum = v.unShipped}) //这里将全选的数据遍历后将未发货赋值给发货
this.totalNumer = this.countTotal(selection, ‘unShipped’) //这里是合计方法,之前的博文中有详细介绍
} else {
this.submitCUOrder() //注意这块是判断取消全选后重新调用初始化表格方法,不然发货数无法清0
this.totalNumer = this.countTotal(selection, ‘deliverNum’)
}
}
看效果:
![在这里插入图片描述](https://img-blog.csdnimg.cn/9f49f5d02f9843bd86605bd02b8e2996.gif#pic_center)
此方法是本人结合官方文档研究出来的,不足之处请指教。
### 最后
![前15.PNG](https://img-blog.csdnimg.cn/img_convert/b1de5b4a910e6959b6a6fcef68821639.webp?x-oss-process=image/format,png)
![前16.PNG](https://img-blog.csdnimg.cn/img_convert/31db99477528e066b1491c4f1887fa96.webp?x-oss-process=image/format,png)
>由于文档内容过多,为了避免影响到大家的阅读体验,在此只以截图展示部分内容
>
>**[开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】](https://bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0)**
实项目实战+最新讲解视频】](https://bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0)**