bkui-vue 0.0.2-beta.81 → 0.0.2-beta.83

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.
@@ -182,15 +182,13 @@
182
182
  }
183
183
  .bk-search-select-container .search-container-input {
184
184
  position: relative;
185
- display: flex;
185
+ display: block;
186
186
  height: 100%;
187
187
  min-width: 40px;
188
188
  padding: 0 10px;
189
189
  margin-top: -4px;
190
190
  color: #63656e;
191
191
  border: none;
192
- flex: 1 1 auto;
193
- align-items: center;
194
192
  }
195
193
  .bk-search-select-container .search-container-input .input-before:before {
196
194
  color: #c4c6cc;
@@ -132,15 +132,13 @@
132
132
 
133
133
  &-input {
134
134
  position: relative;
135
- display: flex;
135
+ display: block;
136
136
  height: 100%;
137
137
  min-width: 40px;
138
138
  padding: 0 10px;
139
139
  margin-top: -4px;
140
140
  color: @search-select-font-color;
141
141
  border: none;
142
- flex: 1 1 auto;
143
- align-items: center;
144
142
 
145
143
  .input-before {
146
144
  &:before {
@@ -304,15 +304,13 @@
304
304
  }
305
305
  .bk-search-select-container .search-container-input {
306
306
  position: relative;
307
- display: flex;
307
+ display: block;
308
308
  height: 100%;
309
309
  min-width: 40px;
310
310
  padding: 0 10px;
311
311
  margin-top: -4px;
312
312
  color: #63656e;
313
313
  border: none;
314
- flex: 1 1 auto;
315
- align-items: center;
316
314
  }
317
315
  .bk-search-select-container .search-container-input .input-before:before {
318
316
  color: #c4c6cc;
@@ -3789,6 +3789,12 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
3789
3789
  resolvedColumns.length = 0;
3790
3790
  resolvedColumns.push.apply(resolvedColumns, _toConsumableArray(resolveColumns));
3791
3791
  };
3792
+ (0,external_vue_namespaceObject.watch)(function () {
3793
+ return [props.columns];
3794
+ }, function () {
3795
+ resolvedColumns.length = 0;
3796
+ resolvedColumns.push.apply(resolvedColumns, _toConsumableArray(props.columns));
3797
+ });
3792
3798
  var getColumns = function getColumns() {
3793
3799
  return resolvedColumns;
3794
3800
  };
@@ -3807,7 +3813,8 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
3807
3813
  return {
3808
3814
  initColumns: initColumns,
3809
3815
  getColumns: getColumns,
3810
- getActiveColumn: getActiveColumn
3816
+ getActiveColumn: getActiveColumn,
3817
+ columns: resolvedColumns
3811
3818
  };
3812
3819
  });
3813
3820
  ;// CONCATENATED MODULE: ../../packages/table/src/use-common.ts
@@ -5637,6 +5644,7 @@ function use_render_isSlot(s) {
5637
5644
  var _useFixedColumn2 = use_fixed_column(props, tableResp, head),
5638
5645
  resolveFixedColumnStyle = _useFixedColumn2.resolveFixedColumnStyle;
5639
5646
  var getRowRender = function getRowRender(row, rowIndex, preRow, rows, rowSpanMap, needRowSpan) {
5647
+ var isChild = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
5640
5648
  var rowLength = rows.length;
5641
5649
  var rowStyle = [].concat(_toConsumableArray(formatPropAsArray(props.rowStyle, [row, rowIndex])), [{
5642
5650
  '--row-height': "".concat(getRowHeight(row, rowIndex), "px")
@@ -5667,7 +5675,7 @@ function use_render_isSlot(s) {
5667
5675
  rowspan = _resolveCellSpan.rowspan;
5668
5676
  var _tableResp$getColumnA = tableResp.getColumnAttribute(column, COLUMN_ATTRIBUTE.COL_SPAN),
5669
5677
  skipCol = _tableResp$getColumnA.skipCol;
5670
- var _ref2 = needRowSpan ? getRowSpanConfig(row, index, preRow, column, rowSpanMap) : {
5678
+ var _ref2 = needRowSpan && !isChild ? getRowSpanConfig(row, index, preRow, column, rowSpanMap) : {
5671
5679
  skipRow: false
5672
5680
  },
5673
5681
  skipRow = _ref2.skipRow;
@@ -5687,7 +5695,7 @@ function use_render_isSlot(s) {
5687
5695
  column: column,
5688
5696
  cell: {
5689
5697
  getValue: function getValue() {
5690
- return renderCell(row, column, rowIndex, rows);
5698
+ return renderCell(row, column, rowIndex, rows, isChild);
5691
5699
  }
5692
5700
  },
5693
5701
  rowIndex: rowIndex,
@@ -5712,7 +5720,7 @@ function use_render_isSlot(s) {
5712
5720
  "row": row,
5713
5721
  "parentSetting": props.showOverflowTooltip,
5714
5722
  "observerResize": props.observerResize
5715
- }, use_render_isSlot(_slot = renderCell(row, column, rowIndex, rows)) ? _slot : {
5723
+ }, use_render_isSlot(_slot = renderCell(row, column, rowIndex, rows, isChild)) ? _slot : {
5716
5724
  "default": function _default() {
5717
5725
  return [_slot];
5718
5726
  }
@@ -5732,6 +5740,11 @@ function use_render_isSlot(s) {
5732
5740
  }]);
5733
5741
  var rowId = tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_UID);
5734
5742
  var rowKey = "".concat(rowId, "_expand");
5743
+ if (Array.isArray(row.children)) {
5744
+ return row.children.map(function (child, childIndex) {
5745
+ return getRowRender(child, childIndex, {}, row, {}, false, true);
5746
+ });
5747
+ }
5735
5748
  return (0,external_vue_namespaceObject.createVNode)(table_row, {
5736
5749
  "key": rowKey
5737
5750
  }, {
@@ -5782,8 +5795,10 @@ function use_render_isSlot(s) {
5782
5795
  context.emit(EMIT_EVENTS.ROW_MOUSE_LEAVE, e, row, index, rows);
5783
5796
  };
5784
5797
  var getExpandCell = function getExpandCell(row) {
5798
+ var _context$slots$expand3, _context$slots$expand4, _context$slots4;
5785
5799
  var isExpand = tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND);
5786
- return isExpand ? (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.DownShape, null, null) : (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.RightShape, null, null);
5800
+ var icon = isExpand ? (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.DownShape, null, null) : (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.RightShape, null, null);
5801
+ return (0,external_vue_namespaceObject.createVNode)("span", null, [[icon, (_context$slots$expand3 = (_context$slots$expand4 = (_context$slots4 = context.slots).expandContent) === null || _context$slots$expand4 === void 0 ? void 0 : _context$slots$expand4.call(_context$slots4, row)) !== null && _context$slots$expand3 !== void 0 ? _context$slots$expand3 : '']]);
5787
5802
  };
5788
5803
  var handleRowExpandClick = function handleRowExpandClick(row, column, index, rows, e) {
5789
5804
  tableResp.setRowExpand(row, !tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND));
@@ -5848,16 +5863,16 @@ function use_render_isSlot(s) {
5848
5863
  };
5849
5864
  var renderExpandColumn = function renderExpandColumn(row, column, index, rows) {
5850
5865
  var renderExpandSlot = function renderExpandSlot() {
5851
- var _context$slots$expand3, _context$slots$expand4, _context$slots4;
5866
+ var _context$slots$expand5, _context$slots$expand6, _context$slots5;
5852
5867
  if (typeof column.render === 'function') {
5853
5868
  return renderCellCallbackFn(row, column, index, rows);
5854
5869
  }
5855
- return (_context$slots$expand3 = (_context$slots$expand4 = (_context$slots4 = context.slots).expandCell) === null || _context$slots$expand4 === void 0 ? void 0 : _context$slots$expand4.call(_context$slots4, {
5870
+ return (_context$slots$expand5 = (_context$slots$expand6 = (_context$slots5 = context.slots).expandCell) === null || _context$slots$expand6 === void 0 ? void 0 : _context$slots$expand6.call(_context$slots5, {
5856
5871
  row: row,
5857
5872
  column: column,
5858
5873
  index: index,
5859
5874
  rows: rows
5860
- })) !== null && _context$slots$expand3 !== void 0 ? _context$slots$expand3 : getExpandCell(row);
5875
+ })) !== null && _context$slots$expand5 !== void 0 ? _context$slots$expand5 : getExpandCell(row);
5861
5876
  };
5862
5877
  return (0,external_vue_namespaceObject.createVNode)("span", {
5863
5878
  "class": "expand-btn-action",
@@ -5876,6 +5891,7 @@ function use_render_isSlot(s) {
5876
5891
  */
5877
5892
  var renderCell = function renderCell(row, column, index, rows) {
5878
5893
  var _renderFn$column$type, _renderFn$column$type2;
5894
+ var isChild = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
5879
5895
  var defaultFn = function defaultFn() {
5880
5896
  var type = resolvePropVal(column, 'type', [column, row]);
5881
5897
  if (type === 'index') {
@@ -5905,7 +5921,7 @@ function use_render_isSlot(s) {
5905
5921
  };
5906
5922
  var renderFn = {
5907
5923
  expand: function expand(row, column, index, rows) {
5908
- return renderExpandColumn(row, column, index, rows);
5924
+ return isChild ? '' : renderExpandColumn(row, column, index, rows);
5909
5925
  },
5910
5926
  selection: function selection(row, _column, index, _rows) {
5911
5927
  return renderCheckboxColumn(row, index);
@@ -6010,8 +6026,7 @@ function table_objectSpread(target) { for (var i = 1; i < arguments.length; i++)
6010
6026
  var targetColumns = (0,external_vue_namespaceObject.reactive)([]);
6011
6027
  var _useColumn = use_column(props, targetColumns),
6012
6028
  initColumns = _useColumn.initColumns,
6013
- getColumns = _useColumn.getColumns;
6014
- var columns = getColumns();
6029
+ columns = _useColumn.columns;
6015
6030
  var tableSchema = use_attributes(props);
6016
6031
  var _useColumnResize = use_column_resize(tableSchema, false, head),
6017
6032
  resizeColumnStyle = _useColumnResize.resizeColumnStyle,
@@ -182,5 +182,92 @@ declare const _default: (props: TablePropTypes, targetColumns: ITableColumn[]) =
182
182
  head: import("./props").LabelFunctionString;
183
183
  };
184
184
  };
185
+ columns: {
186
+ label: import("./props").LabelFunctionString;
187
+ field?: import("./props").LabelFunctionString;
188
+ render?: import("./props").RenderFunctionString;
189
+ renderHead?: import("./props").RenderFunctionString;
190
+ width?: string | number;
191
+ minWidth?: string | number;
192
+ columnKey?: string;
193
+ showOverflowTooltip?: boolean | {
194
+ content: string | Function;
195
+ disabled?: (col: Column, row: any) => boolean;
196
+ watchCellResize?: boolean;
197
+ mode?: "auto" | "static";
198
+ popoverOption?: any;
199
+ resizerWay?: import("./props").ResizerWay;
200
+ };
201
+ type?: string;
202
+ fixed?: string | boolean;
203
+ resizable?: boolean;
204
+ sort?: string | boolean | {
205
+ sortFn?: Function;
206
+ sortScope?: import("./props").SortScope;
207
+ value?: SORT_OPTION;
208
+ };
209
+ filter?: string | boolean | {
210
+ list: any[];
211
+ filterFn?: Function;
212
+ match?: import("./props").FullEnum;
213
+ checked?: any[];
214
+ filterScope?: import("./props").SortScope;
215
+ btnSave?: string | boolean;
216
+ btnReset?: string | boolean;
217
+ height?: number;
218
+ maxHeight?: number;
219
+ };
220
+ colspan?: (({ column, colIndex, row, rowIndex }: {
221
+ column: any;
222
+ colIndex: any;
223
+ row: any;
224
+ rowIndex: any;
225
+ }) => number) | {
226
+ toString: (radix?: number) => string;
227
+ toFixed: (fractionDigits?: number) => string;
228
+ toExponential: (fractionDigits?: number) => string;
229
+ toPrecision: (precision?: number) => string;
230
+ valueOf: () => number;
231
+ toLocaleString: {
232
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
233
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
234
+ };
235
+ };
236
+ rowspan?: (({ column, colIndex, row, rowIndex }: {
237
+ column: any;
238
+ colIndex: any;
239
+ row: any;
240
+ rowIndex: any;
241
+ }) => number) | {
242
+ toString: (radix?: number) => string;
243
+ toFixed: (fractionDigits?: number) => string;
244
+ toExponential: (fractionDigits?: number) => string;
245
+ toPrecision: (precision?: number) => string;
246
+ valueOf: () => number;
247
+ toLocaleString: {
248
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
249
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
250
+ };
251
+ };
252
+ textAlign?: string;
253
+ className?: import("./props").RowClassFunctionString;
254
+ align?: string;
255
+ prop?: import("./props").LabelFunctionString;
256
+ index?: {
257
+ toString: (radix?: number) => string;
258
+ toFixed: (fractionDigits?: number) => string;
259
+ toExponential: (fractionDigits?: number) => string;
260
+ toPrecision: (precision?: number) => string;
261
+ valueOf: () => number;
262
+ toLocaleString: {
263
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
264
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
265
+ };
266
+ };
267
+ explain?: boolean | {
268
+ content: import("./props").LabelFunctionString;
269
+ head: import("./props").LabelFunctionString;
270
+ };
271
+ }[];
185
272
  };
186
273
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "0.0.2-beta.81",
3
+ "version": "0.0.2-beta.83",
4
4
  "workspaces": {
5
5
  "packages": [
6
6
  "packages/!(**.bak)*",