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

高亮选中 #144

Open
From-WH opened this issue Oct 15, 2022 · 1 comment
Open

高亮选中 #144

From-WH opened this issue Oct 15, 2022 · 1 comment

Comments

@From-WH
Copy link

From-WH commented Oct 15, 2022

如何使被选中的项高亮

@zanmeng
Copy link

zanmeng commented Dec 6, 2024

自己写一个吧

我是这样写 你可以参考一下
if (this.nodeClickDom.size !== 0) {
this.nodeClickDom.forEach(dom => dom.classList.remove('nodeClick'));
this.nodeClickDom=[]
}
const elecDom = document.getElementById(params.id)?.getElementsByClassName('vtl-node-main')[0];
if (elecDom) {
elecDom.classList.add('nodeClick');
this.nodeClickDom.push(elecDom);
}

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