Browse Source

feat: 重复数据删除

test2
xuesinan 4 years ago
parent
commit
99aa56584c
  1. 1
      CHANGELOG.md
  2. 32
      store/task/mutations.js

1
CHANGELOG.md

@ -181,6 +181,7 @@
- | render 修复不显示内嵌插件的问题 | [c546659](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/c546659) - | render 修复不显示内嵌插件的问题 | [c546659](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/c546659)
render | 修复了代码片段不能在app上显示的问题 | [fe54729](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/fe54729) render | 修复了代码片段不能在app上显示的问题 | [fe54729](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/fe54729)
- | renderjs打包h5不触发change事件 | [1e0f50c](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/1e0f50c) - | renderjs打包h5不触发change事件 | [1e0f50c](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/1e0f50c)
- | tall4点击二级项目没反应 | [0c3bdb0](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/0c3bdb0)
### 📝 文档 ### 📝 文档

32
store/task/mutations.js

@ -16,15 +16,15 @@ const mutations = {
setUpRealTasks(state, data) { setUpRealTasks(state, data) {
state.realTasks = [...data, ...state.realTasks]; state.realTasks = [...data, ...state.realTasks];
// let arr = []; let arr = [];
// state.realTasks.forEach(item => { state.realTasks.forEach(item => {
// const index = arr.findIndex(v => v.id === item.id); const index = arr.findIndex(v => v.id === item.id);
// if (index === -1) { if (index === -1) {
// arr.push(item); arr.push(item);
// } }
// }) })
// state.realTasks = [...arr]; state.realTasks = [...arr];
}, },
/** /**
@ -35,15 +35,15 @@ const mutations = {
setDownRealTasks(state, data) { setDownRealTasks(state, data) {
state.realTasks = [...state.realTasks, ...data]; state.realTasks = [...state.realTasks, ...data];
// let arr = []; let arr = [];
// state.realTasks.forEach(item => { state.realTasks.forEach(item => {
// const index = arr.findIndex(v => v.id === item.id); const index = arr.findIndex(v => v.id === item.id);
// if (index === -1) { if (index === -1) {
// arr.push(item); arr.push(item);
// } }
// }) })
// state.realTasks = [...arr]; state.realTasks = [...arr];
}, },
/** /**

Loading…
Cancel
Save