简体   繁体   English

lit-html 的问题,无法识别库中的 @click 和其他属性

[英]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>
`;

lit-html is not yet supported, please vote for WEB-32640 to be notified on any progress with this feature lit-html尚不支持,请投票支持WEB-32640以获取有关此功能的任何进展的通知

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM