摘要:
上面的代码示范了提取一个类中的属性, 使用场景:当我们想把一个类里面某些属性取出构造一个新类型时。 》》 Ctrl +E ,Ctrl + E 可以生成一段 属性集合,包含两个属性 结果演示:"public GoodsStatus Status { get; set; }public DateTime 阅读全文
摘要:
let s =[]; $.each($('#formSearch input'),(m,n)=>{s.push(n)}); //示例获取表单所有 input 下滑线分割的 name 集合。set 去重, concat 平铺。 let res = [...new Set( [].concat(...s.map(m=>m.split('_'))))]; //"", "Co", "Id", "Eq",... 阅读全文