NewYear24Popup.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :showFooters="true">
  3. <view class="popup-content">
  4. <view class="des1">
  5. <text>{{ t('news_add_field1.NewYear24.itemT1') }}</text>
  6. <text class="myRED">${{ data.balance }}</text>
  7. <text>{{ t('news_add_field1.NewYear24.itemT2') }}</text>
  8. <text class="myRED">${{ data.income }}</text>!
  9. </view>
  10. </view>
  11. <template #footer>
  12. <button type="primary" @click="close">{{ t('Btn.Confirm') }}</button>
  13. </template>
  14. </cwg-popup>
  15. </template>
  16. <script setup>
  17. import { computed } from 'vue';
  18. import { useI18n } from 'vue-i18n';
  19. const props = defineProps({
  20. visible: { type: Boolean, default: false },
  21. data: { type: Object, default: () => ({ balance: 0, income: 0 }) }
  22. });
  23. const emit = defineEmits(['update:visible']);
  24. const { t } = useI18n();
  25. const visible = computed({
  26. get: () => props.visible,
  27. set: (val) => emit('update:visible', val)
  28. });
  29. const close = () => { visible.value = false; };
  30. </script>
  31. <style lang="scss" scoped>
  32. @import "@/uni.scss";
  33. .popup-content {
  34. padding: px2rpx(20);
  35. text-align: center;
  36. .des1 {
  37. font-size: px2rpx(16);
  38. line-height: 1.6;
  39. margin: px2rpx(30) 0 px2rpx(50);
  40. }
  41. .myRED {
  42. color: #f56c6c;
  43. font-weight: bold;
  44. }
  45. }
  46. </style>