yaozc
2023-03-22 d4c1742fc81de272e026211d751597c8ed5253e1
eladmin-web-master/src/components/Crud/crud.js
@@ -531,6 +531,19 @@
      })
    },
    /**
     * 年份格式化
     * @param {Object} timestamp 时间戳
     */
    toYear(timestamp) {
      if (timestamp == null) {
        return
      } else {
        const system = new Date(timestamp)
        const year = system.getFullYear()
        return year
      }
    },
    /**
     * 年月格式化
     * @param {Object} timestamp 时间戳
     */