t20-common-lib 0.11.1 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "t20-common-lib",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "T20",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -66,8 +66,8 @@
66
66
  </div>
67
67
 
68
68
  <span slot="footer" class="dialog-footer">
69
- <el-button @click="visible = false">取 消</el-button>
70
69
  <el-button type="primary" @click="confirm">确 定</el-button>
70
+ <el-button @click="resetToDefault">恢复默认</el-button>
71
71
  </span>
72
72
  </el-dialog>
73
73
  </template>
@@ -220,6 +220,15 @@ export default {
220
220
  },
221
221
  getColumns(pageId) {
222
222
  return getColumns(pageId || this.pageId, this.userNo, this.columns, this.labelKey)
223
+ },
224
+ resetToDefault() {
225
+ this.localGroups.forEach(g => g.children = [])
226
+ this.columns.forEach(col => {
227
+ const group = this.localGroups.find(g => g.groupId === col.groupId)
228
+ if(group) {
229
+ group.children.push({...col})
230
+ }
231
+ })
223
232
  }
224
233
  }
225
234
  }