import Vue from'vue';import{ HotTable }from'@handsontable/vue';import Handsontable from'handsontable';newVue({el:'#example1',data:function(){return{hotSettings:{data: Handsontable.helper.createSpreadsheetData(4,4),colHeaders:true,height:'auto',licenseKey:'non-commercial-and-evaluation'}}},methods:{swapHotData:function(){// The Handsontable instance is stored under the `hotInstance` property of the wrapper component.this.$refs.hotTableComponent.hotInstance.loadData([['new','data']]);}},components:{
HotTable
}});
<divid="example1"><hot-tableref="hotTableComponent":settings="hotSettings"></hot-table><br/><buttonv-on:click="swapHotData"class="controls">Load new data!</button></div>