Vue JS如何防止点击已经具有点击事件的元素

时间:2019-08-07 10:50:39

标签: javascript vue.js vuejs2

当我单击侧边栏外部的内容时,我想分别关闭它们from urllib.request import urlopen from bs4 import BeautifulSoup url = 'https://www.ouedkniss.com/telephones' html = urlopen(url) bs = BeautifulSoup(html, 'html.parser') text_tag = bs.find('span', class_="annonce_get_description", itemprop="description") inner_html = text_tag.encode_contents() inner_html = inner_html.replace(b'<br/>', b'|br|') bs = BeautifulSoup(inner_html, 'html.parser') words = bs.text.split('|br|') print(words) sidebar。目前,我可以通过主布局上的main-layout来做到这一点,但问题是像div这样的每个元素甚至都没有@click.self事件也没有响应,这很麻烦,因为我的内容居住在另一个div内。

1 个答案:

答案 0 :(得分:1)

如果仅在主布局上使用@click,则该操作应该与对子元素的任何单击一起使用,因为单击仍然会传播到父元素?