@v-c/table 1.1.0-rc.1 → 1.1.0

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.
@@ -60,10 +60,19 @@ var BodyLine = /* @__PURE__ */ defineComponent({
60
60
  ...rowStyle,
61
61
  ...typeof rowPropsStyle === "object" ? rowPropsStyle : {}
62
62
  };
63
+ const expandedClsName = tableContext?.expandedRowClassName?.(record, index, indent);
64
+ const tableClassNames = tableContext.classNames;
65
+ const tableStyles = tableContext.styles;
63
66
  const rowNode = createVNode(RowComponent, mergeProps(rowProps.value, {
64
67
  "data-row-key": rowKey,
65
- "class": clsx(className, `${tableContext.prefixCls}-row`, rowProps.value?.className, rowProps.value?.class, { [`${tableContext.prefixCls}-row-extra`]: extra }),
66
- "style": mergedRowStyle
68
+ "class": clsx(className, `${tableContext.prefixCls}-row`, rowProps.value?.className, rowProps.value?.class, tableClassNames?.body?.row, {
69
+ [expandedClsName]: indent >= 1 && expandedClsName,
70
+ [`${tableContext.prefixCls}-row-extra`]: extra
71
+ }),
72
+ "style": {
73
+ ...mergedRowStyle,
74
+ ...tableStyles?.body?.row
75
+ }
67
76
  }), _isSlot(_slot = tableContext.flattenColumns.map((column, colIndex) => {
68
77
  return createVNode(VirtualCell, {
69
78
  "key": colIndex,
@@ -76,7 +85,9 @@ var BodyLine = /* @__PURE__ */ defineComponent({
76
85
  "renderIndex": renderIndex,
77
86
  "record": record,
78
87
  "inverse": extra,
79
- "getHeight": getHeight
88
+ "getHeight": getHeight,
89
+ "className": tableClassNames?.body?.cell,
90
+ "style": tableStyles?.body?.cell
80
91
  }, null);
81
92
  })) ? _slot : { default: () => [_slot] });
82
93
  if (rowSupportExpand.value) return createVNode("div", null, [rowNode, expandRowNode]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/table",
3
3
  "type": "module",
4
- "version": "1.1.0-rc.1",
4
+ "version": "1.1.0",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "vue": "^3.0.0"
21
21
  },
22
22
  "dependencies": {
23
- "@v-c/resize-observer": "^1.0.8",
23
+ "@v-c/resize-observer": "^1.1.0",
24
24
  "@v-c/util": "^1.0.19",
25
25
  "@v-c/virtual-list": "^1.0.7"
26
26
  },