(Translated by https://www.hiragana.jp/)
antv x6初始化画布报错Uncaught TypeError: Class constructor Ph cannot be invoked without 'new' · Issue #4342 · antvis/X6 · GitHub
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

antv x6はつはじめ画布がふ报错Uncaught TypeError: Class constructor Ph cannot be invoked without 'new' #4342

Open
GYJ11 opened this issue Jun 13, 2024 · 2 comments

Comments

@GYJ11
Copy link

GYJ11 commented Jun 13, 2024

问题描述

ざいhtmlぶんけんちゅう使用しようscript标签引入https://cdnjs.cloudflare.com/ajax/libs/antv-x6/2.0.0/index.js,しかきさき调用new X6.Graph,结果ひかえせいだい报错Uncaught TypeError: Class constructor Ph cannot be invoked without 'new',画布がふ也没出来でき

じゅう现链せっ

见问题描じゅつ

じゅう现步骤

见问题描じゅつ

预期ぎょう

ようcdnてき方式ほうしき引入antv x6并初はじめ画布がふかい现报错,のう够正つね载出画布がふ

平台ひらだい

  • 操作そうさけい统: Windows
  • 网页浏览: Chrome
  • X6 版本はんぽん: 2.0.0

へいまく截图ある视频(选)

No response

补充说明(选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Jun 13, 2024

👋 @GYJ11

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@XueMeijing
Copy link
Contributor

XueMeijing commented Jun 20, 2024

もちいしんてんてき版本はんぽん

<div id="root" style="width: 600px;height: 600px;"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/antv-x6/2.18.1/index.js"></script>
<script>
  const graph = new X6.Graph({
    container: document.querySelector('#root'),
    grid: true
  })
  console.log('X6', X6)
  console.log('graph', graph)
</script>

image

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

No branches or pull requests

2 participants