@v-c/table 1.1.7 → 1.1.9

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.
@@ -1,10 +1,7 @@
1
1
  import { useInjectTableContext } from "../context/TableContext.js";
2
2
  import Cell from "../Cell/index.js";
3
- import { createVNode, defineComponent, isVNode } from "vue";
3
+ import { createVNode, defineComponent } from "vue";
4
4
  //#region src/Body/ExpandedRow.tsx
5
- function _isSlot(s) {
6
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
7
- }
8
5
  var ExpandedRow = /* @__PURE__ */ defineComponent({
9
6
  name: "TableExpandedRow",
10
7
  props: [
@@ -42,8 +39,9 @@ var ExpandedRow = /* @__PURE__ */ defineComponent({
42
39
  }, { default: () => [createVNode(Cell, {
43
40
  "component": cellComponent,
44
41
  "prefixCls": prefixCls,
45
- "colSpan": colSpan
46
- }, _isSlot(contentNode) ? contentNode : { default: () => [contentNode] })] });
42
+ "colSpan": colSpan,
43
+ "children": contentNode
44
+ }, null)] });
47
45
  };
48
46
  }
49
47
  });
@@ -181,7 +181,7 @@ var Cell = /* @__PURE__ */ defineComponent({
181
181
  }
182
182
  const mergedColSpan = legacyCellProps?.colSpan ?? additionalProps.colSpan ?? colSpan ?? 1;
183
183
  const mergedRowSpan = legacyCellProps?.rowSpan ?? additionalProps.rowSpan ?? rowSpan ?? 1;
184
- const mergedHoverRowSpan = hoverRowSpan ?? mergedRowSpan;
184
+ const mergedHoverRowSpan = legacyCellProps?.rowSpan ?? hoverRowSpan ?? mergedRowSpan;
185
185
  const [hovering, onHover] = useHoverState(index, mergedHoverRowSpan, tableContext);
186
186
  const onMouseEnter = (event) => {
187
187
  if (record) onHover(index, index + mergedHoverRowSpan - 1);
package/dist/Table.js CHANGED
@@ -245,7 +245,7 @@ var ImmutableTable = /* @__PURE__ */ defineComponent((props, { attrs, slots, exp
245
245
  const bodyElement = getDOM(scrollBodyRef.value);
246
246
  onInternalScroll({
247
247
  currentTarget: bodyElement,
248
- scrollLeft: bodyElement?.scrollLeft
248
+ scrollLeft: scrollBodyRef.value?.scrollLeft
249
249
  });
250
250
  } else {
251
251
  shadowStart.value = false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/table",
3
3
  "type": "module",
4
- "version": "1.1.7",
4
+ "version": "1.1.9",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/antdv-next/vue-components/tree/next/packages/table",
7
7
  "repository": {
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@v-c/resize-observer": "^1.1.3",
30
- "@v-c/virtual-list": "^1.1.0",
31
- "@v-c/util": "^1.0.21"
30
+ "@v-c/util": "^1.1.0",
31
+ "@v-c/virtual-list": "^1.1.0"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"