Closed nick938 closed 1 year ago
我解决啦啊,官方文档Api中有个canselect函数。默认是
canSelect: (el: HTMLElement) => Boolean(el.id),
重写can-select函数为const canSelect = (el: HTMLElement): Boolean => el.classList.contains("magic-ui-component") || el.classList.contains("magic-ui-container");
就可以了,这样就不会元素有id就可以选中高亮了。
Describe the bug 我在自定义组件,然后在项目根目录下安装了vant,在package/ui中编写了自定义的input组件。代码如下 `
` 然后项目运行起来后点击里面的输入框会报错
To Reproduce
Desktop (please complete the following information):