index.vue 735 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div class="bot-float-button plr30">
  3. <van-button
  4. v-bind="$attrs"
  5. :color="color"
  6. round
  7. type="primary"
  8. block>
  9. <slot></slot>
  10. </van-button>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: "BotFloatButton",
  16. props: {
  17. color: {
  18. type: String,
  19. default: "#17b3ec"
  20. }
  21. },
  22. components: {
  23. },
  24. watch:{
  25. },
  26. data(){
  27. return {
  28. }
  29. },
  30. mounted() {
  31. },
  32. methods: {
  33. },
  34. };
  35. </script>
  36. <style lang="scss" scoped>
  37. .bot-float-button{
  38. position: fixed;
  39. bottom: 20px;
  40. width: 100%;
  41. }
  42. </style>