bkui-vue 2.0.1-beta.36 → 2.0.1-beta.37

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.
package/lib/index.js CHANGED
@@ -4,5 +4,5 @@ export { default } from './preset';
4
4
  export * from './config-provider';
5
5
  export * from './directives';
6
6
  export * as plugins from './plugins';
7
- export const version = "2.0.1-beta.36";
7
+ export const version = "2.0.1-beta.37";
8
8
  window.__bkui_vue_version__ = version;
@@ -82,6 +82,9 @@ declare const BkTable: {
82
82
  emptyCellText: import("vue-types").VueTypeDef<any> & {
83
83
  default: any;
84
84
  };
85
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
86
+ default: any;
87
+ };
85
88
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
86
89
  rowClass: import("vue-types").VueTypeDef<any> & {
87
90
  default: any;
@@ -251,6 +254,9 @@ declare const BkTable: {
251
254
  emptyCellText: import("vue-types").VueTypeDef<any> & {
252
255
  default: any;
253
256
  };
257
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
258
+ default: any;
259
+ };
254
260
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
255
261
  rowClass: import("vue-types").VueTypeDef<any> & {
256
262
  default: any;
@@ -371,6 +377,7 @@ declare const BkTable: {
371
377
  remotePagination: boolean;
372
378
  acrossAll: boolean;
373
379
  emptyCellText: any;
380
+ isEmptyCell: any;
374
381
  rowClass: any;
375
382
  rowStyle: any;
376
383
  cellStyle: any;
@@ -472,6 +479,9 @@ declare const BkTable: {
472
479
  emptyCellText: import("vue-types").VueTypeDef<any> & {
473
480
  default: any;
474
481
  };
482
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
483
+ default: any;
484
+ };
475
485
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
476
486
  rowClass: import("vue-types").VueTypeDef<any> & {
477
487
  default: any;
@@ -592,6 +602,7 @@ declare const BkTable: {
592
602
  remotePagination: boolean;
593
603
  acrossAll: boolean;
594
604
  emptyCellText: any;
605
+ isEmptyCell: any;
595
606
  rowClass: any;
596
607
  rowStyle: any;
597
608
  cellStyle: any;
@@ -690,6 +701,9 @@ declare const BkTable: {
690
701
  emptyCellText: import("vue-types").VueTypeDef<any> & {
691
702
  default: any;
692
703
  };
704
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
705
+ default: any;
706
+ };
693
707
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
694
708
  rowClass: import("vue-types").VueTypeDef<any> & {
695
709
  default: any;
@@ -810,6 +824,7 @@ declare const BkTable: {
810
824
  remotePagination: boolean;
811
825
  acrossAll: boolean;
812
826
  emptyCellText: any;
827
+ isEmptyCell: any;
813
828
  rowClass: any;
814
829
  rowStyle: any;
815
830
  cellStyle: any;
@@ -17771,6 +17771,12 @@ var tableProps = {
17771
17771
  emptyCellText: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.func.def(function () {
17772
17772
  return '';
17773
17773
  })]).def(''),
17774
+ /**
17775
+ * 判定单元格是否为空
17776
+ * 支持数组:判定条件为 arr.some(item => item === cellText)
17777
+ * 支持函数回调:返回结果为 true | false, ({ cellText, row, column }) => boolean
17778
+ */
17779
+ isEmptyCell: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.arrayOf(external_vue_types_namespaceObject.string), shared_namespaceObject.PropTypes.arrayOf(null), shared_namespaceObject.PropTypes.arrayOf(undefined), shared_namespaceObject.PropTypes.func]).def(['', undefined, null]),
17774
17780
  /**
17775
17781
  * bk-table-setting-content
17776
17782
  */
@@ -22053,6 +22059,21 @@ const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MO
22053
22059
  "onChange": handleChecked
22054
22060
  }, null);
22055
22061
  };
22062
+ var isEmptyCellText = function isEmptyCellText(cellText) {
22063
+ if (Array.isArray(props.isEmptyCell)) {
22064
+ return props.isEmptyCell.some(function (item) {
22065
+ return item === cellText;
22066
+ });
22067
+ }
22068
+ if (typeof props.isEmptyCell === 'function') {
22069
+ return props.isEmptyCell({
22070
+ cellText: cellText,
22071
+ row: row,
22072
+ column: column
22073
+ });
22074
+ }
22075
+ return (0,lodash.isEmpty)(cellText);
22076
+ };
22056
22077
  /**
22057
22078
  * 渲染表格Cell内容
22058
22079
  * @param row 当前行
@@ -22076,10 +22097,10 @@ const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MO
22076
22097
  if (typeof cell === 'boolean' || typeof cell === 'number') {
22077
22098
  return "".concat(cell);
22078
22099
  }
22079
- if (typeof_typeof(cell) === 'object') {
22100
+ if (typeof_typeof(cell) === 'object' && cell !== null) {
22080
22101
  return JSON.stringify((0,external_vue_namespaceObject.unref)(cell));
22081
22102
  }
22082
- if ((0,lodash.isEmpty)(cell)) {
22103
+ if (isEmptyCellText(cell)) {
22083
22104
  var emptyCellText = props.emptyCellText;
22084
22105
  if (emptyCellText) {
22085
22106
  if (typeof emptyCellText === 'function') {
@@ -409,6 +409,14 @@ export declare const tableProps: {
409
409
  emptyCellText: import("vue-types").VueTypeDef<any> & {
410
410
  default: any;
411
411
  };
412
+ /**
413
+ * 判定单元格是否为空
414
+ * 支持数组:判定条件为 arr.some(item => item === cellText)
415
+ * 支持函数回调:返回结果为 true | false, ({ cellText, row, column }) => boolean
416
+ */
417
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
418
+ default: any;
419
+ };
412
420
  /**
413
421
  * bk-table-setting-content
414
422
  */
@@ -76,6 +76,9 @@ declare const _default: import("vue").DefineComponent<{
76
76
  emptyCellText: import("vue-types").VueTypeDef<any> & {
77
77
  default: any;
78
78
  };
79
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
80
+ default: any;
81
+ };
79
82
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
80
83
  rowClass: import("vue-types").VueTypeDef<any> & {
81
84
  default: any;
@@ -245,6 +248,9 @@ declare const _default: import("vue").DefineComponent<{
245
248
  emptyCellText: import("vue-types").VueTypeDef<any> & {
246
249
  default: any;
247
250
  };
251
+ isEmptyCell: import("vue-types").VueTypeDef<any> & {
252
+ default: any;
253
+ };
248
254
  settings: import("vue-types").VueTypeDef<import("./props").ISettingPropType>;
249
255
  rowClass: import("vue-types").VueTypeDef<any> & {
250
256
  default: any;
@@ -365,6 +371,7 @@ declare const _default: import("vue").DefineComponent<{
365
371
  remotePagination: boolean;
366
372
  acrossAll: boolean;
367
373
  emptyCellText: any;
374
+ isEmptyCell: any;
368
375
  rowClass: any;
369
376
  rowStyle: any;
370
377
  cellStyle: any;
@@ -17746,6 +17746,12 @@ var tableProps = {
17746
17746
  emptyCellText: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.func.def(function () {
17747
17747
  return '';
17748
17748
  })]).def(''),
17749
+ /**
17750
+ * 判定单元格是否为空
17751
+ * 支持数组:判定条件为 arr.some(item => item === cellText)
17752
+ * 支持函数回调:返回结果为 true | false, ({ cellText, row, column }) => boolean
17753
+ */
17754
+ isEmptyCell: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.arrayOf(external_vue_types_namespaceObject.string), shared_namespaceObject.PropTypes.arrayOf(null), shared_namespaceObject.PropTypes.arrayOf(undefined), shared_namespaceObject.PropTypes.func]).def(['', undefined, null]),
17749
17755
  /**
17750
17756
  * bk-table-setting-content
17751
17757
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.1-beta.36",
3
+ "version": "2.0.1-beta.37",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",