package.json
- "dependencies": {
- "@grapecity/spread-excelio": "^12.1.2",
- "@grapecity/spread-sheets": "^12.1.2",
- "@grapecity/spread-sheets-print": "^12.1.2",
- "@grapecity/spread-sheets-resources-ja": "^12.1.2",
- "@grapecity/spread-sheets-vue": "^12.1.2"
- }
复制代码
test.vue
- <template>
- <div>
- <h1>Spread.Sheets</h1>
- <div>
- <button @click="destroy">destroy</button>
- </div>
- <div style="text-align: left">
- <gc-spread-sheets hostClass='spread-host' @workbookInitialized='workbookInitialized($event)'>
- <gc-worksheet>
- </gc-worksheet>
- </gc-spread-sheets>
- </div>
- </div>
- </template>
- <script>
- import '@grapecity/spread-sheets/styles/gc.spread.sheets.excel2016colorful.css'
- import '@grapecity/spread-sheets-vue'
- export default {
- methods: {
- workbookInitialized (spread) {
- this.spread = spread
- spread.refresh()
- },
- destroy () {
- this.spread.destroy()
- this.$destroy()
- }
- }
- }
- </script>
- <style>
- .spread-host {
- width: 100%;
- height: 400px;
- border: 1px solid black;
- }
- </style>
复制代码
|