找回密码
 立即注册

QQ登录

只需一步,快速开始

joewave
金牌服务用户   /  发表于:2021-5-8 16:34  /   查看:2082  /  回复:5
<template>
  <div id="app">
    <gc-spread-sheets-designer :styleInfo='styleInfo' :config='config' @designerInitialized='designerInitialized'>
    </gc-spread-sheets-designer>
  </div>
</template>

<script>

  import '@grapecity/spread-sheets/styles/gc.spread.sheets.excel2013white.css'
  import '@grapecity/spread-sheets-designer/styles/gc.spread.sheets.designer.min.css'
  import '@grapecity/spread-sheets-designer-resources-cn';
  import GC from '@grapecity/spread-sheets';
  GC.Spread.Common.CultureManager.culture("zh-cn");
  import '@grapecity/spread-sheets-resources-zh';

  import { Designer } from '@grapecity/spread-sheets-designer-vue'

  export default {
    name: 'App',
    data: function () {
      return {
        styleInfo: { height: "98vh", width: '100%' },
        config: null,
        spread:null,
        designer: null
      };
    },
    methods: {
      designerInitialized(value) {
        this.designer = value;
        this.spread=?????,
      }
    }
  }
</script>
<style>
</style>




5 个回复

倒序浏览
Derrick.Jiao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2021-5-8 16:45:13
沙发
您可以用var spread = this.designer.getWorkbook();获取。
回复 使用道具 举报
joewave
金牌服务用户   /  发表于:2021-5-8 16:54:42
板凳
OK 非常感谢。
回复 使用道具 举报
Derrick.Jiao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2021-5-8 18:12:39
地板

不用客气,有新问题欢迎开新帖交流~
回复 使用道具 举报
nick_wu
初级会员   /  发表于:2021-9-23 11:30:12
5#
this.spread.options.allowCopyPasteExcelStyle = false;  打印结果还是true 这个怎么回事啊
回复 使用道具 举报
Derrick.Jiao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2021-9-23 11:48:28
6#
nick_wu 发表于 2021-9-23 11:30
this.spread.options.allowCopyPasteExcelStyle = false;  打印结果还是true 这个怎么回事啊

请问您的spread对象是否获取正确呢?建议您开一个新帖提供一下能复现的demo或者相关信息,这边为您调研一下。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部