Warning.vue 810 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <div class="warning df aic jcc">
  3. <img :src="exchangeUrl('warning')" alt="" />
  4. <div>预警 :</div>
  5. <div>小洋山港进入枯水期</div>
  6. </div>
  7. </template>
  8. <script>
  9. import { ref, onMounted, computed } from "vue";
  10. import { mapState } from "vuex";
  11. export default {
  12. setup() {
  13. function init() {}
  14. function exchangeUrl(icon) {
  15. return `/${icon}.png`;
  16. }
  17. onMounted(() => {
  18. init();
  19. });
  20. return {
  21. init,
  22. exchangeUrl,
  23. };
  24. },
  25. };
  26. </script>
  27. <style lang="scss" scoped>
  28. .warning {
  29. height: 34px;
  30. background: rgba(134, 172, 232, 0.2);
  31. border-radius: 2px;
  32. font-size: 14px;
  33. font-family: PingFangSC-Regular, PingFang SC;
  34. font-weight: 400;
  35. color: #fff3ec;
  36. img {
  37. height: 25px;
  38. width: 23px;
  39. margin-right: 14px;
  40. }
  41. }
  42. </style>