[英][Vue warn]: Failed to resolve directive: waves (found in <I18n> at src/views/backend/areachange/Index.vue)
Vue.directive('custom', { inserted: function(el) { el.style.backgroundColor = 'orange' } }) var app = new Vue({ el: '#app' })
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script> <div id="app"> <input v-custom type="text"> <input v-waves type="text"> <!-- The `v-waves` directive will have the same error --> </div>
原因是沒有注冊自定義指令。 有關自定義指令的更多用法,請參見此處。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.