<blur>

<blur> 是模糊图层组件。

子组件

<blur> 理论上支持各种类型的子元素。

预览效果

&lt;blur&gt; - 图1

示例代码

在线测试:https://editor.eeui.app/#/files/eeui/demo/src/pages/blur-demo.vue

  1. <template>
  2. <div class="app">
  3. <image class="image" src="https://eeui.app/app/demo.png"></image>
  4. <blur class="blur" amount="30">
  5. <text class="text">里面放文字</text>
  6. </blur>
  7. </div>
  8. </template>
  9. <style scoped>
  10. .app {
  11. position: relative;
  12. flex: 1;
  13. }
  14. .image {
  15. width: 750px;
  16. height: 560px;
  17. }
  18. .blur {
  19. position: absolute;
  20. top: 100px;
  21. left: 150px;
  22. width: 450px;
  23. height: 300px;
  24. align-items: center;
  25. justify-content: center;
  26. }
  27. .text {
  28. font-size: 26px;
  29. color: #ff0000;
  30. }
  31. </style>
  32. <script>
  33. export default {
  34. };
  35. </script>

配置参数

属性名 类型 描述 默认值
amount Number 模糊程度,范围:0-100 30
type String 模糊类型:light白色、dark黑色 light

事件回调 callback

  1. /**
  2. * 组件加载完成
  3. */
  4. @ready = function() { ... }