eoss-ui 0.5.58 → 0.5.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/lib/button-group.js +52 -11
  2. package/lib/button.js +39 -0
  3. package/lib/calendar.js +42 -14
  4. package/lib/card.js +186 -186
  5. package/lib/checkbox-group.js +39 -0
  6. package/lib/data-table-form.js +39 -0
  7. package/lib/data-table.js +39 -0
  8. package/lib/date-picker.js +39 -0
  9. package/lib/dialog.js +39 -0
  10. package/lib/eoss-ui.common.js +1290 -392
  11. package/lib/flow-group.js +39 -0
  12. package/lib/flow-list.js +39 -0
  13. package/lib/flow.js +42 -4
  14. package/lib/form.js +717 -18
  15. package/lib/handle-user.js +39 -0
  16. package/lib/handler.js +39 -0
  17. package/lib/icon.js +39 -0
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +39 -0
  20. package/lib/input.js +39 -0
  21. package/lib/login.js +45 -6
  22. package/lib/main.js +39 -0
  23. package/lib/nav.js +39 -0
  24. package/lib/page.js +39 -0
  25. package/lib/player.js +39 -0
  26. package/lib/qr-code.js +39 -0
  27. package/lib/radio-group.js +39 -0
  28. package/lib/retrial-auth.js +39 -0
  29. package/lib/select-ganged.js +39 -0
  30. package/lib/select.js +39 -0
  31. package/lib/selector-panel.js +39 -0
  32. package/lib/selector.js +39 -0
  33. package/lib/sizer.js +39 -0
  34. package/lib/steps.js +39 -0
  35. package/lib/switch.js +39 -0
  36. package/lib/table-form.js +214 -5
  37. package/lib/tabs.js +39 -0
  38. package/lib/theme-chalk/base.css +1 -1
  39. package/lib/theme-chalk/card.css +1 -1
  40. package/lib/theme-chalk/cascader.css +1 -1
  41. package/lib/theme-chalk/icon.css +1 -1
  42. package/lib/theme-chalk/index.css +1 -1
  43. package/lib/theme-chalk/main.css +1 -1
  44. package/lib/theme-chalk/menu.css +1 -1
  45. package/lib/theme-chalk/sizer.css +1 -1
  46. package/lib/theme-chalk/upload.css +1 -1
  47. package/lib/tips.js +39 -0
  48. package/lib/tree-group.js +39 -0
  49. package/lib/tree.js +39 -0
  50. package/lib/upload.js +39 -0
  51. package/lib/utils/util.js +39 -0
  52. package/lib/wujie.js +39 -0
  53. package/lib/wxlogin.js +39 -0
  54. package/package.json +2 -2
  55. package/packages/button-group/src/main.vue +16 -11
  56. package/packages/calendar/src/main.vue +25 -6
  57. package/packages/card/src/main.vue +72 -60
  58. package/packages/flow/src/main.vue +1 -2
  59. package/packages/form/src/main.vue +129 -0
  60. package/packages/form/src/table.vue +33 -0
  61. package/packages/login/src/main.vue +6 -4
  62. package/packages/theme-chalk/lib/base.css +1 -1
  63. package/packages/theme-chalk/lib/card.css +1 -1
  64. package/packages/theme-chalk/lib/cascader.css +1 -1
  65. package/packages/theme-chalk/lib/icon.css +1 -1
  66. package/packages/theme-chalk/lib/index.css +1 -1
  67. package/packages/theme-chalk/lib/main.css +1 -1
  68. package/packages/theme-chalk/lib/menu.css +1 -1
  69. package/packages/theme-chalk/lib/sizer.css +1 -1
  70. package/packages/theme-chalk/lib/upload.css +1 -1
  71. package/packages/theme-chalk/src/card.scss +63 -22
  72. package/packages/theme-chalk/src/cascader.scss +21 -5
  73. package/packages/theme-chalk/src/icon.scss +0 -1
  74. package/src/index.js +1 -1
  75. package/src/utils/util.js +37 -0
package/lib/dialog.js CHANGED
@@ -1973,7 +1973,45 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1973
1973
  }
1974
1974
  return -1;
1975
1975
  };
1976
+ /**
1977
+ * isEmpty
1978
+ * @desc:判断是否为空
1979
+ * @author huangbo
1980
+ * @date 2022年5月7日
1981
+ * @param {Object} [obj] -
1982
+ **/
1983
+ var isEmpty = function isEmpty(val) {
1984
+ // null or undefined
1985
+ if (val === null || val === undefined) return true;
1986
+
1987
+ if (typeof val === 'boolean') return false;
1988
+
1989
+ if (typeof val === 'number') return !val;
1990
+
1991
+ if (val instanceof Error) return val.message === '';
1976
1992
 
1993
+ switch (Object.prototype.toString.call(val)) {
1994
+ // String or Array
1995
+ case '[object String]':
1996
+ case '[object Array]':
1997
+ return !val.length;
1998
+
1999
+ // Map or Set or File
2000
+ case '[object File]':
2001
+ case '[object Map]':
2002
+ case '[object Set]':
2003
+ {
2004
+ return !val.size;
2005
+ }
2006
+ // Plain Object
2007
+ case '[object Object]':
2008
+ {
2009
+ return !Object.keys(val).length;
2010
+ }
2011
+ }
2012
+
2013
+ return false;
2014
+ };
1977
2015
  /**
1978
2016
  * isExist
1979
2017
  * @desc:判断是否存在
@@ -3054,6 +3092,7 @@ var watermark = function watermark(option) {
3054
3092
  hsvTorgb: hsvTorgb,
3055
3093
  identical: identical,
3056
3094
  indexOfObj: indexOfObj,
3095
+ isEmpty: isEmpty,
3057
3096
  isExist: isExist,
3058
3097
  isFunction: isFunction,
3059
3098
  isLogged: isLogged,