bkui-vue 1.0.3-beta.41 → 1.0.3-beta.43

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.
@@ -855,7 +855,7 @@ var TableColumnProp = {
855
855
  var resolveProp = Object.assign({}, this.copyProps(props), {
856
856
  field: props.prop || props.field,
857
857
  render: (_props$render = props.render) !== null && _props$render !== void 0 ? _props$render : this.$slots["default"],
858
- uniqueId: this.getNodeUid(this.$.ctx)
858
+ uniqueId: this.getNodeCtxUid(this.$.ctx)
859
859
  });
860
860
  this.initColumns(resolveProp);
861
861
  return false;
@@ -864,6 +864,9 @@ var TableColumnProp = {
864
864
  },
865
865
  setNodeUid: function setNodeUid() {
866
866
  var ctx = this.$.ctx;
867
+ if (!ctx) {
868
+ return;
869
+ }
867
870
  if (ctx.uniqueId && !ctx.uniqueId.val) {
868
871
  ctx.uniqueId.val = esm_browser_v4();
869
872
  }
@@ -875,9 +878,9 @@ var TableColumnProp = {
875
878
  });
876
879
  }
877
880
  },
878
- getNodeUid: function getNodeUid(ctx) {
881
+ getNodeCtxUid: function getNodeCtxUid(ctx) {
879
882
  var _ctx$uniqueId;
880
- return (_ctx$uniqueId = ctx.uniqueId) === null || _ctx$uniqueId === void 0 ? void 0 : _ctx$uniqueId.val;
883
+ return ctx === null || ctx === void 0 || (_ctx$uniqueId = ctx.uniqueId) === null || _ctx$uniqueId === void 0 ? void 0 : _ctx$uniqueId.val;
881
884
  },
882
885
  updateColumnDefineByParent: function updateColumnDefineByParent() {
883
886
  var _this = this;
@@ -899,7 +902,7 @@ var TableColumnProp = {
899
902
  return getTableNode(parentVnode);
900
903
  };
901
904
  var getNodeUid = function getNodeUid(node) {
902
- return _this.getNodeUid(node.ctx);
905
+ return _this.getNodeCtxUid(node.ctx);
903
906
  };
904
907
  var tableNode = getTableNode(selfVnode);
905
908
  if (!tableNode) {
@@ -919,7 +922,7 @@ var TableColumnProp = {
919
922
  }, _this.copyProps(node.props), {
920
923
  field: node.props.prop || node.props.field,
921
924
  render: (_node$props$render = node.props.render) !== null && _node$props$render !== void 0 ? _node$props$render : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"],
922
- uniqueId: getNodeUid(node.ctx)
925
+ uniqueId: getNodeUid(node)
923
926
  });
924
927
  sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
925
928
  index = index + 1;
@@ -963,7 +966,7 @@ var TableColumnProp = {
963
966
  var resolveProp = Object.assign({}, this.copyProps(this.$props), {
964
967
  field: props.prop || props.field,
965
968
  render: (_props$render2 = props.render) !== null && _props$render2 !== void 0 ? _props$render2 : this.$slots["default"],
966
- uniqueId: this.getNodeUid(this.$.ctx)
969
+ uniqueId: this.getNodeCtxUid(this.$.ctx)
967
970
  });
968
971
  this.initColumns(resolveProp, true);
969
972
  }
@@ -2881,7 +2884,7 @@ var getRowKeyNull = function getRowKeyNull(item, props, index) {
2881
2884
  if (props.rowKey === TABLE_ROW_ATTRIBUTE.ROW_INDEX) {
2882
2885
  return "__ROW_INDEX_".concat(index);
2883
2886
  }
2884
- return (0,get_namespaceObject["default"])(item, props.rowKey);
2887
+ return props.rowKey;
2885
2888
  }
2886
2889
  if (typeof props.rowKey === 'function') {
2887
2890
  return Reflect.apply(props.rowKey, _this, [item]);
@@ -3055,7 +3058,7 @@ var isRowSelectEnable = function isRowSelectEnable(props, _ref3) {
3055
3058
  var getRowId = function getRowId(row, defVal, props) {
3056
3059
  var key = getRowKey(row, props, defVal);
3057
3060
  if (key !== undefined && row[key] !== undefined) {
3058
- return row[key];
3061
+ return (0,get_namespaceObject["default"])(row, key);
3059
3062
  }
3060
3063
  return defVal;
3061
3064
  };
@@ -6404,7 +6407,8 @@ function use_render_isSlot(s) {
6404
6407
  return [(0,external_vue_namespaceObject.createVNode)("tr", (0,external_vue_namespaceObject.mergeProps)({
6405
6408
  "style": rowStyle,
6406
6409
  "class": rowClass,
6407
- "key": getRowKeyNull(row, props, rowIndex),
6410
+ "data-row-id": rowId,
6411
+ "key": rowId,
6408
6412
  "data-row-index": rowIndex,
6409
6413
  "onClick": function onClick(e) {
6410
6414
  return handleRowClick(e, row, rowIndex, rows);
@@ -97,7 +97,7 @@ export declare const getRowValue: (row: any, key: string) => any;
97
97
  export declare const formatPropAsArray: (prop: string | object | (() => any), args: any[]) => any;
98
98
  export declare const isRenderScrollBottomLoading: (props: TablePropTypes) => boolean;
99
99
  export declare const getRowKey: (item: any, props: TablePropTypes, index: number) => any;
100
- export declare const getRowKeyNull: (item: any, props: TablePropTypes, index: number) => any;
100
+ export declare const getRowKeyNull: (item: any, props: TablePropTypes, index: number) => unknown;
101
101
  export declare const hasRootScrollY: (root: any, querySelector: string, offsetHeight?: number) => boolean;
102
102
  export declare const getColumnClass: (column: Column, colIndex?: number, uuid?: string) => {
103
103
  column_fixed: boolean;
@@ -208,7 +208,7 @@ declare const BkTableColumn: {
208
208
  }): {};
209
209
  rsolveIndexedColumn(): boolean;
210
210
  setNodeUid(): void;
211
- getNodeUid(ctx: any): any;
211
+ getNodeCtxUid(ctx: any): any;
212
212
  updateColumnDefineByParent(): void;
213
213
  unmountColumn(): void;
214
214
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
@@ -498,7 +498,7 @@ declare const BkTableColumn: {
498
498
  }): {};
499
499
  rsolveIndexedColumn(): boolean;
500
500
  setNodeUid(): void;
501
- getNodeUid(ctx: any): any;
501
+ getNodeCtxUid(ctx: any): any;
502
502
  updateColumnDefineByParent(): void;
503
503
  unmountColumn(): void;
504
504
  }, {
@@ -725,7 +725,7 @@ declare const BkTableColumn: {
725
725
  }): {};
726
726
  rsolveIndexedColumn(): boolean;
727
727
  setNodeUid(): void;
728
- getNodeUid(ctx: any): any;
728
+ getNodeCtxUid(ctx: any): any;
729
729
  updateColumnDefineByParent(): void;
730
730
  unmountColumn(): void;
731
731
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
@@ -816,7 +816,7 @@ var TableColumnProp = {
816
816
  var resolveProp = Object.assign({}, this.copyProps(props), {
817
817
  field: props.prop || props.field,
818
818
  render: (_props$render = props.render) !== null && _props$render !== void 0 ? _props$render : this.$slots["default"],
819
- uniqueId: this.getNodeUid(this.$.ctx)
819
+ uniqueId: this.getNodeCtxUid(this.$.ctx)
820
820
  });
821
821
  this.initColumns(resolveProp);
822
822
  return false;
@@ -825,6 +825,9 @@ var TableColumnProp = {
825
825
  },
826
826
  setNodeUid: function setNodeUid() {
827
827
  var ctx = this.$.ctx;
828
+ if (!ctx) {
829
+ return;
830
+ }
828
831
  if (ctx.uniqueId && !ctx.uniqueId.val) {
829
832
  ctx.uniqueId.val = esm_browser_v4();
830
833
  }
@@ -836,9 +839,9 @@ var TableColumnProp = {
836
839
  });
837
840
  }
838
841
  },
839
- getNodeUid: function getNodeUid(ctx) {
842
+ getNodeCtxUid: function getNodeCtxUid(ctx) {
840
843
  var _ctx$uniqueId;
841
- return (_ctx$uniqueId = ctx.uniqueId) === null || _ctx$uniqueId === void 0 ? void 0 : _ctx$uniqueId.val;
844
+ return ctx === null || ctx === void 0 || (_ctx$uniqueId = ctx.uniqueId) === null || _ctx$uniqueId === void 0 ? void 0 : _ctx$uniqueId.val;
842
845
  },
843
846
  updateColumnDefineByParent: function updateColumnDefineByParent() {
844
847
  var _this = this;
@@ -860,7 +863,7 @@ var TableColumnProp = {
860
863
  return getTableNode(parentVnode);
861
864
  };
862
865
  var getNodeUid = function getNodeUid(node) {
863
- return _this.getNodeUid(node.ctx);
866
+ return _this.getNodeCtxUid(node.ctx);
864
867
  };
865
868
  var tableNode = getTableNode(selfVnode);
866
869
  if (!tableNode) {
@@ -880,7 +883,7 @@ var TableColumnProp = {
880
883
  }, _this.copyProps(node.props), {
881
884
  field: node.props.prop || node.props.field,
882
885
  render: (_node$props$render = node.props.render) !== null && _node$props$render !== void 0 ? _node$props$render : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"],
883
- uniqueId: getNodeUid(node.ctx)
886
+ uniqueId: getNodeUid(node)
884
887
  });
885
888
  sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
886
889
  index = index + 1;
@@ -924,7 +927,7 @@ var TableColumnProp = {
924
927
  var resolveProp = Object.assign({}, this.copyProps(this.$props), {
925
928
  field: props.prop || props.field,
926
929
  render: (_props$render2 = props.render) !== null && _props$render2 !== void 0 ? _props$render2 : this.$slots["default"],
927
- uniqueId: this.getNodeUid(this.$.ctx)
930
+ uniqueId: this.getNodeCtxUid(this.$.ctx)
928
931
  });
929
932
  this.initColumns(resolveProp, true);
930
933
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "1.0.3-beta.41",
3
+ "version": "1.0.3-beta.43",
4
4
  "workspaces": {
5
5
  "packages": [
6
6
  "packages/!(**.bak)*",