Skip to content
This repository was archived by the owner on Mar 8, 2019. It is now read-only.

Support documentation of extends

Compare
Choose a tag to compare
@rafaesc rafaesc released this 20 Apr 20:53
· 110 commits to master since this release

Document Extends

If you import extends, for it to be documented you need to add in the header the mixin tag @mixin, for example

// src/extends/Base.vue

<template>
  <div>
    <h4>{{ color }}</h4>
    <!--the appropriate input should go here-->
  </div>
</template>
<script>
/**
 * @mixin
 */
export default {
  props: {
    /**
    * The color for the button example
    */
    colorExtends: {
      type: String,
      default: '#333'
    },
  },
}
</script>
<template>
<!-- -->
</template>
<script>
// src/components/Button/Button.vue

import Base from '../../extends/Base';
export default {
  name: 'buttonComponent',
  extends: Base,
  props: {
    /**
    * The size of the button
    * `small, normal, large`
    */
    size: {
      default: 'normal'
    },
    /**
    * Add custom click actions.
    **/
    onCustomClick: {
      default: () => () => null,
    },
  },
  /* ... */
}
</script>