Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //v-html中使用filter
- v-html="$options.filters.highlight()"
- //watch对象
- {
- handler: function() {
- //此处不要使用箭头函数,否则会调用不到this的method
- },
- deep: true
- }
- //组件模板
- <!--
- option:"标题"
- -->
- <template>
- <div class="tmpl">
- {{option}}
- </div>
- </template>
- <script>
- export default {
- name: 'v-tmpl',
- props: ['option'],
- data() {
- return {}
- },
- watch:{},
- methods:{}
- }
- </script>
- <style lang="scss" scoped>
- .tmpl {
- }
- </style>
Add Comment
Please, Sign In to add comment