eoss-ui 0.5.56 → 0.5.59

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 (73) hide show
  1. package/lib/button-group.js +69 -18
  2. package/lib/button.js +43 -4
  3. package/lib/cascader.js +2 -2
  4. package/lib/checkbox-group.js +41 -2
  5. package/lib/data-table-form.js +41 -2
  6. package/lib/data-table.js +71 -19
  7. package/lib/date-picker.js +43 -4
  8. package/lib/dialog.js +41 -2
  9. package/lib/eoss-ui.common.js +253 -98
  10. package/lib/flow-group.js +41 -2
  11. package/lib/flow-list.js +41 -2
  12. package/lib/flow.js +44 -6
  13. package/lib/form.js +41 -2
  14. package/lib/handle-user.js +41 -2
  15. package/lib/handler.js +41 -2
  16. package/lib/icon.js +3880 -0
  17. package/lib/icons.js +2 -2
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +43 -4
  20. package/lib/input.js +43 -4
  21. package/lib/label.js +2 -2
  22. package/lib/login.js +47 -8
  23. package/lib/main.js +43 -5
  24. package/lib/menu.js +2 -3
  25. package/lib/nav.js +43 -4
  26. package/lib/notify.js +2 -2
  27. package/lib/page.js +43 -4
  28. package/lib/pagination.js +2 -2
  29. package/lib/player.js +43 -4
  30. package/lib/qr-code.js +43 -4
  31. package/lib/radio-group.js +43 -4
  32. package/lib/retrial-auth.js +43 -4
  33. package/lib/select-ganged.js +43 -4
  34. package/lib/select.js +43 -4
  35. package/lib/selector-panel.js +41 -2
  36. package/lib/selector.js +50 -11
  37. package/lib/sizer.js +43 -4
  38. package/lib/steps.js +43 -4
  39. package/lib/switch.js +50 -11
  40. package/lib/table-form.js +43 -4
  41. package/lib/tabs-panel.js +2 -2
  42. package/lib/tabs.js +43 -4
  43. package/lib/theme-chalk/data-table.css +1 -1
  44. package/lib/theme-chalk/index.css +1 -1
  45. package/lib/theme-chalk/menu.css +1 -1
  46. package/lib/tips.js +43 -4
  47. package/lib/toolbar.js +2 -3
  48. package/lib/tree-group.js +43 -4
  49. package/lib/tree.js +49 -8
  50. package/lib/upload.js +46 -8
  51. package/lib/utils/util.js +41 -2
  52. package/lib/wujie.js +43 -4
  53. package/lib/wxlogin.js +176 -137
  54. package/package.json +1 -1
  55. package/packages/button-group/src/main.vue +21 -16
  56. package/packages/data-table/src/column.vue +1 -1
  57. package/packages/data-table/src/main.vue +14 -4
  58. package/packages/flow/src/main.vue +1 -2
  59. package/packages/icon/index.js +5 -0
  60. package/packages/icon/src/main.vue +43 -0
  61. package/packages/login/src/main.vue +6 -4
  62. package/packages/main/src/main.vue +0 -1
  63. package/packages/menu/src/main.vue +0 -1
  64. package/packages/theme-chalk/lib/data-table.css +1 -1
  65. package/packages/theme-chalk/lib/index.css +1 -1
  66. package/packages/theme-chalk/lib/menu.css +1 -1
  67. package/packages/theme-chalk/src/data-table.scss +17 -0
  68. package/packages/theme-chalk/src/menu.scss +3 -5
  69. package/packages/toolbar/src/main.vue +0 -1
  70. package/packages/tree/src/main.vue +14 -2
  71. package/packages/upload/src/main.vue +0 -1
  72. package/src/index.js +4 -1
  73. package/src/utils/util.js +39 -1
package/lib/tree.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 65);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 66);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1974,7 +1974,45 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1974
1974
  }
1975
1975
  return -1;
1976
1976
  };
1977
+ /**
1978
+ * isEmpty
1979
+ * @desc:判断是否为空
1980
+ * @author huangbo
1981
+ * @date 2022年5月7日
1982
+ * @param {Object} [obj] -
1983
+ **/
1984
+ var isEmpty = function isEmpty(val) {
1985
+ // null or undefined
1986
+ if (val === null || val === undefined) return true;
1987
+
1988
+ if (typeof val === 'boolean') return false;
1989
+
1990
+ if (typeof val === 'number') return !val;
1991
+
1992
+ if (val instanceof Error) return val.message === '';
1977
1993
 
1994
+ switch (Object.prototype.toString.call(val)) {
1995
+ // String or Array
1996
+ case '[object String]':
1997
+ case '[object Array]':
1998
+ return !val.length;
1999
+
2000
+ // Map or Set or File
2001
+ case '[object File]':
2002
+ case '[object Map]':
2003
+ case '[object Set]':
2004
+ {
2005
+ return !val.size;
2006
+ }
2007
+ // Plain Object
2008
+ case '[object Object]':
2009
+ {
2010
+ return !Object.keys(val).length;
2011
+ }
2012
+ }
2013
+
2014
+ return false;
2015
+ };
1978
2016
  /**
1979
2017
  * isExist
1980
2018
  * @desc:判断是否存在
@@ -2005,7 +2043,7 @@ var isFunction = function isFunction(obj) {
2005
2043
  * @param {object} [to] - 路由跳转信息
2006
2044
  * @param {object} [from] - 路由来源信息
2007
2045
  * @param {function} [next] - 跳转函数
2008
- * @param {array} [exclude] - 不拦截的路由
2046
+ * @param {array/boolean} [exclude] - 不拦截的路由
2009
2047
  * @param {boolean} [open] - 是否新窗口打开
2010
2048
  * @param {boolean} [cookie] - 是否尝试采用
2011
2049
  * @param {sting} [loginPage] - 第三方登录页面地址
@@ -2158,7 +2196,7 @@ var isLogined = function isLogined(_ref8) {
2158
2196
  });
2159
2197
  }
2160
2198
  }).catch(function (e) {});
2161
- } else if (token || to.path === '/' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2199
+ } else if (token || to.path === '/' || to.path === '/404' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2162
2200
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2163
2201
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2164
2202
  } else {
@@ -3055,6 +3093,7 @@ var watermark = function watermark(option) {
3055
3093
  hsvTorgb: hsvTorgb,
3056
3094
  identical: identical,
3057
3095
  indexOfObj: indexOfObj,
3096
+ isEmpty: isEmpty,
3058
3097
  isExist: isExist,
3059
3098
  isFunction: isFunction,
3060
3099
  isLogged: isLogged,
@@ -3583,14 +3622,14 @@ module.exports = require("json-bigint");
3583
3622
 
3584
3623
  /***/ }),
3585
3624
 
3586
- /***/ 65:
3625
+ /***/ 66:
3587
3626
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3588
3627
 
3589
3628
  "use strict";
3590
3629
  // ESM COMPAT FLAG
3591
3630
  __webpack_require__.r(__webpack_exports__);
3592
3631
 
3593
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=template&id=6991bbb6&
3632
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=template&id=9f4d1ddc&
3594
3633
  var render = function () {
3595
3634
  var _vm = this
3596
3635
  var _h = _vm.$createElement
@@ -3791,7 +3830,7 @@ var staticRenderFns = []
3791
3830
  render._withStripped = true
3792
3831
 
3793
3832
 
3794
- // CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=6991bbb6&
3833
+ // CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=9f4d1ddc&
3795
3834
 
3796
3835
  // EXTERNAL MODULE: ./src/config/api.js
3797
3836
  var api = __webpack_require__(1);
@@ -4096,6 +4135,7 @@ var util = __webpack_require__(0);
4096
4135
  return {};
4097
4136
  }
4098
4137
  },
4138
+ parseData: Function,
4099
4139
  onLoadsub: Function,
4100
4140
  parseParams: Function,
4101
4141
  onNodeClick: Function,
@@ -4186,7 +4226,7 @@ var util = __webpack_require__(0);
4186
4226
  }).then(function (res) {
4187
4227
  _this.loading = false;
4188
4228
  if (res.rCode === 0) {
4189
- var treeList = JSON.parse(JSON.stringify(res.results));
4229
+ var treeList = _this.parseData ? _this.parseData(JSON.parse(JSON.stringify(res.results)), 'results') : JSON.parse(JSON.stringify(res.results));
4190
4230
  _this.$emit('results', treeList);
4191
4231
  if (_this.currentFirst) {
4192
4232
  var currentNode = treeList[0].id;
@@ -4212,6 +4252,7 @@ var util = __webpack_require__(0);
4212
4252
  _this.treeList = treeList;
4213
4253
  }
4214
4254
  }).catch(function (err) {
4255
+ _this.loading = false;
4215
4256
  if (err.message && err.message !== 'canceled') {
4216
4257
  _this.$message.error(err.message);
4217
4258
  }
@@ -4246,7 +4287,7 @@ var util = __webpack_require__(0);
4246
4287
  }).then(function (res) {
4247
4288
  if (res.rCode === 0) {
4248
4289
  _this2.loading = false;
4249
- var results = JSON.parse(JSON.stringify(res.results));
4290
+ var results = _this2.parseData ? _this2.parseData(JSON.parse(JSON.stringify(res.results)), 'sub-results') : JSON.parse(JSON.stringify(res.results));
4250
4291
  _this2.$emit('sub-results', results);
4251
4292
  if (Array.isArray(results)) {
4252
4293
  if (data.id === results[0].id) {
package/lib/upload.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:判断是否存在
@@ -2004,7 +2042,7 @@ var isFunction = function isFunction(obj) {
2004
2042
  * @param {object} [to] - 路由跳转信息
2005
2043
  * @param {object} [from] - 路由来源信息
2006
2044
  * @param {function} [next] - 跳转函数
2007
- * @param {array} [exclude] - 不拦截的路由
2045
+ * @param {array/boolean} [exclude] - 不拦截的路由
2008
2046
  * @param {boolean} [open] - 是否新窗口打开
2009
2047
  * @param {boolean} [cookie] - 是否尝试采用
2010
2048
  * @param {sting} [loginPage] - 第三方登录页面地址
@@ -2157,7 +2195,7 @@ var isLogined = function isLogined(_ref8) {
2157
2195
  });
2158
2196
  }
2159
2197
  }).catch(function (e) {});
2160
- } else if (token || to.path === '/' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2198
+ } else if (token || to.path === '/' || to.path === '/404' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2161
2199
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2162
2200
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2163
2201
  } else {
@@ -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,
@@ -3781,8 +3820,8 @@ module.exports = require("js-base64");
3781
3820
  // ESM COMPAT FLAG
3782
3821
  __webpack_require__.r(__webpack_exports__);
3783
3822
 
3784
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=49429871&
3785
- var mainvue_type_template_id_49429871_render = function () {
3823
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=789e2154&
3824
+ var mainvue_type_template_id_789e2154_render = function () {
3786
3825
  var _vm = this
3787
3826
  var _h = _vm.$createElement
3788
3827
  var _c = _vm._self._c || _h
@@ -4163,10 +4202,10 @@ var mainvue_type_template_id_49429871_render = function () {
4163
4202
  : _vm._e()
4164
4203
  }
4165
4204
  var staticRenderFns = []
4166
- mainvue_type_template_id_49429871_render._withStripped = true
4205
+ mainvue_type_template_id_789e2154_render._withStripped = true
4167
4206
 
4168
4207
 
4169
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=49429871&
4208
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=789e2154&
4170
4209
 
4171
4210
  // EXTERNAL MODULE: ./src/config/api.js
4172
4211
  var api = __webpack_require__(1);
@@ -4693,7 +4732,6 @@ var _props;
4693
4732
  return this.readonly || (this.elForm || {}).readonly;
4694
4733
  },
4695
4734
  isRemove: function isRemove() {
4696
- console.log(this.remove, this.deleted, 999);
4697
4735
  if (this.remove == false || this.deleted == false) {
4698
4736
  return false;
4699
4737
  }
@@ -5267,7 +5305,7 @@ var componentNormalizer = __webpack_require__(3);
5267
5305
 
5268
5306
  var component = Object(componentNormalizer["a" /* default */])(
5269
5307
  src_mainvue_type_script_lang_js_,
5270
- mainvue_type_template_id_49429871_render,
5308
+ mainvue_type_template_id_789e2154_render,
5271
5309
  staticRenderFns,
5272
5310
  false,
5273
5311
  null,
package/lib/utils/util.js CHANGED
@@ -1891,7 +1891,45 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1891
1891
  }
1892
1892
  return -1;
1893
1893
  };
1894
+ /**
1895
+ * isEmpty
1896
+ * @desc:判断是否为空
1897
+ * @author huangbo
1898
+ * @date 2022年5月7日
1899
+ * @param {Object} [obj] -
1900
+ **/
1901
+ var isEmpty = function isEmpty(val) {
1902
+ // null or undefined
1903
+ if (val === null || val === undefined) return true;
1904
+
1905
+ if (typeof val === 'boolean') return false;
1906
+
1907
+ if (typeof val === 'number') return !val;
1908
+
1909
+ if (val instanceof Error) return val.message === '';
1894
1910
 
1911
+ switch (Object.prototype.toString.call(val)) {
1912
+ // String or Array
1913
+ case '[object String]':
1914
+ case '[object Array]':
1915
+ return !val.length;
1916
+
1917
+ // Map or Set or File
1918
+ case '[object File]':
1919
+ case '[object Map]':
1920
+ case '[object Set]':
1921
+ {
1922
+ return !val.size;
1923
+ }
1924
+ // Plain Object
1925
+ case '[object Object]':
1926
+ {
1927
+ return !Object.keys(val).length;
1928
+ }
1929
+ }
1930
+
1931
+ return false;
1932
+ };
1895
1933
  /**
1896
1934
  * isExist
1897
1935
  * @desc:判断是否存在
@@ -1922,7 +1960,7 @@ var isFunction = function isFunction(obj) {
1922
1960
  * @param {object} [to] - 路由跳转信息
1923
1961
  * @param {object} [from] - 路由来源信息
1924
1962
  * @param {function} [next] - 跳转函数
1925
- * @param {array} [exclude] - 不拦截的路由
1963
+ * @param {array/boolean} [exclude] - 不拦截的路由
1926
1964
  * @param {boolean} [open] - 是否新窗口打开
1927
1965
  * @param {boolean} [cookie] - 是否尝试采用
1928
1966
  * @param {sting} [loginPage] - 第三方登录页面地址
@@ -2075,7 +2113,7 @@ var isLogined = function isLogined(_ref8) {
2075
2113
  });
2076
2114
  }
2077
2115
  }).catch(function (e) {});
2078
- } else if (token || to.path === '/' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2116
+ } else if (token || to.path === '/' || to.path === '/404' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2079
2117
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2080
2118
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2081
2119
  } else {
@@ -2972,6 +3010,7 @@ exports.default = {
2972
3010
  hsvTorgb: hsvTorgb,
2973
3011
  identical: identical,
2974
3012
  indexOfObj: indexOfObj,
3013
+ isEmpty: isEmpty,
2975
3014
  isExist: isExist,
2976
3015
  isFunction: isFunction,
2977
3016
  isLogged: isLogged,
package/lib/wujie.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 68);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 69);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -1974,7 +1974,45 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1974
1974
  }
1975
1975
  return -1;
1976
1976
  };
1977
+ /**
1978
+ * isEmpty
1979
+ * @desc:判断是否为空
1980
+ * @author huangbo
1981
+ * @date 2022年5月7日
1982
+ * @param {Object} [obj] -
1983
+ **/
1984
+ var isEmpty = function isEmpty(val) {
1985
+ // null or undefined
1986
+ if (val === null || val === undefined) return true;
1987
+
1988
+ if (typeof val === 'boolean') return false;
1989
+
1990
+ if (typeof val === 'number') return !val;
1991
+
1992
+ if (val instanceof Error) return val.message === '';
1977
1993
 
1994
+ switch (Object.prototype.toString.call(val)) {
1995
+ // String or Array
1996
+ case '[object String]':
1997
+ case '[object Array]':
1998
+ return !val.length;
1999
+
2000
+ // Map or Set or File
2001
+ case '[object File]':
2002
+ case '[object Map]':
2003
+ case '[object Set]':
2004
+ {
2005
+ return !val.size;
2006
+ }
2007
+ // Plain Object
2008
+ case '[object Object]':
2009
+ {
2010
+ return !Object.keys(val).length;
2011
+ }
2012
+ }
2013
+
2014
+ return false;
2015
+ };
1978
2016
  /**
1979
2017
  * isExist
1980
2018
  * @desc:判断是否存在
@@ -2005,7 +2043,7 @@ var isFunction = function isFunction(obj) {
2005
2043
  * @param {object} [to] - 路由跳转信息
2006
2044
  * @param {object} [from] - 路由来源信息
2007
2045
  * @param {function} [next] - 跳转函数
2008
- * @param {array} [exclude] - 不拦截的路由
2046
+ * @param {array/boolean} [exclude] - 不拦截的路由
2009
2047
  * @param {boolean} [open] - 是否新窗口打开
2010
2048
  * @param {boolean} [cookie] - 是否尝试采用
2011
2049
  * @param {sting} [loginPage] - 第三方登录页面地址
@@ -2158,7 +2196,7 @@ var isLogined = function isLogined(_ref8) {
2158
2196
  });
2159
2197
  }
2160
2198
  }).catch(function (e) {});
2161
- } else if (token || to.path === '/' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2199
+ } else if (token || to.path === '/' || to.path === '/404' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2162
2200
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2163
2201
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2164
2202
  } else {
@@ -3055,6 +3093,7 @@ var watermark = function watermark(option) {
3055
3093
  hsvTorgb: hsvTorgb,
3056
3094
  identical: identical,
3057
3095
  indexOfObj: indexOfObj,
3096
+ isEmpty: isEmpty,
3058
3097
  isExist: isExist,
3059
3098
  isFunction: isFunction,
3060
3099
  isLogged: isLogged,
@@ -3583,7 +3622,7 @@ module.exports = require("json-bigint");
3583
3622
 
3584
3623
  /***/ }),
3585
3624
 
3586
- /***/ 68:
3625
+ /***/ 69:
3587
3626
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3588
3627
 
3589
3628
  "use strict";