简体   繁体   English

[Vue 警告]:无法解析指令:bin

[英][Vue warn]: Failed to resolve directive: bin

I am new to VueJS.我是 VueJS 的新手。 Hi although my app is working I am getting this error in my console which blocks the jQuery.嗨,虽然我的应用程序正在运行,但我在控制台中收到此错误,该错误阻止了 jQuery。

v-for="message in messages" looping throught the object and trying to show the object. v-for="message in messages" 循环遍历对象并尝试显示该对象。 but getting this error Vue warn]: Failed to resolve directive: bin但收到此错误 Vue 警告]:无法解析指令:bin

<li v-for="message in messages" class="conversation-item">
<div class="" v-bind:class="message.direction" id="direction" title="other">
    <div class="conversation-avatar">
        <img class="rounded"
          width="36" height="36"
          src="assets/images/messenger-img.jpg"
          alt="">
        </div>
    <div v-if="message.contentType == 'file'" class="conversation-messages">
        <div class="conversation-message">
            <a class="file-link" :href="message.content" :title="message.fileName" :download="message.fileName">
                <div v-if="message.fileType == 'fileType'" class="message file-thumbnail" v-bind:style='{ backgroundImage: "url(" + message.content + ")", }'>
                </div>
                <div v-else class="message.file-thumbnail" v-bind:style='{ backgroundImage: "url(" + message | filterFile + ")", }'>
                </div>
                <div class="file-info"> 
                    <span class="file-name">@{{ message.fileName }}</span> 
                </div>
            </a>
            </div>
        <div class="conversation-timestamp">@{{ message.sentAt }}
        </div>
    </div>
    <div v-else class="conversation-messages">
        <div class="conversation-message">
            <a target="_blank" class="other_chat"></a><span>
                @{{ message.content  }}
            </span></div>
        <div class="conversation-timestamp">@{{ message.sentAt }}
        </div>
    </div>
</div>
</li>

actually this is a laravel blade so dont worry about @ sign实际上这是一个laravel刀片所以不要担心@标志

控制台截图

I had the same error after adding a v-bind directive.Turns out, I had a typo, and instead of v-bind I had v-bin .添加 v-bind 指令后我遇到了同样的错误。结果,我有一个错字,而不是v-bind我有v-bin

In the future, if I receive a "Failed to resolve directive: X" message, I will look in my source for string vX .将来,如果我收到“无法解析指令:X”消息,我将在我的源代码中查找字符串vX

If you stop the system once and restart it again, the problem will be solved.如果您停止系统并重新启动它,问题将得到解决。 When using Vuetify, you must stop the system once after adding any component or property.使用 Vuetify 时,您必须在添加任何组件或属性后停止系统一次。

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

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