king
2023-03-04 52faefc67ffef29e3d208d2233c2547fc0ee47d3
src/utils/utils-custom.js
@@ -453,16 +453,21 @@
            }
          }
          if (card.setting.click === 'button' && card.setting.linkbtn) {
            card.setting.linkbtn = md5(commonId + card.setting.linkbtn)
          }
          if (card.elements) {
            card.elements = card.elements.map(cell => {
              cell.uuid = this.getuuid()
              if (cell.eleType === 'button') {
                cell.uuid = md5(commonId + cell.uuid)
                if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
                  cell.pageTemplate = ''
                  cell.linkmenu = ''
                }
                this.resetBtn(cell, commonId)
              } else {
                cell.uuid = this.getuuid()
              }
              
              return cell
@@ -470,14 +475,15 @@
          }
          if (card.backElements) {
            card.backElements = card.backElements.map(cell => {
              cell.uuid = this.getuuid()
              if (cell.eleType === 'button') {
                cell.uuid = md5(commonId + cell.uuid)
                if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
                  cell.pageTemplate = ''
                  cell.linkmenu = ''
                }
                this.resetBtn(cell, commonId)
              } else {
                cell.uuid = this.getuuid()
              }
              return cell
@@ -488,16 +494,20 @@
        if (item.wrap.datatype === 'public' && item.wrap.publicId) {
          item.wrap.publicId = md5(commonId + item.wrap.publicId)
        }
        if (item.wrap.linkbtn) {
          item.wrap.linkbtn = md5(commonId + item.wrap.linkbtn)
        }
        if (item.elements) {
          item.elements = item.elements.map(cell => {
            cell.uuid = this.getuuid()
            if (cell.eleType === 'button') {
              cell.uuid = md5(commonId + cell.uuid)
              if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
                cell.pageTemplate = ''
                cell.linkmenu = ''
              }
              this.resetBtn(cell, commonId)
            } else {
              cell.uuid = this.getuuid()
            }
            return cell
@@ -518,7 +528,7 @@
              })
            } else if (c.type === 'action' && c.elements) {
              c.elements = c.elements.map(cell => {
                cell.uuid = this.getuuid()
                cell.uuid = md5(commonId + cell.uuid)
                if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
                  cell.pageTemplate = ''
@@ -548,7 +558,7 @@
            })
          } else if (col.type === 'action' && col.elements) {
            col.elements = col.elements.map(cell => {
              cell.uuid = this.getuuid()
              cell.uuid = md5(commonId + cell.uuid)
              this.resetBtn(cell, commonId)
              return cell
            })
@@ -721,12 +731,21 @@
    } else if (['card', 'carousel', 'timeline'].includes(item.type)) {
      item.subcards.forEach(card => {
        card.uuid = this.getuuid()
        if (card.setting.click === 'button' && card.setting.linkbtn) {
          card.setting.linkbtn = md5(commonId + card.setting.linkbtn)
        }
        if (card.elements) {
          if (sessionStorage.getItem('editMenuType') === 'popview') {
            card.elements = card.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton')
          }
          card.elements = card.elements.map(cell => {
            if (cell.eleType === 'button') {
              cell.uuid = md5(commonId + cell.uuid)
            } else {
            cell.uuid = this.getuuid()
            }
            return cell
          })
        }
@@ -735,7 +754,11 @@
            card.elements = card.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton')
          }
          card.backElements = card.backElements.map(cell => {
            if (cell.eleType === 'button') {
              cell.uuid = md5(commonId + cell.uuid)
            } else {
            cell.uuid = this.getuuid()
            }
            return cell
          })
        }
@@ -745,8 +768,15 @@
        if (sessionStorage.getItem('editMenuType') === 'popview') {
          item.elements = item.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton')
        }
        if (item.wrap.linkbtn) {
          item.wrap.linkbtn = md5(commonId + item.wrap.linkbtn)
        }
        item.elements = item.elements.map(cell => {
          if (cell.eleType === 'button') {
            cell.uuid = md5(commonId + cell.uuid)
          } else {
          cell.uuid = this.getuuid()
          }
          return cell
        })
      }
@@ -784,7 +814,8 @@
            col.elements = col.elements.filter(c => c.OpenType !== 'popview' && c.OpenType !== 'funcbutton')
          }
          col.elements = col.elements.map(cell => {
            cell.uuid = this.getuuid()
            cell.uuid = md5(commonId + cell.uuid)
            return cell
          })
        }