首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏若尘的技术专栏

    Element 入门教程

    = val; console.log(this.multipleSelection) } }, data() { return { multipleSelection: [ = val; console.log(this.multipleSelection) }, = val; console.log(this.multipleSelection) }, = val; console.log(this.multipleSelection) },

    2.9K50编辑于 2022-03-07
  • 来自专栏Java架构师必看

    用Spring Boot+Vue做微人事项目第十四天

    是为了显示要删除多少条数据 <el-button style="margin-top: 10px" type="danger" size="small" :disabled="<em>multipleSelection</em>.length $confirm('此操作将永久删除【'+ this.<em>multipleSelection</em>.length +'】条记录, 是否继续?' ; this.<em>multipleSelection</em>.forEach(item=>{ ids += 'ids=' + item.id + $confirm('此操作将永久删除【'+ this.<em>multipleSelection</em>.length +'】条记录, 是否继续?' ; this.<em>multipleSelection</em>.forEach(item=>{ ids += 'ids=' + item.id +

    43450发布于 2021-05-14
  • 来自专栏程序语言交流

    这个实现不对,要的是excel里面的高亮重复项效果

    基于选中列和行的对比的表格中的重复数据, 高亮重复项 按钮点击后先校验数据行是否选中,以及高亮重复项的列是否选中,这个是基础的校验,所有操作,由于是基于案例分析单独写的 demo,校验失败使用的 console.warn 通过 multipleSelection 表格选中行数据和 checkList 选中列筛选出重复项内容,得到高亮重复项数据后,接下来获取到对应的行索引并记录,并把当前行对应的列的控制变量 back* 设置为 true if (this.multipleSelection.length === 0) { console.warn('请先选择一列') return false } // 获取重复项内容 const arr = [] const arr2 = [] this.multipleSelection.forEach push(v[v2]) } } }) }) console.log('arr --xxx ', arr) console.log('arr2 -- ', arr2) this.multipleSelection.forEach

    1.3K10编辑于 2022-12-17
  • 来自专栏程序语言交流

    这个Element table 上下移需求不简单

    基于选中数据定位需要移动到的位置 // confirm slotIndex let slotIndex = -1 this.tableData.forEach((item, index) => { if (this.multipleSelection.length > 1) { this.multipleSelection.forEach((v, k) => { if (item.id === v.id) { if (slotIndex slotIndex < index) { slotIndex = index } } } }) } else { this.multipleSelection.forEach 删除表格中的选中数据 // delete selectedata this.multipleSelection.forEach((item, index) => { this.tableData.forEach 将选中的数据移入指定位置 this.tableData.splice(slotIndex, 0, this.multipleSelection) this.tableData = this.tableData.flat

    2K30编辑于 2022-09-16
  • 来自专栏全栈开发那些事

    element ui table组件的基本使用

    //每页显示的记录数 searchObj:{},//条件封装的对象 list:[], //每页数据集合 total:0, //总记录数 multipleSelection /确定执行then方法 var idList=[] //遍历数组得到每个id值,设置到idList里面 for (var i = 0; i <this.multipleSelection.length ; i++) { var obj=this.multipleSelection[i] var id = obj.id idList.push 1) }) }); }, //获取选择复选框的id值 handleSelectionChange(selection){ this.multipleSelection

    1.2K10编辑于 2023-02-25
  • 来自专栏源码揭秘

    在vue和element-ui的table中实现分页复选

    pagination.total" slot="pagination" > </el-pagination> 模拟数据实现分页 data () { return { tableData: [], multipleSelection }, handleCurrentChange () { this.fetchData() }, handleSelectionChange (val) { this.multipleSelection [], 在复选事件中对所选项进行存储 主要思路就是: 将当前页已选数据放入所有已选项 将所有已选项数据中当前页没选择的项移除 handleSelectionChange (val) { this.multipleSelection currentPageData = this.tableData.map(item => item[this.uniqueKey]) // 当前页所有数据 let currentPageSelected = this.multipleSelection.map

    1.5K50编辑于 2022-02-14
  • 来自专栏循序渐进Vue.js 3.x前端开发实践

    【愚公系列】《循序渐进Vue.js 3.x前端开发实践》069-商业项目:电商后台管理系统实战(订单管理模块的开发)

    "", consignee: "", phone: "", name: "", payTime: "", sendTime: "" }) // 当前选中的订单对象 const multipleSelection orderList.value)) } // 导出选中的发货单 function exportDispatchGoods() { Tools.exportJson('发货单.json', JSON.stringify(multipleSelection.value )) } // 处理多选 function handleSelectionChange(val) { multipleSelection.value = val } // 进行发货 function dispatchGoods() { ElMessage({ type: 'success', message: '发货商品:' + JSON.stringify(multipleSelection.value multipleSelection 存储当前选中的订单对象。 生命周期钩子: onMounted:组件加载时获取当前订单数据。

    40510编辑于 2025-06-03
  • 来自专栏若尘的技术专栏

    maven+vue+servlet+element+MyBatis 前后端分离小项目

    > ``` 在编写 deleteByIds 方法之前,我们要想办法获取到选中的 id,复选框选中后会执行一个 handleSelectionChange 回调方法,我们可以通过该方法中的 this.multipleSelection 获取到选中的对象数组 ```js // 复选框选中后执行的方法 handleSelectionChange(val) { this.multipleSelection = val; // console.log(this.multipleSelection) }, ``` 然后我们再写一个模型 multipleSelection 用于存放从 this.multipleSelection 获取到的 id ```js // 复选框选中数据集合 multipleSelection: [], ``` 现在我们编写 deleteByIds 方法 ```js // 批量删除 deleteByIds 创建id 数组 从 this.multipleSelection 获取即可 for (let selectionElement of this.multipleSelection) {

    3.4K30编辑于 2022-03-07
  • 来自专栏阿福谈Web编程

    vue-element-admin整合spring-boot权限设计之实现用户授权功能

    selectedUid: null, queryDialogTitle: '', editDialogTitle: '', checkedRoles: [], multipleSelection selection,row){ this.checkedRoles = selection }, selectChecked(selection,row){ this.multipleSelection closeEidtDialog(){ this.eidtDialogVisible = false }, addUserRole(){ if (this.multipleSelection.length let roleIds = [] const uid = this.selectedUid for (let i = 0; i < this.multipleSelection.length ; i++) { let row = this.multipleSelection[i]; roleIds.push(row.id)

    1.3K60发布于 2021-09-08
  • 来自专栏前端小而全的知识归纳

    vue+element-ui的简洁导入导出功能【包含上传到云】

    2016-05-02", name: "王小虎", address: "上海市普陀区金沙江路 1518 弄" } ], multipleSelection refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { //复选框选择回填函数,val返回一整行的数据 this.multipleSelection

    2.9K21发布于 2019-04-17
  • 来自专栏猿人工厂

    猿实战08——属性库实现之属性关系绑定

    { update: '属性修改', create: '属性新增' }, // table集合 list: null, multipleSelection $refs[formName].resetFields() }, // handleSelectionChange(val) { this.multipleSelection update: '属性值新增', create: '属性值修改' }, // table集合 list: null, multipleSelection $refs[formName].resetFields() }, // handleSelectionChange(val) { this.multipleSelection

    1.1K30发布于 2020-09-05
  • 来自专栏陶然同学博客

    Element-UI快速入门

    div> </template> <script> export default { methods: { handleSelectionChange(val) { this.multipleSelection = val; //保存选中的数据 } }, data () { return { multipleSelection: [], //多选,选中的数据 div> </template> <script> export default { methods: { handleSelectionChange(val) { this.multipleSelection handleDelete(index, row) { console.log(index, row); } }, data () { return { multipleSelection handleDelete(index, row) { console.log(index, row); } }, data () { return { multipleSelection

    4.9K20编辑于 2023-02-24
  • 来自专栏历史专栏

    【愚公系列】2023年10月 Java教学课程 138-Servlet服务器项目完整案例

    要完成这个功能需要在 Vue 对象中定义一个数据模型 selectedIds:[],在 deleteByIds() 函数中遍历 multipleSelection 数组,并获取到每一个所选数据的id值存储到 创建id数组 [1,2,3], 从 this.multipleSelection 获取即可 for (let i = 0; i < this.multipleSelection.length; i++) { let selectionElement = this.multipleSelection[i]; this.selectedIds[i] = selectionElement.id 创建id数组 [1,2,3], 从 this.multipleSelection 获取即可 for (let i = 0; i < this.multipleSelection.length ; i++) { let selectionElement = this.multipleSelection[i]; this.selectedIds[i

    24200编辑于 2025-05-28
  • 来自专栏三分恶的专栏

    一步步使用SpringBoot结合Vue实现登录和用户管理功能

    : [] } }, methods: { handleSelectionChange(val) { this.multipleSelection = val; } } } 这个示例里取出的参数multipleSelection结构是这样的,我们只需要id,所以做一下处理: ? export default { data() { return { multipleSelection: [], ids: [], } }, methods: { handleSelectionChange(val) { this.multipleSelection = val; //向被删除的ids赋值 this.multipleSelection.forEach((item) => { this.ids.push(item.id);

    3.1K73发布于 2021-02-01
  • 来自专栏前端小歌谣

    Vuex+vue2+ElementUi实现TodoList

    $store.commit('removeItem', id) }, handleSelectionChange (val) { this.multipleSelection

    26210编辑于 2024-05-30
  • 来自专栏无道编程

    利用iframe简单实现富文本效果

    MultipleSelection 允许当用户按住 Shift 或 Ctrl 键时一次选中多于一个站点可选元素。 53. Open 打开。 54.

    2.5K00发布于 2019-11-13
  • 来自专栏White feathe 的博客

    JS 实现复制粘贴功能

    MultipleSelection 允许当用户按住 Shift 或 Ctrl 键时一次选中多于一个站点可选元素。 Open 目前尚未支持。 Outdent 减少选中区所在格式化块的缩进。

    5.7K30编辑于 2021-12-08
  • 来自专栏IT技术

    vue常见操作使用手法

    multipleSelection.length"> <el-button type="success" round disabled>导出</el-button>

    <!

    1.8K10发布于 2018-07-25
  • 来自专栏云计算linux

    优学管理系统之课程管理

    当点击页面中表头上的复选框后、当前页面中所有的复选框将会选中并收集选中行的课程cid放入数组中、反之则不选中 //批量删除被选中的复选框 handleSelectionChange(val) { this.multipleSelection , "提示", { type: 'warning' }).then(() => { const length = this.multipleSelection.length; for (let i = 0; i < length; i++) { this.delarr.push(this.multipleSelection[i].cid);

    49910编辑于 2024-12-13
  • 来自专栏猿人工厂

    猿实战13——实现你没听说过的前台类目

    update: '一级类目修改', create: '一级类目新增' }, // table集合 list: null, multipleSelection update: '二级类目修改', create: '二级类目新增' }, // table集合 list: null, multipleSelection create: '三级类目新增' }, // table集合 list: null, tableList: [ ], multipleSelection

    81431发布于 2020-09-23
领券