index.vue 439 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <el-button v-bind="$attrs" :type="type" v-on="$listeners">
  3. <template v-if="text">
  4. <el-link :underline="false" :type="type" text>
  5. <slot></slot>
  6. </el-link>
  7. </template>
  8. <template v-else>
  9. <slot></slot>
  10. </template>
  11. </el-button>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'MButton',
  16. props: {
  17. text: Boolean,
  18. type: String
  19. }
  20. }
  21. </script>
  22. <style lang="scss" scoped>
  23. </style>