card.vue 727 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <div class="ioc-card">
  3. <div class="card_title">
  4. <slot name="title">{{ title }}</slot>
  5. <span style="float: right">
  6. <slot name="title-extra"></slot>
  7. </span>
  8. </div>
  9. <slot v-if="show"></slot>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. props: {
  15. title: String,
  16. },
  17. data() {
  18. return {
  19. show: true,
  20. };
  21. },
  22. mounted() {
  23. this.$nextTick(()=>{
  24. //this.show = true;
  25. this.$forceUpdate()
  26. })
  27. }
  28. };
  29. </script>
  30. <style lang="less" scoped>
  31. .ioc-card {
  32. border-radius: 4px;
  33. background-color: #ffffff;
  34. .card_title {
  35. padding: 10px 0px 10px 15px;
  36. font-size: 16px;
  37. font-family: PingFangSC-Bold,serif;
  38. color: #333333;
  39. }
  40. }
  41. </style>