@antv/s2-vue 1.0.1 → 1.0.2

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/esm/index.js CHANGED
@@ -1252,7 +1252,7 @@ const createResizeObserver = (params) => {
1252
1252
  };
1253
1253
  const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
1254
1254
  const onResize = () => {
1255
- const { width: nodeWidth, height: nodeHeight } = container == null ? void 0 : container.getBoundingClientRect();
1255
+ const { clientWidth: nodeWidth, clientHeight: nodeHeight } = container;
1256
1256
  const width = adaptiveWidth ? Math.floor(nodeWidth != null ? nodeWidth : s2.options.width) : s2.options.width;
1257
1257
  const height = adaptiveHeight ? Math.floor(nodeHeight != null ? nodeHeight : s2.options.height) : s2.options.height;
1258
1258
  if (!adaptiveWidth && !adaptiveHeight) {
@@ -2099,9 +2099,8 @@ function useSpreadSheet(props, emit) {
2099
2099
  const rawDataCfg = toRaw(dataCfg);
2100
2100
  const rawOptions = toRaw(options);
2101
2101
  const s2Options = getSheetComponentOptions(rawOptions);
2102
- const s2Constructor = [container, rawDataCfg, s2Options];
2103
2102
  if (onSpreadsheet) {
2104
- return onSpreadsheet(...s2Constructor);
2103
+ return onSpreadsheet(container, rawDataCfg, s2Options);
2105
2104
  }
2106
2105
  if (sheetType === "table") {
2107
2106
  return new TableSheet$1(container, rawDataCfg, s2Options);