Guest User

Untitled

a guest
Jul 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. //v-html中使用filter
  2. v-html="$options.filters.highlight()"
  3.  
  4. //watch对象
  5. {
  6. handler: function() {
  7. //此处不要使用箭头函数,否则会调用不到this的method
  8. },
  9. deep: true
  10. }
  11.  
  12. //组件模板
  13. <!--
  14. option:"标题"
  15. -->
  16. <template>
  17. <div class="tmpl">
  18. {{option}}
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'v-tmpl',
  24. props: ['option'],
  25. data() {
  26. return {}
  27. },
  28. watch:{},
  29. methods:{}
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. .tmpl {
  34. }
  35. </style>
Add Comment
Please, Sign In to add comment