doway-coms 2.4.3 → 2.4.4

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": "doway-coms",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -1565,13 +1565,13 @@ export default {
1565
1565
  function pasteChildren (row, childrenField, parentField) {
1566
1566
  if (row[childrenField] && row[childrenField].length > 0) {
1567
1567
  row[childrenField].forEach(item => {
1568
+ item.id=vm.$store.getters.newId() + ''
1568
1569
  let tmpRow = JSON.parse(JSON.stringify(item))
1569
1570
  delete tmpRow[childrenField]
1570
1571
  delete tmpRow['_X_ROW_KEY']
1571
1572
  tmpRow[parentField] = row.id
1572
- tmpRow.id=vm.$store.getters.newId() + ''
1573
1573
  $table.insertAt(tmpRow, -1).then(({row})=>{
1574
- pasteChildren(row, childrenField, parentField)
1574
+ pasteChildren(item, childrenField, parentField)
1575
1575
  })
1576
1576
  })
1577
1577
  }
@@ -1591,18 +1591,17 @@ export default {
1591
1591
  case 'copyRow':
1592
1592
  if(this.gridEdit){
1593
1593
  this.copySaveRow=JSON.parse(JSON.stringify(row))
1594
- this.copySaveRow.id= this.$store.getters.newId() + ''
1595
- delete this.copySaveRow['_X_ROW_KEY']
1596
1594
  }
1597
1595
  break
1598
1596
  case 'paste':
1599
1597
  if (this.copySaveRow && this.gridEdit) {
1600
- if (this.treeConfig) {
1601
- console.log(row)
1598
+ if (this.treeConfig) {
1602
1599
  let parentField = this.treeConfig.parentField ? this.treeConfig.parentField : 'parentId'
1603
1600
  let childrenField = this.treeConfig.childrenField ? this.treeConfig.childrenField : 'children'
1604
1601
  //树情况下 分批插入
1602
+ this.copySaveRow.id= this.$store.getters.newId() + ''
1605
1603
  let tmpRow = JSON.parse(JSON.stringify(this.copySaveRow))
1604
+ delete tmpRow['_X_ROW_KEY']
1606
1605
  delete tmpRow[childrenField]
1607
1606
  tmpRow[parentField]=row?.id
1608
1607
  $table.insertAt(tmpRow, -1)
@@ -1610,7 +1609,7 @@ export default {
1610
1609
  pasteChildren(this.copySaveRow, childrenField,parentField)
1611
1610
  this.$emit('paste', row)
1612
1611
  })
1613
- } else {
1612
+ } else {
1614
1613
  $table.insertAt(this.copySaveRow, -1)
1615
1614
  .then(({ row }) => {
1616
1615
  this.$emit('paste', row)