@visactor/vue-vtable 1.13.3-alpha.6 → 1.13.3-alpha.7

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/cjs/index.d.ts CHANGED
@@ -2,4 +2,4 @@ import * as VTable from '@visactor/vtable';
2
2
  export * from './tables';
3
3
  export * from './components';
4
4
  export { VTable };
5
- export declare const version = "1.13.3-alpha.6";
5
+ export declare const version = "1.13.3-alpha.7";
package/cjs/index.js CHANGED
@@ -40,7 +40,7 @@ function _interopNamespaceDefault(e) {
40
40
 
41
41
  var VTable__namespace = /*#__PURE__*/_interopNamespaceDefault(VTable);
42
42
 
43
- const version = "1.13.3-alpha.6";
43
+ const version = "1.13.3-alpha.7";
44
44
 
45
45
  exports.VTable = VTable__namespace;
46
46
  Object.defineProperty(exports, 'register', {
@@ -23,7 +23,7 @@ var _sfc_main = vue.defineComponent({
23
23
  var _a;
24
24
  const flattenedSlots = vnodeUtils.flattenVNodes(((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) || []);
25
25
  const slotOptions = slotUtils.extractListSlotOptions(flattenedSlots);
26
- return slotUtils.mergeSlotOptions(props.options, slotOptions);
26
+ return Object.assign(Object.assign({}, props.options), { columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns, tooltip: slotOptions.tooltip || props.options.tooltip, menu: slotOptions.menu || props.options.menu });
27
27
  });
28
28
  __expose({
29
29
  vTableInstance: vue.computed(() => { var _a; return ((_a = baseTableRef.value) === null || _a === void 0 ? void 0 : _a.vTableInstance) || null; }),
@@ -23,7 +23,7 @@ var _sfc_main = vue.defineComponent({
23
23
  var _a;
24
24
  const flattenedSlots = vnodeUtils.flattenVNodes(((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) || []);
25
25
  const slotOptions = slotUtils.extractPivotSlotOptions(flattenedSlots);
26
- return slotUtils.mergeSlotOptions(props.options, slotOptions);
26
+ return Object.assign(Object.assign({}, props.options), { columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns, columnHeaderTitle: slotOptions.columnHeaderTitle.length ? slotOptions.columnHeaderTitle : props.options.columnHeaderTitle, rows: slotOptions.rows.length ? slotOptions.rows : props.options.rows, rowHeaderTitle: slotOptions.rowHeaderTitle.length ? slotOptions.rowHeaderTitle : props.options.rowHeaderTitle, indicators: slotOptions.indicators.length ? slotOptions.indicators : props.options.indicators, corner: props.options.corner || slotOptions.corner, tooltip: props.options.tooltip || slotOptions.tooltip, menu: props.options.menu || slotOptions.menu });
27
27
  });
28
28
  __expose({ vTableInstance: vue.computed(() => { var _a; return ((_a = baseTableRef.value) === null || _a === void 0 ? void 0 : _a.vTableInstance) || null; }) });
29
29
  return (_ctx, _cache) => {
@@ -23,7 +23,7 @@ var _sfc_main = vue.defineComponent({
23
23
  var _a;
24
24
  const flattenedSlots = vnodeUtils.flattenVNodes(((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) || []);
25
25
  const slotOptions = slotUtils.extractPivotSlotOptions(flattenedSlots);
26
- return slotUtils.mergeSlotOptions(props.options, slotOptions);
26
+ return Object.assign(Object.assign({}, props.options), { columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns, columnHeaderTitle: slotOptions.columnHeaderTitle.length ? slotOptions.columnHeaderTitle : props.options.columnHeaderTitle, rows: slotOptions.rows.length ? slotOptions.rows : props.options.rows, rowHeaderTitle: slotOptions.rowHeaderTitle.length ? slotOptions.rowHeaderTitle : props.options.rowHeaderTitle, indicators: slotOptions.indicators.length ? slotOptions.indicators : props.options.indicators, corner: props.options.corner || slotOptions.corner, tooltip: props.options.tooltip || slotOptions.tooltip, menu: props.options.menu || slotOptions.menu });
27
27
  });
28
28
  __expose({ vTableInstance: vue.computed(() => { var _a; return ((_a = baseTableRef.value) === null || _a === void 0 ? void 0 : _a.vTableInstance) || null; }) });
29
29
  return (_ctx, _cache) => {
@@ -16,13 +16,3 @@ export declare function extractListSlotOptions(vnodes: any[]): {
16
16
  tooltip: TooltipProps;
17
17
  menu: MenuProps;
18
18
  };
19
- export declare function mergeSlotOptions(propsOptions: Record<string, unknown>, slotOptions: Record<string, any>): {
20
- columns: any;
21
- columnHeaderTitle: any;
22
- rows: any;
23
- rowHeaderTitle: any;
24
- indicators: any;
25
- corner: any;
26
- tooltip: any;
27
- menu: any;
28
- };
@@ -74,15 +74,7 @@ function extractListSlotOptions(vnodes) {
74
74
  }
75
75
  });
76
76
  return options;
77
- }
78
- function mergeSlotOptions(propsOptions, slotOptions) {
79
- return Object.assign(Object.assign({}, propsOptions), { columns: slotOptions.columns && slotOptions.columns.length ? slotOptions.columns : propsOptions.columns, columnHeaderTitle: slotOptions.columnHeaderTitle && slotOptions.columnHeaderTitle.length
80
- ? slotOptions.columnHeaderTitle
81
- : propsOptions.columnHeaderTitle, rows: slotOptions.rows && slotOptions.rows.length ? slotOptions.rows : propsOptions.rows, rowHeaderTitle: slotOptions.rowHeaderTitle && slotOptions.rowHeaderTitle.length
82
- ? slotOptions.rowHeaderTitle
83
- : propsOptions.rowHeaderTitle, indicators: slotOptions.indicators && slotOptions.indicators.length ? slotOptions.indicators : propsOptions.indicators, corner: Object.keys(propsOptions.corner || {}).length ? propsOptions.corner : slotOptions.corner, tooltip: Object.keys(slotOptions.tooltip || {}).length ? slotOptions.tooltip : propsOptions.tooltip, menu: Object.keys(slotOptions.menu || {}).length ? slotOptions.menu : propsOptions.menu });
84
77
  }
85
78
 
86
79
  exports.extractListSlotOptions = extractListSlotOptions;
87
80
  exports.extractPivotSlotOptions = extractPivotSlotOptions;
88
- exports.mergeSlotOptions = mergeSlotOptions;
@@ -185,23 +185,6 @@
185
185
  }
186
186
  });
187
187
  return options;
188
- }
189
- function mergeSlotOptions(propsOptions, slotOptions) {
190
- return {
191
- ...propsOptions,
192
- columns: slotOptions.columns && slotOptions.columns.length ? slotOptions.columns : propsOptions.columns,
193
- columnHeaderTitle: slotOptions.columnHeaderTitle && slotOptions.columnHeaderTitle.length
194
- ? slotOptions.columnHeaderTitle
195
- : propsOptions.columnHeaderTitle,
196
- rows: slotOptions.rows && slotOptions.rows.length ? slotOptions.rows : propsOptions.rows,
197
- rowHeaderTitle: slotOptions.rowHeaderTitle && slotOptions.rowHeaderTitle.length
198
- ? slotOptions.rowHeaderTitle
199
- : propsOptions.rowHeaderTitle,
200
- indicators: slotOptions.indicators && slotOptions.indicators.length ? slotOptions.indicators : propsOptions.indicators,
201
- corner: Object.keys(propsOptions.corner || {}).length ? propsOptions.corner : slotOptions.corner,
202
- tooltip: Object.keys(slotOptions.tooltip || {}).length ? slotOptions.tooltip : propsOptions.tooltip,
203
- menu: Object.keys(slotOptions.menu || {}).length ? slotOptions.menu : propsOptions.menu
204
- };
205
188
  }
206
189
 
207
190
  const EVENT_TYPE = {
@@ -453,7 +436,12 @@
453
436
  const computedOptions = vue.computed(() => {
454
437
  const flattenedSlots = flattenVNodes(slots.default?.() || []);
455
438
  const slotOptions = extractListSlotOptions(flattenedSlots);
456
- return mergeSlotOptions(props.options, slotOptions);
439
+ return {
440
+ ...props.options,
441
+ columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns,
442
+ tooltip: slotOptions.tooltip || props.options.tooltip,
443
+ menu: slotOptions.menu || props.options.menu,
444
+ };
457
445
  });
458
446
  __expose({
459
447
  vTableInstance: vue.computed(() => baseTableRef.value?.vTableInstance || null),
@@ -490,7 +478,17 @@
490
478
  const computedOptions = vue.computed(() => {
491
479
  const flattenedSlots = flattenVNodes(slots.default?.() || []);
492
480
  const slotOptions = extractPivotSlotOptions(flattenedSlots);
493
- return mergeSlotOptions(props.options, slotOptions);
481
+ return {
482
+ ...props.options,
483
+ columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns,
484
+ columnHeaderTitle: slotOptions.columnHeaderTitle.length ? slotOptions.columnHeaderTitle : props.options.columnHeaderTitle,
485
+ rows: slotOptions.rows.length ? slotOptions.rows : props.options.rows,
486
+ rowHeaderTitle: slotOptions.rowHeaderTitle.length ? slotOptions.rowHeaderTitle : props.options.rowHeaderTitle,
487
+ indicators: slotOptions.indicators.length ? slotOptions.indicators : props.options.indicators,
488
+ corner: props.options.corner || slotOptions.corner,
489
+ tooltip: props.options.tooltip || slotOptions.tooltip,
490
+ menu: props.options.menu || slotOptions.menu,
491
+ };
494
492
  });
495
493
  __expose({ vTableInstance: vue.computed(() => baseTableRef.value?.vTableInstance || null) });
496
494
  return (_ctx, _cache) => {
@@ -525,7 +523,17 @@
525
523
  const computedOptions = vue.computed(() => {
526
524
  const flattenedSlots = flattenVNodes(slots.default?.() || []);
527
525
  const slotOptions = extractPivotSlotOptions(flattenedSlots);
528
- return mergeSlotOptions(props.options, slotOptions);
526
+ return {
527
+ ...props.options,
528
+ columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns,
529
+ columnHeaderTitle: slotOptions.columnHeaderTitle.length ? slotOptions.columnHeaderTitle : props.options.columnHeaderTitle,
530
+ rows: slotOptions.rows.length ? slotOptions.rows : props.options.rows,
531
+ rowHeaderTitle: slotOptions.rowHeaderTitle.length ? slotOptions.rowHeaderTitle : props.options.rowHeaderTitle,
532
+ indicators: slotOptions.indicators.length ? slotOptions.indicators : props.options.indicators,
533
+ corner: props.options.corner || slotOptions.corner,
534
+ tooltip: props.options.tooltip || slotOptions.tooltip,
535
+ menu: props.options.menu || slotOptions.menu,
536
+ };
529
537
  });
530
538
  __expose({ vTableInstance: vue.computed(() => baseTableRef.value?.vTableInstance || null) });
531
539
  return (_ctx, _cache) => {
@@ -624,7 +632,7 @@
624
632
  }
625
633
  CheckBox.symbol = 'CheckBox';
626
634
 
627
- const version = "1.13.3-alpha.6";
635
+ const version = "1.13.3-alpha.7";
628
636
 
629
637
  exports.VTable = VTable__namespace;
630
638
  Object.defineProperty(exports, 'register', {
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@visactor/vtable"),require("vue"),require("@visactor/vutils")):"function"==typeof define&&define.amd?define(["exports","@visactor/vtable","vue","@visactor/vutils"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).VueVTable={},e.VTable,e.vue,e.vutils)}(this,(function(e,o,n,t){"use strict";function r(e){var o=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}})),o.default=e,Object.freeze(o)}var l=r(o);function i(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function u(e){const o={};for(const n in e)if(e.hasOwnProperty(n)){o[i(n)]=e[n]}return o}function a(e){return e.flatMap((e=>Array.isArray(e.children)?a(e.children):e))}function s(e){const o={Group:l.CustomLayout.Group,Image:l.CustomLayout.Image,Text:l.CustomLayout.Text,Tag:l.CustomLayout.Tag,Radio:l.CustomLayout.Radio,CheckBox:l.CustomLayout.CheckBox};return{rootComponent:function e(n){if(!n)return null;const{type:r,children:l}=n,a=u(n.props),s=o[r?.symbol||r?.name];if(!s)return null;const c=new s({...a});!function(e,o){Object.keys(o).forEach((n=>{if(function(e,o){return e.startsWith("on")&&t.isFunction(o[e])}(n,o)){let t;t=n.startsWith("on")?n.slice(2).toLowerCase():i(n.slice(2)).toLowerCase(),e.addEventListener(t,o[n])}}))}(c,a);return function(e){return e?.default?.()||e||[]}(l).forEach((o=>{const n=e(o);n?c.add(n):o.type===Symbol.for("v-fgt")&&o.children.forEach((o=>{const n=e(o);n&&c.add(n)}))})),c}(e)}}function c(e){const o={columns:[],columnHeaderTitle:[],rows:[],rowHeaderTitle:[],indicators:[],corner:{},tooltip:{},menu:{}},n={PivotColumnDimension:"columns",PivotColumnHeaderTitle:"columnHeaderTitle",PivotRowDimension:"rows",PivotRowHeaderTitle:"rowHeaderTitle",PivotCorner:"corner",PivotIndicator:"indicators",Tooltip:"tooltip",Menu:"menu"};return e.forEach((e=>{e.props=u(e.props);const t=e.type?.symbol||e.type?.name,r=n[t];r&&(Array.isArray(o[r])?e.props.hasOwnProperty("objectHandler")?o[r].push(e.props.objectHandler):o[r].push(e.props):o[r]=e.props)})),o}function d(e){const o={columns:[],tooltip:{},menu:{}},n={ListColumn:"columns",Tooltip:"tooltip",Menu:"menu"};return e.forEach((e=>{e.props=u(e.props);const t=e.type?.symbol||e.type?.name,r=n[t];var l;r&&("columns"===r&&e.children&&(e.props.customLayout=(l=e.children,e=>{const{table:o,row:n,col:t,rect:r}=e,i=o.getCellOriginRecord(t,n),{height:u,width:a}=r??o.getCellRect(t,n),c=l.customLayout({table:o,row:n,col:t,rect:r,record:i,height:u,width:a})[0],{rootComponent:d}=s(c);return{rootContainer:d,renderDefault:!1}})),Array.isArray(o[r])?o[r].push(e.props):o[r]=e.props)})),o}function p(e,o){return{...e,columns:o.columns&&o.columns.length?o.columns:e.columns,columnHeaderTitle:o.columnHeaderTitle&&o.columnHeaderTitle.length?o.columnHeaderTitle:e.columnHeaderTitle,rows:o.rows&&o.rows.length?o.rows:e.rows,rowHeaderTitle:o.rowHeaderTitle&&o.rowHeaderTitle.length?o.rowHeaderTitle:e.rowHeaderTitle,indicators:o.indicators&&o.indicators.length?o.indicators:e.indicators,corner:Object.keys(e.corner||{}).length?e.corner:o.corner,tooltip:Object.keys(o.tooltip||{}).length?o.tooltip:e.tooltip,menu:Object.keys(o.menu||{}).length?o.menu:e.menu}}const C={...o.ListTable.EVENT_TYPE,...o.PivotTable.EVENT_TYPE,...o.PivotChart.EVENT_TYPE},E={onClickCell:C.CLICK_CELL,onDblClickCell:C.DBLCLICK_CELL,onMouseDownCell:C.MOUSEDOWN_CELL,onMouseUpCell:C.MOUSEUP_CELL,onSelectedCell:C.SELECTED_CELL,onKeyDown:C.KEYDOWN,onMouseEnterTable:C.MOUSEENTER_TABLE,onMouseLeaveTable:C.MOUSELEAVE_TABLE,onMouseDownTable:C.MOUSEDOWN_TABLE,onMouseMoveCell:C.MOUSEMOVE_CELL,onMouseEnterCell:C.MOUSEENTER_CELL,onMouseLeaveCell:C.MOUSELEAVE_CELL,onContextMenuCell:C.CONTEXTMENU_CELL,onResizeColumn:C.RESIZE_COLUMN,onResizeColumnEnd:C.RESIZE_COLUMN_END,onChangeHeaderPosition:C.CHANGE_HEADER_POSITION,onChangeHeaderPositionStart:C.CHANGE_HEADER_POSITION_START,onChangeHeaderPositionFail:C.CHANGE_HEADER_POSITION_FAIL,onSortClick:C.SORT_CLICK,onFreezeClick:C.FREEZE_CLICK,onScroll:C.SCROLL,onDropdownMenuClick:C.DROPDOWN_MENU_CLICK,onMouseOverChartSymbol:C.MOUSEOVER_CHART_SYMBOL,onDragSelectEnd:C.DRAG_SELECT_END,onDropdownIconClick:C.DROPDOWN_ICON_CLICK,onDropdownMenuClear:C.DROPDOWN_MENU_CLEAR,onTreeHierarchyStateChange:C.TREE_HIERARCHY_STATE_CHANGE,onShowMenu:C.SHOW_MENU,onHideMenu:C.HIDE_MENU,onIconClick:C.ICON_CLICK,onLegendItemClick:C.LEGEND_ITEM_CLICK,onLegendItemHover:C.LEGEND_ITEM_HOVER,onLegendItemUnHover:C.LEGEND_ITEM_UNHOVER,onLegendChange:C.LEGEND_CHANGE,onMouseEnterAxis:C.MOUSEENTER_AXIS,onMouseLeaveAxis:C.MOUSELEAVE_AXIS,onCheckboxStateChange:C.CHECKBOX_STATE_CHANGE,onRadioStateChange:C.RADIO_STATE_CHANGE,onAfterRender:C.AFTER_RENDER,onInitialized:C.INITIALIZED,onPivotSortClick:C.PIVOT_SORT_CLICK,onDrillMenuClick:C.DRILLMENU_CLICK,onVChartEventType:C.VCHART_EVENT_TYPE,onChangeCellValue:C.CHANGE_CELL_VALUE,onMousedownFillHandle:C.MOUSEDOWN_FILL_HANDLE,onDragFillHandleEnd:C.DRAG_FILL_HANDLE_END,onDblclickFillHandle:C.DBLCLICK_FILL_HANDLE,onScrollVerticalEnd:C.SCROLL_VERTICAL_END,onScrollHorizontalEnd:C.SCROLL_HORIZONTAL_END,onChangCellValue:C.CHANGE_CELL_VALUE},y=Object.keys(E);var h=n.defineComponent({__name:"base-table",props:{type:{type:String,required:!1},options:{type:null,required:!1},records:{type:Array,required:!1},width:{type:[Number,String],required:!1,default:"100%"},height:{type:[Number,String],required:!1,default:"100%"},onReady:{type:Function,required:!1},onError:{type:Function,required:!1},onClickCell:{type:null,required:!1},onDblClickCell:{type:null,required:!1},onMouseDownCell:{type:null,required:!1},onMouseUpCell:{type:null,required:!1},onSelectedCell:{type:null,required:!1},onKeyDown:{type:null,required:!1},onMouseEnterTable:{type:null,required:!1},onMouseLeaveTable:{type:null,required:!1},onMouseDownTable:{type:null,required:!1},onMouseMoveCell:{type:null,required:!1},onMouseEnterCell:{type:null,required:!1},onMouseLeaveCell:{type:null,required:!1},onContextMenuCell:{type:null,required:!1},onResizeColumn:{type:null,required:!1},onResizeColumnEnd:{type:null,required:!1},onChangeHeaderPosition:{type:null,required:!1},onChangeHeaderPositionStart:{type:null,required:!1},onChangeHeaderPositionFail:{type:null,required:!1},onSortClick:{type:null,required:!1},onFreezeClick:{type:null,required:!1},onScroll:{type:null,required:!1},onDropdownMenuClick:{type:null,required:!1},onMouseOverChartSymbol:{type:null,required:!1},onDragSelectEnd:{type:null,required:!1},onDropdownIconClick:{type:null,required:!1},onDropdownMenuClear:{type:null,required:!1},onTreeHierarchyStateChange:{type:null,required:!1},onShowMenu:{type:null,required:!1},onHideMenu:{type:null,required:!1},onIconClick:{type:null,required:!1},onLegendItemClick:{type:null,required:!1},onLegendItemHover:{type:null,required:!1},onLegendItemUnHover:{type:null,required:!1},onLegendChange:{type:null,required:!1},onMouseEnterAxis:{type:null,required:!1},onMouseLeaveAxis:{type:null,required:!1},onCheckboxStateChange:{type:null,required:!1},onRadioStateChange:{type:null,required:!1},onAfterRender:{type:null,required:!1},onInitialized:{type:null,required:!1},onPivotSortClick:{type:null,required:!1},onDrillMenuClick:{type:null,required:!1},onVChartEventType:{type:null,required:!1},onChangeCellValue:{type:null,required:!1},onMousedownFillHandle:{type:null,required:!1},onDragFillHandleEnd:{type:null,required:!1},onDblclickFillHandle:{type:null,required:!1},onScrollVerticalEnd:{type:null,required:!1},onScrollHorizontalEnd:{type:null,required:!1}},emits:y,setup(e,{expose:t,emit:r}){const l=e,i=n.ref(null),u=n.shallowRef(null);t({vTableInstance:u});const a=n.computed((()=>"number"==typeof l.width?`${l.width}px`:l.width)),s=n.computed((()=>"number"==typeof l.height?`${l.height}px`:l.height)),c=r,d=(e,o)=>{u.value=new e(i.value,o)},p=()=>{if(!i.value)return;u.value&&u.value.release();const e=()=>void 0!==l.records&&null!==l.records&&l.records.length>0?l.records:l.options.records;try{switch(l.type){case"list":d(o.ListTable,{...l.options,records:e()});break;case"pivot":d(o.PivotTable,{...l.options,records:e()});break;case"chart":d(o.PivotChart,{...l.options,records:e()})}n=u.value,y.forEach((e=>{n.on(E[e],(o=>{c(e,o)}))})),l.onReady?.(u.value,!0)}catch(e){l.onError?.(e)}var n},C=e=>{if(u.value)try{switch(l.type){case"list":u.value instanceof o.ListTable&&u.value.updateOption(e);break;case"pivot":u.value instanceof o.PivotTable&&u.value.updateOption(e);break;case"chart":u.value instanceof o.PivotChart&&u.value.updateOption(e)}}catch(e){l.onError?.(e)}};return n.onMounted(p),n.onBeforeUnmount((()=>u.value?.release())),n.watch((()=>l.options),(e=>{u.value?C(e):p()})),n.watch((()=>l.records),((e,o)=>{u.value?C({...l.options,records:e}):p()}),{deep:!0}),(e,o)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"vTableContainer",ref:i,style:n.normalizeStyle([{width:a.value,height:s.value},{position:"relative"}])},null,4))}}),m=n.defineComponent({__name:"list-table",props:{options:{type:Object,required:!0},records:{type:Array,required:!1},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1}},setup(e,{expose:o}){const t=e,r=n.ref(null),l=n.useSlots(),i=n.computed((()=>{const e=d(a(l.default?.()||[]));return p(t.options,e)}));return o({vTableInstance:n.computed((()=>r.value?.vTableInstance||null))}),(e,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(h,n.mergeProps({type:"list",options:i.value,records:e.records,width:e.width,height:e.height,ref_key:"baseTableRef",ref:r},e.$attrs),null,16,["options","records","width","height"]),n.renderSlot(e.$slots,"default")],64))}}),T=n.defineComponent({__name:"pivot-table",props:{options:{type:Object,required:!0},records:{type:Array,required:!1},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1}},setup(e,{expose:o}){const t=e,r=n.shallowRef(null),l=n.useSlots(),i=n.computed((()=>{const e=c(a(l.default?.()||[]));return p(t.options,e)}));return o({vTableInstance:n.computed((()=>r.value?.vTableInstance||null))}),(e,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(h,n.mergeProps({type:"pivot",options:i.value,records:e.records,width:e.width,height:e.height,ref_key:"baseTableRef",ref:r},e.$attrs),null,16,["options","records","width","height"]),n.renderSlot(e.$slots,"default")],64))}}),v=n.defineComponent({__name:"pivot-chart",props:{options:{type:Object,required:!0},records:{type:Array,required:!1},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1}},setup(e,{expose:o}){const t=e,r=n.shallowRef(null),l=n.useSlots(),i=n.computed((()=>{const e=c(a(l.default?.()||[]));return p(t.options,e)}));return o({vTableInstance:n.computed((()=>r.value?.vTableInstance||null))}),(e,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(h,n.mergeProps({type:"chart",options:i.value,records:e.records,width:e.width,height:e.height,ref_key:"baseTableRef",ref:r},e.$attrs),null,16,["options","records","width","height"]),n.renderSlot(e.$slots,"default")],64))}});function L(e){return null}function f(e){return null}function b(e){return null}function g(e){return null}function _(e){return null}function S(e){return null}function O(e){return null}function q(e){return null}function w(e){return null}function M(){return null}function H(){return null}function I(){return null}function D(e){return null}function N(e){return null}function R(e){return null}L.symbol="ListColumn",f.symbol="PivotColumnDimension",b.symbol="PivotRowDimension",g.symbol="PivotColumnHeaderTitle",_.symbol="PivotRowHeaderTitle",S.symbol="PivotIndicator",O.symbol="PivotCorner",q.symbol="Menu",w.symbol="Tooltip",M.symbol="Group",H.symbol="Image",I.symbol="Text",D.symbol="Tag",N.symbol="Radio",R.symbol="CheckBox";e.VTable=l,Object.defineProperty(e,"register",{enumerable:!0,get:function(){return o.register}}),e.CheckBox=R,e.Group=M,e.Image=H,e.ListColumn=L,e.ListTable=m,e.Menu=q,e.PivotChart=v,e.PivotColumnDimension=f,e.PivotColumnHeaderTitle=g,e.PivotCorner=O,e.PivotIndicator=S,e.PivotRowDimension=b,e.PivotRowHeaderTitle=_,e.PivotTable=T,e.Radio=N,e.Tag=D,e.Text=I,e.Tooltip=w,e.registerChartModule=(e,o)=>{l.register.chartModule(e,o)},e.version="1.13.3-alpha.6"}));
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@visactor/vtable"),require("vue"),require("@visactor/vutils")):"function"==typeof define&&define.amd?define(["exports","@visactor/vtable","vue","@visactor/vutils"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).VueVTable={},e.VTable,e.vue,e.vutils)}(this,(function(e,o,n,t){"use strict";function r(e){var o=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}})),o.default=e,Object.freeze(o)}var l=r(o);function i(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function u(e){const o={};for(const n in e)if(e.hasOwnProperty(n)){o[i(n)]=e[n]}return o}function a(e){return e.flatMap((e=>Array.isArray(e.children)?a(e.children):e))}function s(e){const o={Group:l.CustomLayout.Group,Image:l.CustomLayout.Image,Text:l.CustomLayout.Text,Tag:l.CustomLayout.Tag,Radio:l.CustomLayout.Radio,CheckBox:l.CustomLayout.CheckBox};return{rootComponent:function e(n){if(!n)return null;const{type:r,children:l}=n,a=u(n.props),s=o[r?.symbol||r?.name];if(!s)return null;const c=new s({...a});!function(e,o){Object.keys(o).forEach((n=>{if(function(e,o){return e.startsWith("on")&&t.isFunction(o[e])}(n,o)){let t;t=n.startsWith("on")?n.slice(2).toLowerCase():i(n.slice(2)).toLowerCase(),e.addEventListener(t,o[n])}}))}(c,a);return function(e){return e?.default?.()||e||[]}(l).forEach((o=>{const n=e(o);n?c.add(n):o.type===Symbol.for("v-fgt")&&o.children.forEach((o=>{const n=e(o);n&&c.add(n)}))})),c}(e)}}function c(e){const o={columns:[],columnHeaderTitle:[],rows:[],rowHeaderTitle:[],indicators:[],corner:{},tooltip:{},menu:{}},n={PivotColumnDimension:"columns",PivotColumnHeaderTitle:"columnHeaderTitle",PivotRowDimension:"rows",PivotRowHeaderTitle:"rowHeaderTitle",PivotCorner:"corner",PivotIndicator:"indicators",Tooltip:"tooltip",Menu:"menu"};return e.forEach((e=>{e.props=u(e.props);const t=e.type?.symbol||e.type?.name,r=n[t];r&&(Array.isArray(o[r])?e.props.hasOwnProperty("objectHandler")?o[r].push(e.props.objectHandler):o[r].push(e.props):o[r]=e.props)})),o}function d(e){const o={columns:[],tooltip:{},menu:{}},n={ListColumn:"columns",Tooltip:"tooltip",Menu:"menu"};return e.forEach((e=>{e.props=u(e.props);const t=e.type?.symbol||e.type?.name,r=n[t];var l;r&&("columns"===r&&e.children&&(e.props.customLayout=(l=e.children,e=>{const{table:o,row:n,col:t,rect:r}=e,i=o.getCellOriginRecord(t,n),{height:u,width:a}=r??o.getCellRect(t,n),c=l.customLayout({table:o,row:n,col:t,rect:r,record:i,height:u,width:a})[0],{rootComponent:d}=s(c);return{rootContainer:d,renderDefault:!1}})),Array.isArray(o[r])?o[r].push(e.props):o[r]=e.props)})),o}const p={...o.ListTable.EVENT_TYPE,...o.PivotTable.EVENT_TYPE,...o.PivotChart.EVENT_TYPE},C={onClickCell:p.CLICK_CELL,onDblClickCell:p.DBLCLICK_CELL,onMouseDownCell:p.MOUSEDOWN_CELL,onMouseUpCell:p.MOUSEUP_CELL,onSelectedCell:p.SELECTED_CELL,onKeyDown:p.KEYDOWN,onMouseEnterTable:p.MOUSEENTER_TABLE,onMouseLeaveTable:p.MOUSELEAVE_TABLE,onMouseDownTable:p.MOUSEDOWN_TABLE,onMouseMoveCell:p.MOUSEMOVE_CELL,onMouseEnterCell:p.MOUSEENTER_CELL,onMouseLeaveCell:p.MOUSELEAVE_CELL,onContextMenuCell:p.CONTEXTMENU_CELL,onResizeColumn:p.RESIZE_COLUMN,onResizeColumnEnd:p.RESIZE_COLUMN_END,onChangeHeaderPosition:p.CHANGE_HEADER_POSITION,onChangeHeaderPositionStart:p.CHANGE_HEADER_POSITION_START,onChangeHeaderPositionFail:p.CHANGE_HEADER_POSITION_FAIL,onSortClick:p.SORT_CLICK,onFreezeClick:p.FREEZE_CLICK,onScroll:p.SCROLL,onDropdownMenuClick:p.DROPDOWN_MENU_CLICK,onMouseOverChartSymbol:p.MOUSEOVER_CHART_SYMBOL,onDragSelectEnd:p.DRAG_SELECT_END,onDropdownIconClick:p.DROPDOWN_ICON_CLICK,onDropdownMenuClear:p.DROPDOWN_MENU_CLEAR,onTreeHierarchyStateChange:p.TREE_HIERARCHY_STATE_CHANGE,onShowMenu:p.SHOW_MENU,onHideMenu:p.HIDE_MENU,onIconClick:p.ICON_CLICK,onLegendItemClick:p.LEGEND_ITEM_CLICK,onLegendItemHover:p.LEGEND_ITEM_HOVER,onLegendItemUnHover:p.LEGEND_ITEM_UNHOVER,onLegendChange:p.LEGEND_CHANGE,onMouseEnterAxis:p.MOUSEENTER_AXIS,onMouseLeaveAxis:p.MOUSELEAVE_AXIS,onCheckboxStateChange:p.CHECKBOX_STATE_CHANGE,onRadioStateChange:p.RADIO_STATE_CHANGE,onAfterRender:p.AFTER_RENDER,onInitialized:p.INITIALIZED,onPivotSortClick:p.PIVOT_SORT_CLICK,onDrillMenuClick:p.DRILLMENU_CLICK,onVChartEventType:p.VCHART_EVENT_TYPE,onChangeCellValue:p.CHANGE_CELL_VALUE,onMousedownFillHandle:p.MOUSEDOWN_FILL_HANDLE,onDragFillHandleEnd:p.DRAG_FILL_HANDLE_END,onDblclickFillHandle:p.DBLCLICK_FILL_HANDLE,onScrollVerticalEnd:p.SCROLL_VERTICAL_END,onScrollHorizontalEnd:p.SCROLL_HORIZONTAL_END,onChangCellValue:p.CHANGE_CELL_VALUE},E=Object.keys(C);var y=n.defineComponent({__name:"base-table",props:{type:{type:String,required:!1},options:{type:null,required:!1},records:{type:Array,required:!1},width:{type:[Number,String],required:!1,default:"100%"},height:{type:[Number,String],required:!1,default:"100%"},onReady:{type:Function,required:!1},onError:{type:Function,required:!1},onClickCell:{type:null,required:!1},onDblClickCell:{type:null,required:!1},onMouseDownCell:{type:null,required:!1},onMouseUpCell:{type:null,required:!1},onSelectedCell:{type:null,required:!1},onKeyDown:{type:null,required:!1},onMouseEnterTable:{type:null,required:!1},onMouseLeaveTable:{type:null,required:!1},onMouseDownTable:{type:null,required:!1},onMouseMoveCell:{type:null,required:!1},onMouseEnterCell:{type:null,required:!1},onMouseLeaveCell:{type:null,required:!1},onContextMenuCell:{type:null,required:!1},onResizeColumn:{type:null,required:!1},onResizeColumnEnd:{type:null,required:!1},onChangeHeaderPosition:{type:null,required:!1},onChangeHeaderPositionStart:{type:null,required:!1},onChangeHeaderPositionFail:{type:null,required:!1},onSortClick:{type:null,required:!1},onFreezeClick:{type:null,required:!1},onScroll:{type:null,required:!1},onDropdownMenuClick:{type:null,required:!1},onMouseOverChartSymbol:{type:null,required:!1},onDragSelectEnd:{type:null,required:!1},onDropdownIconClick:{type:null,required:!1},onDropdownMenuClear:{type:null,required:!1},onTreeHierarchyStateChange:{type:null,required:!1},onShowMenu:{type:null,required:!1},onHideMenu:{type:null,required:!1},onIconClick:{type:null,required:!1},onLegendItemClick:{type:null,required:!1},onLegendItemHover:{type:null,required:!1},onLegendItemUnHover:{type:null,required:!1},onLegendChange:{type:null,required:!1},onMouseEnterAxis:{type:null,required:!1},onMouseLeaveAxis:{type:null,required:!1},onCheckboxStateChange:{type:null,required:!1},onRadioStateChange:{type:null,required:!1},onAfterRender:{type:null,required:!1},onInitialized:{type:null,required:!1},onPivotSortClick:{type:null,required:!1},onDrillMenuClick:{type:null,required:!1},onVChartEventType:{type:null,required:!1},onChangeCellValue:{type:null,required:!1},onMousedownFillHandle:{type:null,required:!1},onDragFillHandleEnd:{type:null,required:!1},onDblclickFillHandle:{type:null,required:!1},onScrollVerticalEnd:{type:null,required:!1},onScrollHorizontalEnd:{type:null,required:!1}},emits:E,setup(e,{expose:t,emit:r}){const l=e,i=n.ref(null),u=n.shallowRef(null);t({vTableInstance:u});const a=n.computed((()=>"number"==typeof l.width?`${l.width}px`:l.width)),s=n.computed((()=>"number"==typeof l.height?`${l.height}px`:l.height)),c=r,d=(e,o)=>{u.value=new e(i.value,o)},p=()=>{if(!i.value)return;u.value&&u.value.release();const e=()=>void 0!==l.records&&null!==l.records&&l.records.length>0?l.records:l.options.records;try{switch(l.type){case"list":d(o.ListTable,{...l.options,records:e()});break;case"pivot":d(o.PivotTable,{...l.options,records:e()});break;case"chart":d(o.PivotChart,{...l.options,records:e()})}n=u.value,E.forEach((e=>{n.on(C[e],(o=>{c(e,o)}))})),l.onReady?.(u.value,!0)}catch(e){l.onError?.(e)}var n},y=e=>{if(u.value)try{switch(l.type){case"list":u.value instanceof o.ListTable&&u.value.updateOption(e);break;case"pivot":u.value instanceof o.PivotTable&&u.value.updateOption(e);break;case"chart":u.value instanceof o.PivotChart&&u.value.updateOption(e)}}catch(e){l.onError?.(e)}};return n.onMounted(p),n.onBeforeUnmount((()=>u.value?.release())),n.watch((()=>l.options),(e=>{u.value?y(e):p()})),n.watch((()=>l.records),((e,o)=>{u.value?y({...l.options,records:e}):p()}),{deep:!0}),(e,o)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"vTableContainer",ref:i,style:n.normalizeStyle([{width:a.value,height:s.value},{position:"relative"}])},null,4))}}),m=n.defineComponent({__name:"list-table",props:{options:{type:Object,required:!0},records:{type:Array,required:!1},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1}},setup(e,{expose:o}){const t=e,r=n.ref(null),l=n.useSlots(),i=n.computed((()=>{const e=d(a(l.default?.()||[]));return{...t.options,columns:e.columns.length?e.columns:t.options.columns,tooltip:e.tooltip||t.options.tooltip,menu:e.menu||t.options.menu}}));return o({vTableInstance:n.computed((()=>r.value?.vTableInstance||null))}),(e,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(y,n.mergeProps({type:"list",options:i.value,records:e.records,width:e.width,height:e.height,ref_key:"baseTableRef",ref:r},e.$attrs),null,16,["options","records","width","height"]),n.renderSlot(e.$slots,"default")],64))}}),h=n.defineComponent({__name:"pivot-table",props:{options:{type:Object,required:!0},records:{type:Array,required:!1},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1}},setup(e,{expose:o}){const t=e,r=n.shallowRef(null),l=n.useSlots(),i=n.computed((()=>{const e=c(a(l.default?.()||[]));return{...t.options,columns:e.columns.length?e.columns:t.options.columns,columnHeaderTitle:e.columnHeaderTitle.length?e.columnHeaderTitle:t.options.columnHeaderTitle,rows:e.rows.length?e.rows:t.options.rows,rowHeaderTitle:e.rowHeaderTitle.length?e.rowHeaderTitle:t.options.rowHeaderTitle,indicators:e.indicators.length?e.indicators:t.options.indicators,corner:t.options.corner||e.corner,tooltip:t.options.tooltip||e.tooltip,menu:t.options.menu||e.menu}}));return o({vTableInstance:n.computed((()=>r.value?.vTableInstance||null))}),(e,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(y,n.mergeProps({type:"pivot",options:i.value,records:e.records,width:e.width,height:e.height,ref_key:"baseTableRef",ref:r},e.$attrs),null,16,["options","records","width","height"]),n.renderSlot(e.$slots,"default")],64))}}),T=n.defineComponent({__name:"pivot-chart",props:{options:{type:Object,required:!0},records:{type:Array,required:!1},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1}},setup(e,{expose:o}){const t=e,r=n.shallowRef(null),l=n.useSlots(),i=n.computed((()=>{const e=c(a(l.default?.()||[]));return{...t.options,columns:e.columns.length?e.columns:t.options.columns,columnHeaderTitle:e.columnHeaderTitle.length?e.columnHeaderTitle:t.options.columnHeaderTitle,rows:e.rows.length?e.rows:t.options.rows,rowHeaderTitle:e.rowHeaderTitle.length?e.rowHeaderTitle:t.options.rowHeaderTitle,indicators:e.indicators.length?e.indicators:t.options.indicators,corner:t.options.corner||e.corner,tooltip:t.options.tooltip||e.tooltip,menu:t.options.menu||e.menu}}));return o({vTableInstance:n.computed((()=>r.value?.vTableInstance||null))}),(e,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(y,n.mergeProps({type:"chart",options:i.value,records:e.records,width:e.width,height:e.height,ref_key:"baseTableRef",ref:r},e.$attrs),null,16,["options","records","width","height"]),n.renderSlot(e.$slots,"default")],64))}});function v(e){return null}function L(e){return null}function f(e){return null}function b(e){return null}function g(e){return null}function _(e){return null}function w(e){return null}function H(e){return null}function S(e){return null}function q(){return null}function M(){return null}function O(){return null}function I(e){return null}function D(e){return null}function N(e){return null}v.symbol="ListColumn",L.symbol="PivotColumnDimension",f.symbol="PivotRowDimension",b.symbol="PivotColumnHeaderTitle",g.symbol="PivotRowHeaderTitle",_.symbol="PivotIndicator",w.symbol="PivotCorner",H.symbol="Menu",S.symbol="Tooltip",q.symbol="Group",M.symbol="Image",O.symbol="Text",I.symbol="Tag",D.symbol="Radio",N.symbol="CheckBox";e.VTable=l,Object.defineProperty(e,"register",{enumerable:!0,get:function(){return o.register}}),e.CheckBox=N,e.Group=q,e.Image=M,e.ListColumn=v,e.ListTable=m,e.Menu=H,e.PivotChart=T,e.PivotColumnDimension=L,e.PivotColumnHeaderTitle=b,e.PivotCorner=w,e.PivotIndicator=_,e.PivotRowDimension=f,e.PivotRowHeaderTitle=g,e.PivotTable=h,e.Radio=D,e.Tag=I,e.Text=O,e.Tooltip=S,e.registerChartModule=(e,o)=>{l.register.chartModule(e,o)},e.version="1.13.3-alpha.7"}));
package/es/index.d.ts CHANGED
@@ -2,4 +2,4 @@ import * as VTable from '@visactor/vtable';
2
2
  export * from './tables';
3
3
  export * from './components';
4
4
  export { VTable };
5
- export declare const version = "1.13.3-alpha.6";
5
+ export declare const version = "1.13.3-alpha.7";
package/es/index.js CHANGED
@@ -21,6 +21,6 @@ export { default as Tag } from './components/custom/tag.js';
21
21
  export { default as Radio } from './components/custom/radio.js';
22
22
  export { default as CheckBox } from './components/custom/checkBox.js';
23
23
 
24
- const version = "1.13.3-alpha.6";
24
+ const version = "1.13.3-alpha.7";
25
25
 
26
26
  export { version };
@@ -2,7 +2,7 @@ import { defineComponent, ref, useSlots, computed, openBlock, createElementBlock
2
2
  import { flattenVNodes } from '../utils/vnodeUtils.js';
3
3
  import '@visactor/vtable';
4
4
  import '@visactor/vutils';
5
- import { extractListSlotOptions, mergeSlotOptions } from '../utils/slotUtils.js';
5
+ import { extractListSlotOptions } from '../utils/slotUtils.js';
6
6
  import _sfc_main$1 from './base-table.vue.js';
7
7
 
8
8
  var _sfc_main = defineComponent({
@@ -21,7 +21,7 @@ var _sfc_main = defineComponent({
21
21
  var _a;
22
22
  const flattenedSlots = flattenVNodes(((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) || []);
23
23
  const slotOptions = extractListSlotOptions(flattenedSlots);
24
- return mergeSlotOptions(props.options, slotOptions);
24
+ return Object.assign(Object.assign({}, props.options), { columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns, tooltip: slotOptions.tooltip || props.options.tooltip, menu: slotOptions.menu || props.options.menu });
25
25
  });
26
26
  __expose({
27
27
  vTableInstance: computed(() => { var _a; return ((_a = baseTableRef.value) === null || _a === void 0 ? void 0 : _a.vTableInstance) || null; }),
@@ -2,7 +2,7 @@ import { defineComponent, shallowRef, useSlots, computed, openBlock, createEleme
2
2
  import { flattenVNodes } from '../utils/vnodeUtils.js';
3
3
  import '@visactor/vtable';
4
4
  import '@visactor/vutils';
5
- import { extractPivotSlotOptions, mergeSlotOptions } from '../utils/slotUtils.js';
5
+ import { extractPivotSlotOptions } from '../utils/slotUtils.js';
6
6
  import _sfc_main$1 from './base-table.vue.js';
7
7
 
8
8
  var _sfc_main = defineComponent({
@@ -21,7 +21,7 @@ var _sfc_main = defineComponent({
21
21
  var _a;
22
22
  const flattenedSlots = flattenVNodes(((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) || []);
23
23
  const slotOptions = extractPivotSlotOptions(flattenedSlots);
24
- return mergeSlotOptions(props.options, slotOptions);
24
+ return Object.assign(Object.assign({}, props.options), { columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns, columnHeaderTitle: slotOptions.columnHeaderTitle.length ? slotOptions.columnHeaderTitle : props.options.columnHeaderTitle, rows: slotOptions.rows.length ? slotOptions.rows : props.options.rows, rowHeaderTitle: slotOptions.rowHeaderTitle.length ? slotOptions.rowHeaderTitle : props.options.rowHeaderTitle, indicators: slotOptions.indicators.length ? slotOptions.indicators : props.options.indicators, corner: props.options.corner || slotOptions.corner, tooltip: props.options.tooltip || slotOptions.tooltip, menu: props.options.menu || slotOptions.menu });
25
25
  });
26
26
  __expose({ vTableInstance: computed(() => { var _a; return ((_a = baseTableRef.value) === null || _a === void 0 ? void 0 : _a.vTableInstance) || null; }) });
27
27
  return (_ctx, _cache) => {
@@ -2,7 +2,7 @@ import { defineComponent, shallowRef, useSlots, computed, openBlock, createEleme
2
2
  import { flattenVNodes } from '../utils/vnodeUtils.js';
3
3
  import '@visactor/vtable';
4
4
  import '@visactor/vutils';
5
- import { extractPivotSlotOptions, mergeSlotOptions } from '../utils/slotUtils.js';
5
+ import { extractPivotSlotOptions } from '../utils/slotUtils.js';
6
6
  import _sfc_main$1 from './base-table.vue.js';
7
7
 
8
8
  var _sfc_main = defineComponent({
@@ -21,7 +21,7 @@ var _sfc_main = defineComponent({
21
21
  var _a;
22
22
  const flattenedSlots = flattenVNodes(((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) || []);
23
23
  const slotOptions = extractPivotSlotOptions(flattenedSlots);
24
- return mergeSlotOptions(props.options, slotOptions);
24
+ return Object.assign(Object.assign({}, props.options), { columns: slotOptions.columns.length ? slotOptions.columns : props.options.columns, columnHeaderTitle: slotOptions.columnHeaderTitle.length ? slotOptions.columnHeaderTitle : props.options.columnHeaderTitle, rows: slotOptions.rows.length ? slotOptions.rows : props.options.rows, rowHeaderTitle: slotOptions.rowHeaderTitle.length ? slotOptions.rowHeaderTitle : props.options.rowHeaderTitle, indicators: slotOptions.indicators.length ? slotOptions.indicators : props.options.indicators, corner: props.options.corner || slotOptions.corner, tooltip: props.options.tooltip || slotOptions.tooltip, menu: props.options.menu || slotOptions.menu });
25
25
  });
26
26
  __expose({ vTableInstance: computed(() => { var _a; return ((_a = baseTableRef.value) === null || _a === void 0 ? void 0 : _a.vTableInstance) || null; }) });
27
27
  return (_ctx, _cache) => {
@@ -16,13 +16,3 @@ export declare function extractListSlotOptions(vnodes: any[]): {
16
16
  tooltip: TooltipProps;
17
17
  menu: MenuProps;
18
18
  };
19
- export declare function mergeSlotOptions(propsOptions: Record<string, unknown>, slotOptions: Record<string, any>): {
20
- columns: any;
21
- columnHeaderTitle: any;
22
- rows: any;
23
- rowHeaderTitle: any;
24
- indicators: any;
25
- corner: any;
26
- tooltip: any;
27
- menu: any;
28
- };
@@ -72,13 +72,6 @@ function extractListSlotOptions(vnodes) {
72
72
  }
73
73
  });
74
74
  return options;
75
- }
76
- function mergeSlotOptions(propsOptions, slotOptions) {
77
- return Object.assign(Object.assign({}, propsOptions), { columns: slotOptions.columns && slotOptions.columns.length ? slotOptions.columns : propsOptions.columns, columnHeaderTitle: slotOptions.columnHeaderTitle && slotOptions.columnHeaderTitle.length
78
- ? slotOptions.columnHeaderTitle
79
- : propsOptions.columnHeaderTitle, rows: slotOptions.rows && slotOptions.rows.length ? slotOptions.rows : propsOptions.rows, rowHeaderTitle: slotOptions.rowHeaderTitle && slotOptions.rowHeaderTitle.length
80
- ? slotOptions.rowHeaderTitle
81
- : propsOptions.rowHeaderTitle, indicators: slotOptions.indicators && slotOptions.indicators.length ? slotOptions.indicators : propsOptions.indicators, corner: Object.keys(propsOptions.corner || {}).length ? propsOptions.corner : slotOptions.corner, tooltip: Object.keys(slotOptions.tooltip || {}).length ? slotOptions.tooltip : propsOptions.tooltip, menu: Object.keys(slotOptions.menu || {}).length ? slotOptions.menu : propsOptions.menu });
82
75
  }
83
76
 
84
- export { extractListSlotOptions, extractPivotSlotOptions, mergeSlotOptions };
77
+ export { extractListSlotOptions, extractPivotSlotOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vue-vtable",
3
- "version": "1.13.3-alpha.6",
3
+ "version": "1.13.3-alpha.7",
4
4
  "description": "The vue version of VTable",
5
5
  "keywords": [
6
6
  "vue",
@@ -43,13 +43,13 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "@visactor/vtable": "1.13.3-alpha.6",
46
+ "@visactor/vtable": "1.13.3-alpha.7",
47
47
  "@visactor/vutils": "~0.18.14"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@arco-design/web-vue": "^2.11.0",
51
51
  "cross-env": "^7.0.3",
52
- "@visactor/vchart": "1.13.1-alpha.2",
52
+ "@visactor/vchart": "1.12.12",
53
53
  "@rushstack/eslint-patch": "~1.1.4",
54
54
  "vue": "^3.4.14",
55
55
  "@vitejs/plugin-vue": "^5.0.3",
@@ -88,8 +88,8 @@
88
88
  "eslint-plugin-vue": "^9.26.0",
89
89
  "vue-eslint-parser": "^9.4.2",
90
90
  "@internal/bundler": "0.0.1",
91
- "@internal/ts-config": "0.0.1",
92
- "@internal/eslint-config": "0.0.1"
91
+ "@internal/eslint-config": "0.0.1",
92
+ "@internal/ts-config": "0.0.1"
93
93
  },
94
94
  "scripts": {
95
95
  "start": "vite ./demo",