Custom ID, Class, Style and other attributes

优质
小牛编辑
129浏览
2023-12-01

You can easily pass id, class, style and other attributes to the hot-table wrapper element.
Each of them will be applied to the root Handsontable element, allowing further customization of the table.

import Vue from 'vue'; import { HotTable } from '@handsontable/vue'; new Vue({ el: '#example1', data: function() { return { hotSettings: { startRows: 5, startCols: 5, colHeaders: true, stretchH: 'all' }, id: 'my-custom-id', className: 'my-custom-classname', style: 'width: 300px; height: 142px; overflow: hidden; border: 1px solid red;' } }, components: { HotTable } });

Edit this page