shadow.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="backText">返回</block><block slot="content">边框阴影</block></cu-custom>
  4. <view class="cu-bar bg-white solid-bottom">
  5. <view class="action">
  6. <text class="cuIcon-title text-blue"></text>边框
  7. </view>
  8. <view class="action">
  9. <switch class="sm" @change="SetSize" :class="size?'checked':''"></switch>
  10. </view>
  11. </view>
  12. <view class="padding bg-white text-center">
  13. <view class="padding" :class="size?'solids':'solid'">四周</view>
  14. <view class="padding margin-top" :class="size?'solids-top':'solid-top'">上</view>
  15. <view class="padding margin-top" :class="size?'solids-right':'solid-right'">右</view>
  16. <view class="padding margin-top" :class="size?'solids-bottom':'solid-bottom'">下</view>
  17. <view class="padding margin-top" :class="size?'solids-left':'solid-left'">左</view>
  18. </view>
  19. <view class="cu-bar bg-white margin-top">
  20. <view class="action">
  21. <text class="cuIcon-title text-blue"></text>阴影
  22. </view>
  23. </view>
  24. <view class="padding text-center">
  25. <view class="padding-xl radius shadow bg-white">默认阴影</view>
  26. <view class="padding-xl radius shadow bg-blue margin-top">根据背景颜色而改变的阴影</view>
  27. <view class="padding-xl radius shadow shadow-lg bg-white margin-top">长阴影</view>
  28. <view class="padding-xl radius shadow shadow-lg bg-blue margin-top">长阴影</view>
  29. <view class="padding-xl radius shadow-warp bg-white margin-top">翘边阴影</view>
  30. <view class="padding-xl radius shadow-blur bg-red margin-top bg-img" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big91005.jpg);">
  31. <view>根据背景图而改变的阴影</view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. size: false
  41. };
  42. },
  43. methods: {
  44. SetSize(e) {
  45. this.size = e.detail.value
  46. }
  47. }
  48. }
  49. </script>
  50. <style>
  51. </style>