File and Code Templates | webstorm代碼文件模板 vue typescript

Typescript Classhtml

import _ from "lodash";

/**類 ${NAME}*/
export default class ${NAME} {
  /**v-for :key*/
  forKey?: string = _.uniqueId()

  constructor(obj?: ${NAME}) {
    if (obj) {
      _.assign(this, obj)
    }
  }
}

Vue Component with Typescript and Stylusvue

<template>
  <div class="${NAME}">
    
  </div>
</template>

<script lang="ts">
import {Vue, Component, Prop, Watch} from "vue-property-decorator";

@Component
export default class ${NAME} extends Vue {
  
}
</script>

<style scoped lang="stylus">

.${NAME}
  padding 0

</style>

本文地址:this

http://www.javashuo.com/article/p-sdapdacx-mb.htmlspa

相關文章
相關標籤/搜索