v-cloak does not work in vue.js?

前端 未结 6 1555
半阙折子戏
半阙折子戏 2020-12-13 06:24

There is a div in my page that for show the error message.When I refresh the page,it will appear for a while then it disappear. I added v-cloak but

6条回答
  •  隐瞒了意图╮
    2020-12-13 06:49

    Just include this code to your css file

    [v-cloak] { display:none; }
    

    http://vuejs.org/api/#v-cloak

    Usage example:

    Hello

    This directive will remain on the element until the associated Vue instance finishes compilation. Combined with CSS rules such as [v-cloak] { display: none }, this directive can be used to hide un-compiled mustache bindings until the Vue instance is ready.

    http://vuejs.org/api/#v-cloak

提交回复
热议问题