TestCard.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <div class="card-waterfull">
  3. <el-row :gutter="20">
  4. <waterfall
  5. :line-gap="400"
  6. :min-line-gap="150"
  7. :max-line-gap="200"
  8. :single-max-width="400"
  9. :watch="applicationTypeList">
  10. <!-- each component is wrapped by a waterfall slot -->
  11. <waterfall-slot
  12. v-for="(item, index) in applicationTypeList"
  13. width="310"
  14. :height="200"
  15. :order="index"
  16. :key="item.code"
  17. >
  18. <el-card class="test-card" :body-style="{width:'300'}" >
  19. <div slot="header" class="clearfix test-card-header">
  20. <span>{{item.name}}</span>
  21. </div>
  22. <div>
  23. <span>{{item.introduction}}</span>
  24. </div>
  25. </el-card>
  26. </waterfall-slot>
  27. </waterfall>
  28. </el-row>
  29. </div>
  30. </template>
  31. <script>
  32. import Waterfall from 'vue-waterfall/lib/waterfall'
  33. import WaterfallSlot from 'vue-waterfall/lib/waterfall-slot'
  34. export default {
  35. name: "TestCard",
  36. props:['applicationTypeList'],
  37. data(){
  38. return{
  39. }
  40. },
  41. components:{
  42. Waterfall,
  43. WaterfallSlot
  44. },
  45. methods:{
  46. },
  47. mounted() {
  48. console.log(this.applicationTypeList)
  49. }
  50. }
  51. </script>
  52. <style lang="less">
  53. .test-card {
  54. border: none;
  55. .el-card__header{
  56. height:48px !important;
  57. background:rgba(233,240,250,1) !important;
  58. padding: 12px 15px !important;
  59. }
  60. .test-card-header {
  61. border-left: 5px solid #0076cb;
  62. padding-left: 5px;
  63. }
  64. }
  65. .card-waterfull {
  66. .el-card {
  67. width: 98% !important;
  68. }
  69. .el-row {
  70. margin: 0 !important;
  71. }
  72. }
  73. </style>