How to use the xe-utils.set function in xe-utils

To help you get started, we’ve selected a few xe-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xuliangzhan / vxe-table / packages / table / src / table.js View on Github external
this.visibleColumn.forEach(column => {
        if (column.property && !XEUtils.has(recordItem, column.property)) {
          XEUtils.set(recordItem, column.property, null)
        }
        // 如果设置了 Key 就必须要唯一,可以自行设置;如果为空,则默认生成一个随机数
        if (rowKey && !XEUtils.get(recordItem, rowKey)) {
          XEUtils.set(recordItem, rowKey, ++rowUniqueId + Date.now())
        }
      })
      return recordItem
github xuliangzhan / vxe-table / packages / table / src / table.js View on Github external
this.visibleColumn.forEach(column => {
        if (column.property && !XEUtils.has(recordItem, column.property)) {
          XEUtils.set(recordItem, column.property, null)
        }
        // 如果设置了 Key 就必须要唯一,可以自行设置;如果为空,则默认生成一个随机数
        if (rowKey && !XEUtils.get(recordItem, rowKey)) {
          XEUtils.set(recordItem, rowKey, ++rowUniqueId + Date.now())
        }
      })
      return recordItem
github xuliangzhan / vxe-table / packages / table / src / table.js View on Github external
if (value === -1) {
              treeIndeterminates.push(row)
              XEUtils.set(row, property, false)
            } else {
              // 更新子节点状态
              XEUtils.eachTree([row], item => XEUtils.set(item, property, value), treeConfig)
              XEUtils.remove(treeIndeterminates, item => item === row)
            }
            // 如果存在父节点,更新父节点状态
            let matchObj = XEUtils.findTree(tableFullData, item => item === row, treeConfig)
            if (matchObj && matchObj.parent) {
              let selectItems = matchObj.items.filter(item => XEUtils.get(item, property))
              return this.triggerCheckRowEvent(evnt, { row: matchObj.parent }, selectItems.length === matchObj.items.length ? true : (selectItems.length || value === -1 ? -1 : false))
            }
          } else {
            XEUtils.set(row, property, value)
          }
        } else {
          if (treeConfig) {
            if (value === -1) {
              treeIndeterminates.push(row)
              XEUtils.remove(selection, item => item === row)
            } else {
              // 更新子节点状态
              XEUtils.eachTree([row], item => {
                if (value) {
                  if (selection.indexOf(item) === -1) {
                    selection.push(item)
                  }
                } else {
                  XEUtils.remove(selection, select => select === item)
                }
github xuliangzhan / vue-element-extends / packages / editable / src / editable.vue View on Github external
this.getColumns().forEach(column => {
        if (column.property && !XEUtils.has(recordItem, column.property)) {
          XEUtils.set(recordItem, column.property, null)
        }
      })
      return recordItem
github xuliangzhan / vxe-table / packages / table / src / table.js View on Github external
let updateValue = (row, rowIndex) => {
          if (!checkMethod || checkMethod({ row, rowIndex })) {
            XEUtils.set(row, property, value)
          }
        }
        if (treeConfig) {
github xuliangzhan / vxe-table / packages / table / src / table.js View on Github external
          XEUtils.eachTree(tableFullData, item => XEUtils.set(item, property, false), treeConfig)
        } else {
github xuliangzhan / vue-element-extends / packages / editable / src / editable.vue View on Github external
columns.forEach(column => {
          if (column.property) {
            XEUtils.set(record, column.property, null)
          }
        })
      })
github xuliangzhan / vxe-table / src / plugins / element.js View on Github external
callback (value) {
                XEUtils.set(row, column.property, value)
              }
            }
github xuliangzhan / vxe-table / src / plugins / iview.js View on Github external
callback (value) {
                XEUtils.set(row, column.property, value)
              }
            }
github xuliangzhan / vue-element-extends / packages / editable / src / editable.vue View on Github external
.then(() => {
                    if (this.configs.checkedEditMethod ? this.configs.checkedEditMethod({ row: row.data, rowIndex, column, columnIndex, cell }, evnt) !== false : true) {
                      XEUtils.set(row.data, column.property, null)
                      XEUtils.set(row.data, column.property, null)
                    }
                  })
              } else {