message-tip.vue 894 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div class="message-tip">
  3. <span>{{ tipContent }}</span>
  4. </div>
  5. </template>
  6. <script lang="ts" setup>
  7. import { computed } from '../../../../adapter-vue';
  8. const props = defineProps({
  9. content: {
  10. type: Object,
  11. default: () => ({}),
  12. },
  13. });
  14. const tipContent = computed(() => props.content?.text || props.content?.custom || '');
  15. </script>
  16. <style lang="scss" scoped>
  17. @import "../../../../assets/styles/common";
  18. .message-tip {
  19. margin: 0 auto;
  20. padding: 0 20px;
  21. color: #999;
  22. font-size: 12px;
  23. overflow-wrap: anywhere;
  24. display: flex;
  25. place-content: center center;
  26. align-items: center;
  27. text-align: center;
  28. margin-bottom: 10px;
  29. &-highlight {
  30. animation: highlight 1000ms infinite;
  31. @keyframes highlight {
  32. 50% {
  33. color: #ff9c19;
  34. }
  35. }
  36. @keyframes highlight {
  37. 50% {
  38. color: #ff9c19;
  39. }
  40. }
  41. }
  42. }
  43. </style>