Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Studio Component #392

Merged
merged 2 commits into from
Jun 27, 2023
Merged

feat: Add Studio Component #392

merged 2 commits into from
Jun 27, 2023

Conversation

pomelo-nwu
Copy link
Member

增加 Studio 组件,用户根据约定,只需要传入接口服务即可通过 ID 获得全部的渲染信息

Studio 组件

通过接口,获得应用渲染的配置参数,从而让用户可以这么实现

export default () => {
  return <window.GISDK.Studio id="xxxxx" service={getProject} />;
};

组件属性说明

  • id:studio 的 唯一 id,可以通过接口获得全部的配置参数

  • service: 第三方托管平台提供的接口,类型:POST

// 入参
const request = {
  id: 'app-xxx',
};
// 出参
const response = {
  workbook: {
    id: 'd3a818ea-f833-4229-85ea-a6670dae4a18',
    name: 'GI',
    activeAssetsKeys: {},
    projectConfig: {
      nodes: [],
      edges: [],
      components: [],
    },
    themes: [],
  },
  dataset: {
    id: 'ds_f16fce61-aa3e-420d-a6cc-6b409f9aa37e',
    engineContext: {
      engineId: 'R+',
      schemaData: {},
    },
    data: {},
  },
  deps: {
    react: '17.x',
    'react-dom': '17.x',
    localforage: '1.10.0',
    antd: '4.24.8',
    '@antv/gi-theme-antd': '0.4.2',
    '@antv/g6': '4.8.14',
    '@antv/graphin': '2.7.16',
    '@antv/gi-sdk': '2.3.5',
  },
  GI_ASSETS_PACKAGES: {
    GI_ASSETS_BASIC: {
      name: '@antv/gi-assets-basic',
      version: '2.3.6',
      url: 'https://gw.alipayobjects.com/os/lib/antv/gi-assets-basic/2.3.6/dist/index.min.js',
      global: 'GI_ASSETS_BASIC',
    },
  },
};

@github-actions
Copy link

你好, @pomelo-nwu CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复

Hello, @pomelo-nwu CI run failed, please click the [Details] button for detailed log information and fix it.

@pomelo-nwu pomelo-nwu merged commit 88d3c5f into master Jun 27, 2023
@pomelo-nwu pomelo-nwu deleted the chore/add-studio branch June 27, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants