ES6 常用函数
forEach 循环数组对象,不会跳出循环
arr.forEach(function (item, index, arr) {
// item,单个对象
// index 索引
// arr完整的集合对象
});
获取对象数组中某一个属性的value集合
arr为对象数组,name是对象的属性名称,返回value数组集合
var keys = Array.from(arr,({name}) => name);
reduce,待完善,仅供参考
var arr = self.$children.reduce((components, child) => {
if (child.$options.name === componentName) {
if(dataSourceKey.indexOf( child.widget.options.remoteDataSource) >=0){
components.push(child);
}
return components;
}else{
const foundChilds = this.findChildrensComponent(child, componentName,dataSourceKey);
return components.concat(foundChilds);
}
}, []);
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 使用C#创建一个MCP客户端
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 按钮权限的设计及实现