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

node_modules/@antv/x6/src/view/tool.ts:424:36: ERROR: Cannot use "this" here: #2824

Closed
ZephyrTan opened this issue Nov 2, 2022 · 5 comments

Comments

@ZephyrTan
Copy link

    你的 issue没有给出可以定位问题的信息,提供一些有用的信息?

Originally posted by @NewByVector in #2406 (comment)
使用vite直接创建项目,然后引入x6搭建页面就会提示无法使用 this

@x6-bot
Copy link
Contributor

x6-bot bot commented Nov 2, 2022

👋 @ZephyrTan

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.

@ZephyrTan ZephyrTan changed the title 你的 issue没有给出可以定位问题的信息,提供一些有用的信息? node_modules/@antv/x6/src/view/tool.ts:424:36: ERROR: Cannot use "this" here: Nov 2, 2022
@lloydzhou
Copy link
Contributor

搜索了一下x6源码里面定义函数的位置带有this的地方

grep -E "(protected|public)" -Rn | grep this

image

使用protected定义成员函数的时候,函数的默认值直接写this.container看起来这个写法不太规范!

MOMO-0902 added a commit to MOMO-0902/X6 that referenced this issue Nov 7, 2022
@hakityc
Copy link

hakityc commented Feb 20, 2023

请问这个commit会提交到正式版吗?我也遇到了相同的问题

@NewByVector
Copy link
Contributor

@Tangchony 不好意思,上次代码只合并到了 v2 版本,我已经在 v1 版本中发布了新的版本 1.34.11,修复了该问题,请更新一下。

@x6-bot
Copy link
Contributor

x6-bot bot commented Feb 22, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants