We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如图和代码: 【BasicTree】 点击 actionList 中的新增或者删除, 会先触发actionList的onClick,然后还会触发一次节点选中事件:handleSelect。 有没有办法能让我点击新增或删除,只触发actionList的onClick??
<BasicTree title="部门列表" toolbar checkable search :actionList="actionList" :beforeRightClick="getRightMenuList" :clickRowToExpand="true" :treeData="treeData" :replaceFields="{ key: 'id', title: 'label' }" @select="handleSelect" ref="treeRef" /> const actionList: ActionItem[] = [ { render: (node) => { return h(PlusOutlined, { class: 'ml-2', onClick: () => { console.log('点击了新增') }, }); }, }, { render: (node) => { return h(DeleteOutlined, { class: 'ml-2', onClick: () => { batchDelete([node.id]); }, }); }, }, ];
The text was updated successfully, but these errors were encountered:
你可以尝试下面的代码,点击时阻止事件冒泡
<BasicTree title="部门列表" toolbar checkable search :actionList="actionList" :beforeRightClick="getRightMenuList" :clickRowToExpand="true" :treeData="treeData" :replaceFields="{ key: 'id', title: 'label' }" @select="handleSelect" ref="treeRef" /> const actionList: ActionItem[] = [ { render: (node) => { return h(PlusOutlined, { class: 'ml-2', onClick: (e) => { e.stopPropagation(); console.log('点击了新增') }, }); }, }, { render: (node) => { return h(DeleteOutlined, { class: 'ml-2', onClick: () => { batchDelete([node.id]); }, }); }, }, ];
Sorry, something went wrong.
感谢!
No branches or pull requests
如图和代码:
【BasicTree】 点击 actionList 中的新增或者删除, 会先触发actionList的onClick,然后还会触发一次节点选中事件:handleSelect。 有没有办法能让我点击新增或删除,只触发actionList的onClick??
The text was updated successfully, but these errors were encountered: