1. import { isNumber, isObject, isArray, isString } from '@/utils/dataType'
    2. export const isEmptyObject = function (value) {
    3. if (isObject(value)) {
    4. return Object.keys(value).length === 0
    5. }
    6. return false
    7. }
    8. export const isEmptyArray = function (value) {
    9. if (isArray(value)) {
    10. return value.length === 0
    11. }
    12. return false
    13. }
    14. export const isEmptyString = function (value) {
    15. if (isString(value)) {
    16. return value === ''
    17. }
    18. return false
    19. }
    20. export const isEmpty = function (value) {
    21. if (isObject(value)) {
    22. return isEmptyObject(value)
    23. }
    24. if (isArray(value)) {
    25. return isEmptyArray(value)
    26. }
    27. if (isString(value)) {
    28. return isEmptyString(value)
    29. }
    30. return isNull(value) || isUndefined(value)
    31. }