赵士淞
2023-03-21 50b32fe3b60b9bba03436e0895ed53e0a0c177d8
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 时间戳
     */