Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Mar 18, 2025

perf: Translate processing

@fit2bot fit2bot requested a review from a team March 18, 2025 06:49
@@ -4,7 +4,7 @@
:visible="iVisible"
class="processing-dialog"
height="300"
title="Processing"
:title="$tc('Processing')"
width="300"
@confirm="iVisible=false"
>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The given code is incomplete and missing some essential parts like the logic to control visibility of processing dialog. However, I will make a few observations that might be beneficial:

  • There's no way to actually confirm an action (like closing the dialog) unless the function iVisible changes on confirmation.
  • We could optimize this by using CSS to change properties dynamically when visible.

Here’s what can be changed:

<div class="processing-dialog">
    <div v-if="iVisible" style="display:none;">
        <!-- Content goes here -->
        &lt;p>&ensp;{{ $t("Processing") }}</p>
        &lt;button>&ensp;&nbsp;</button>...
    </div>
</div>

This version uses dynamic CSS to hide the content until it becomes visible via v-if, which helps with reusability across different components. It provides better performance while keeping the structure clean and reusable for any component dealing with dialogs in the same context but differing use cases due to different locales or other UI styles.

If there are specific improvements based on locale data you want to utilize, remember to adapt the translation string &quot;$tc(&amp;amp;&amp;amp;){"$lang"&apos; &quot;/}" within your Vue.js app to include localized text strings properly.

Remember to always update translations accordingly if localization features change in future versions!

@w940853815 w940853815 merged commit 7664487 into dev Mar 18, 2025
3 of 4 checks passed
@w940853815 w940853815 deleted the pr@dev@perf_tran_process branch March 18, 2025 06:50
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants