@gridsheet/vue-core
v2.0.5-0
Published
Spreadsheet component for Vue 3
Downloads
21
Readme
@gridsheet/vue-core
Spreadsheet component for Vue 3
Installation
npm install @gridsheet/vue-corePeer Dependencies
This package requires the following peer dependency:
vue^3.3.0
Usage
<template>
<main>
<h1>GridSheet Vue Example</h1>
<div class="grid-container">
<GridSheet
:hub="hub"
:initialCells="{
A1: { value: 'Hello' },
B1: { value: 'Vue', style: { backgroundColor: '#448888'} },
A2: { value: 123 },
B2: { value: 456 },
A3: { value: 789},
C10: { value: '=SUM(A2:B2)' },
}"
:options="{
mode: 'dark',
}"
sheetName="Sheet1"
/>
<GridSheet
:hub="hub"
:initialCells="{
C3: { value: '=SUM(Sheet1!A2:B3)' },
}"
:options="{}"
sheetName="Sheet2"
/>
</div>
</main>
</template>
<script setup>
import { GridSheet, useHub } from '@gridsheet/vue-core';
const hub = useHub();
</script>Components
GridSheet
The main spreadsheet component for Vue 3 applications.
Props:
hub- Reactive hub for data binding and state managementinitialCells- Initial cell data with values, styles, and formulasoptions- GridSheet options (e.g., mode: 'dark')sheetName- Name of the sheet
useHub
A Vue 3-specific composable for creating reactive hubs that can be used for data binding and state management.
Exports
This package exports:
- All core GridSheet functionality from
@gridsheet/preact-core GridSheet- Vue 3 componentuseHub- Vue 3-specific reactive hub composable
Docs
Development
# Start development server
pnpm dev
# Build the package
pnpm build
# Preview the build
pnpm previewLicense
Apache-2.0
