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


Typescript Class

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 Stylus

<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>

本文地址:

https://www.cnblogs.com/stumpx/p/13359109.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM