index.vue 637 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div v-if="show" class="title">
  3. <p>
  4. <i class="el-icon-warning"></i>
  5. {{ title }}</p>
  6. </div>
  7. </template>
  8. <script>
  9. export default {
  10. name: 'Tip',
  11. props: {
  12. title: {
  13. type: String,
  14. default: ''
  15. },
  16. show: {
  17. type: Boolean,
  18. default: true
  19. }
  20. }
  21. }
  22. </script>
  23. <style lang="scss" scoped>
  24. .title {
  25. color: #E6A23C;
  26. background: rgb(253, 246, 236);
  27. border-radius: 2px;
  28. padding: 4px 8px;
  29. width: 100%;
  30. text-align: left;
  31. p {
  32. margin: 0;
  33. padding-left: 0;
  34. white-space: pre-line;
  35. font-size: 14px;
  36. line-height: 24px;
  37. text-align: left;
  38. }
  39. }
  40. </style>