0
にこのコードを期待していませんVueの指令を作成します。表現
// template in pug
#review-step.container
.panel(v-test.a)
// in main.js
Vue.directive('test', function(el, binding) {
console.log(binding.modifiers)
})
は、これらのエラーを与える:
[Vue warn]: Property or method "v" is not defined on the instance but referenced during render. ...
[Vue warn]: Property or method "test" is not defined on the instance but referenced during render. ...
TypeError: Cannot read property 'a' of undefined. ...
私はv-test.a=""
にディレクティブを変更した場合、それは正常に動作します。同様に、v-pre
、v-cloak
、およびv-once
はすべて正常に動作しますので、テンプレートを誤ってコンパイルすることはありません。 bootstrap-vueから
v-pre
のように、何の表現を期待していないディレクティブを作成する方法を知りたい
、v-cloak
、またはv-b-modal
(ちなみにそのディレクティブは、この同じ問題を抱えているので、私は、本当にここにいる理由です) 。
vue custom directivesのドキュメントには何も表示されず、directive pre
などのvueリポジトリを検索しても、vueチームの成果を上げることはできませんでした。