当前位置:   article > 正文

vue3科技感卡片背景封装

vue科技感
image.png

利用<slot></slot> 特性即可,这方面微信小程序也是差不多的玩法在<script>

  1. export default {
  2. name: 'CornerDivs',
  3. mounted() {
  4. },
  5. };

用法:

  1. <template>
  2. 33333333333333
  3. <CornerDivs>
  4. <div style="width: 50px;height: 200px;" >
  5. fffffffffff
  6. </div>
  7. </CornerDivs>
  8. <CornerDivs>
  9. <div style="width: 50px;height: 200px;" >
  10. fffffffffff
  11. </div>
  12. </CornerDivs>
  13. <CornerDivs>
  14. <div style="width: 50px;height: 200px;" >
  15. fffffffffff
  16. </div>
  17. </CornerDivs>
  18. <CornerDivs>
  19. <div style="width: 50px;height: 200px;" >
  20. fffffffffff
  21. </div>
  22. </CornerDivs>
  23. <CornerDivs>
  24. <div style="width: 50px;height: 200px;" >
  25. fffffffffff
  26. </div>
  27. </CornerDivs>
  28. </template>
  29. <script setup>
  30. import { ref } from "vue";
  31. import CornerDivs from '../../components/mycard.vue';
  32. </script>
  33. <style>
  34. </style>

完整代码mycard.vue如下:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/367646?site
推荐阅读