webstorm中配置vue代码片段

  1. ctrl+shift+A
  2. 输入live
  3.  

    上述红框插入一下代码:
    <template> #[[$END$]]# </template> <script> export default { name: '${COMPONENT_NAME}', props: {}, components: { }, data () { return { } }, computed: { name () { return this.data } }, watch: { data (newValue, oldValue) { } }, methods: { name () { } }, filters: { fnName: function (value) { return value } } } </script> <style scoped> </style>

     以上操作满足组件/实例的选项的顺序

    - name
    - props
    - components
    - data
    - computed
    - watch
    - directives
    - methods
    - filters

     

posted @ 2019-03-19 19:32  sakura-sakura  阅读(1697)  评论(0编辑  收藏  举报