• 2024-06-20【winform】ListBox如何给item项添加hover
    1、绑定move事件listBox1.MouseMove+=newMouseEventHandler(listBox_MouseMove);2、编写代码privatevoidlistBox_MouseMove(object?sender,MouseEventArgse){ListBox?listBox=senderasListBox;//获取鼠标在ListBox中的位置int
  • 2023-08-28鼠标任意拖动元素排列顺序(vue)
    参考地址:https://codesandbox.io/s/condescending-butterfly-enjqpr?file=/src/App.vue <template><div><transition-groupname="drag"class="list"tag="ul"><li@dragstart="dragStart(
  • 2023-08-18el-table 拖动排序 sortablejs
    参考:https://blog.csdn.net/glpghz/article/details/124359331官网:http://www.sortablejs.com/index.html安装cnpminstallsortablejs--save引入importSortablefrom"sortablejs";table加锚点<el-tableid="ability-table"加载后mounted()
  • 2023-07-20el-table表格行拖拽排序或者电子件列表拖拽排序
    用到sortablejs 中文官网,http://www.sortablejs.com/为了页面中可以复用,在common.js下,封装了公用方法import Sortable from‘sortablejs’rowDrop(selector,params,callback){lettbody=document.querySelector(selector)if(!tbody){return}if(window.tableSortab
  • 2023-06-28【剑指Offer】2、替换空格
    【剑指Offer】2、替换空格题目描述:  请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为WeAreHappy.则经过替换之后的字符串为We%20Are%20Happy。解题思路:  对于这个题目,我们首先想到原来的一个空格替换为三个字符,字符串长度会增加,因此,存在以下两种
  • 2023-05-15Linq 分组后取每一组时间最新的一条数据
    sqlSELECT*FROM(selectROW_NUMBER()over(partitionbyIdorderbyCollTimedesc)ASnewIndex,*fromTable)asTwhereT.newIndex=1结果: lambdavarquery=_repository.GetAll().GroupBy(r=>r.Id).Select(p=>p.OrderByDescending(r=>r.Coll
  • 2023-04-19el-table拖动排序
    html<el-tableref="multipleTable":data="tableData"align="left"borderclass="mytable"row-key="id"><el-table-column:index="indexMethod"align="center"type=&q
  • 2023-01-12LeetCode刷题(78)~找到所有数组中消失的数字【原值作索引】
    题目描述给定一个范围在1≤a[i]≤n(n=数组大小)的整型数组,数组中的元素一些出现了两次,另一些只出现一次。找到所有在[1,n]范围之间没有出现在数组中的数字。
  • 2022-08-29vue+elementUI+sortablejs --- el-table列表拖拽
    前言:最近很多需求都与拖拽有关,一般拖拽用的都是 vuedraggable 但是要是在el-table列表里面拖拽当用vuedraggable去包裹table列表包外层只能拖动整个列表包里面数