我在我的项目中起诉https://github.com/DominikSerafin/vuebar指令。现在取决于一些 var 我想在 html 中使用它与否。
像这样
<div v-bar>
//this div contains huge html like 1200 lines of code and doing
// v-if is not option since i will have to duplicate all of its content
</div>
所以总结一下:
<div v-bar v-if="somevar"></div> // is not and option bceuse that div contains 1200 of code
有什么办法可以让我说:
<div some_var ? v-bar:''></div>
或者让我的指令继承那个 v-bar 并渲染?