2020年4月15日

老数组里的每一个有新数组里的每一个 有的话就删除

摘要: oldArr.forEach(item=>{ newArr.forEach((items,index)=>{ item.name items.name ? newArr.splice(index,1):'' }) }) 阅读全文

posted @ 2020-04-15 10:03 左侧岚 阅读(138) 评论(0) 推荐(0) 编辑

Angular2 多选框

摘要: if (this.checkedList.length != 0) { if (data.checkbox && this.checkedList.indexOf(data) == -1) { this.checkedList.push(data); } if (!data.checkbox && 阅读全文

posted @ 2020-04-15 10:00 左侧岚 阅读(179) 评论(0) 推荐(0) 编辑

Angular1 2样式 禁用属性 隐藏显示

摘要: ng-disabled="app.status !== 'NEW' && app.status !== 'WAIT'" ng-disabled="app.status == 'SUCCEED'" admin button.ui-btn-deploy.ui-btn-sm.ui-btn-link.tes 阅读全文

posted @ 2020-04-15 09:53 左侧岚 阅读(475) 评论(0) 推荐(0) 编辑

React 跳转 路由跳转

摘要: this.state.deleteCheckbox.map((item, index) => { this.props.router.push({ pathname: "cloudResource/virtualMachine/SyszLookDetail", state: { name: item 阅读全文

posted @ 2020-04-15 09:51 左侧岚 阅读(882) 评论(0) 推荐(0) 编辑

2020年4月14日

搜索框模糊查询

摘要: var cc = _this.state.virtualMachineArrayss.filter(function(item){ return item.name != text.name }) <Input placeholder="请输入要搜索的内容" onChange={this.handl 阅读全文

posted @ 2020-04-14 10:22 左侧岚 阅读(808) 评论(0) 推荐(0) 编辑

2020年4月13日

字符串

摘要: //人物名字 是个字符串 获得人物名字中的某个字符 charAt(index) slice(start,end) //提取人物名字的某个部分 字符串中提取一些字符substr(start,length) //提取字符串中介于两个指定下标之间的字符substring(start,stop) //连接字 阅读全文

posted @ 2020-04-13 11:13 左侧岚 阅读(97) 评论(0) 推荐(0) 编辑

数组

摘要: //不会修改原数组 slice(start,end) //修改原数组 //队伍中 删除+添加 人 splice(index,howmany,item1,.....,itemX) //队伍中添加人 或者 添加其他队伍 concat(arrayX,arrayX,......,arrayX) sort(s 阅读全文

posted @ 2020-04-13 10:47 左侧岚 阅读(76) 评论(0) 推荐(0) 编辑

2020年4月10日

React this.state值不实时更新 promise

摘要: setTimeout 赋值 解决异步 promise 解决异步 阅读全文

posted @ 2020-04-10 16:25 左侧岚 阅读(473) 评论(0) 推荐(0) 编辑

2020年4月8日

导入导出

摘要: //导出数组//export default [] import pageRoutes from './router.config'; //导出数组 const sidebarMenu = [] export default sidebarMenu; //导出数组 export const head 阅读全文

posted @ 2020-04-08 15:45 左侧岚 阅读(135) 评论(0) 推荐(0) 编辑

2020年3月31日

React (redux store reducers(1个) reducer(1个组件1个 包含多个function函数 ) action(对象) dispatch)(react-redux redux-actions redux-immutable redux-thunk 异步redux )flux

摘要: //compose 组成 combine 联合 import {applyMiddleware, createStore, compose, combineReducers} from 'redux'; import { bindActionCreators } from "redux"; impo 阅读全文

posted @ 2020-03-31 15:49 左侧岚 阅读(376) 评论(0) 推荐(0) 编辑

导航