vue.js表格组件_Handsontable电子表格组件的Vue.js包装器

本文介绍了vue-handsontable-official,它是Handsontable电子表格组件的Vue.js包装器。提供了详细的安装指南和基本用法,允许用户通过组件属性或对象传递选项来配置表格,并且可以选择性地指定表格的根元素类。
摘要由CSDN通过智能技术生成

vue.js表格组件

裁判官 (vue-handsontable-official)

A Vue.js wrapper for the the Handsontable spreadsheet component.

Handsontable电子表格组件的Vue.js包装器。

安装 (Installation)

For detailed installation instructions, please take a look at our wiki under "Installation guide".

有关详细的安装说明,请在“安装指南”下查看我们的Wiki。

基本用法 (Basic usage)

vue-handsontable-official creates a <HotTable> component. You can use it just like any other Vue component. For example:

vue-handsontable-official创建一个<HotTable>组件。 您可以像使用其他任何Vue组件一样使用它。 例如:

<template>
  <div id="hot-preview">
    <HotTable :root="root" :settings="hotSettings"></HotTable>
  </div>
</template>

<script>
  import HotTable from 'vue-handsontable-official';
  import Vue from 'vue';

  export default {
    data: function() {
      return {
        root: 'test-hot',
        hotSettings: {
          data: [['sample', 'data']],
          colHeaders: true
        }
      };
    },
    components: {
      HotTable
    }
  }
</script>

<style>
  #test-hot {
    width: 600px;
    height: 400px;
    overflow: hidden;
  }
</style>

Note, that you can pass options to Handsontable either as:

请注意,您可以通过以下方式将选项传递给Handsontable:

  • individual component properties

    单个组件的属性

<HotTable root="hot-example" :data="hotData" :rowHeaders="true"/>
  • an object passed to a single settings property

    传递给单个settings属性的对象

<HotTable root="hot-example" :settings="settingsObject" />

The root property declares the id of the root element for the table. It is optional - if it isn't provided, the table will get a randomly generated id.

root属性声明表的根元素的id 。 它是可选的-如果未提供,则表将获得随机生成的id

翻译自: https://vuejsexamples.com/a-vue-js-wrapper-for-the-the-handsontable-spreadsheet-component/

vue.js表格组件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值