[英]Problem with lit-html, doesn't recognize @click and other attributes from the library
My problem is that WebStorm doesn't work as I expected with lit-html.我的问题是 WebStorm 不能像我预期的那样使用 lit-html。
I installed with $npm install lit html
.我安装了
$npm install lit html
。 I have node modules directory, I have my package JSON and lock JSON with everything standard inside for new library, yet don't find any of the elements.我有节点模块目录,我有我的 package JSON 并锁定 JSON 与新库中的所有标准,但没有找到任何元素。 For example don't recognize
@click
as an event listener:例如,不要将
@click
识别为事件侦听器:
import {html, render} from 'lit-html';
let example = (data) => html `
<div class="contact card">
<div>
<a class="far fa-user-circle gravatar"></a>
</div>
<div class="info">
<h2>Name: John</h2>
<button @click=${data} class="details">Details</button>
<div class="details" id="1">
<p>Phone number: 0847759632</p>
<p>Email: john@john.com</p>
</div>
</div>
</div>
`;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.