pad页面工具栏添加中英文切换

This commit is contained in:
fangxiang 2022-04-24 15:47:09 +08:00
parent 4ff3d25fed
commit bd98498969
5 changed files with 41 additions and 22 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 755 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -108,27 +108,53 @@
v-if="plan_running"
@click="stopPlan"
/>
<q-space />
<q-btn
class="col-auto"
:class="$store.state.landspace ? 'q-mx-sm' : ''"
stretch
stack
flat
icon="img:pad/toolbar/file_upload_icon.png"
:label="$t('file manage')"
@click="$refs.file_manage_dialog.showDialog()"
/>
<q-btn
class="col"
:class="$store.state.landspace ? 'q-mx-sm' : ''"
stretch
stack
flat
icon="img:pad/toolbar/wallpaper_icon.png"
:label="$t('background image')"
@click="$refs.background_image_dialog.showDialog()"
/>
icon="img:pad/toolbar/other_setting.png"
:label="$t('other setting')"
>
<q-popup-proxy>
<q-list class="shadow-2 text-primary">
<q-item
clickable
v-close-popup
@click="$refs.file_manage_dialog.showDialog()"
>
<q-item-section avatar>
<q-icon name="img:pad/toolbar/file_upload_icon.png" />
</q-item-section>
<q-item-section>
{{ $t("file manage") }}
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@click="$refs.background_image_dialog.showDialog()"
>
<q-item-section avatar>
<q-icon name="img:pad/toolbar/wallpaper_icon.png" />
</q-item-section>
<q-item-section>
{{ $t("background image setting") }}
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="switchLanguage">
<q-item-section avatar>
<q-icon name="img:pad/toolbar/cn_en.png" />
</q-item-section>
<q-item-section>
{{ $t("CN/EN switch") }}
</q-item-section>
</q-item>
</q-list>
</q-popup-proxy>
</q-btn>
<div class="col"></div>
<q-btn
class="col"
@ -260,13 +286,6 @@ export default defineComponent({
}
},
closeAllWindows() {
// for (const window of $store.state.windows) {
// if (window) {
// GlobalData.getInstance()
// .getCurrentClient()
// ?.closeWindow(window.window_id);
// }
// }
GlobalData.getInstance().getCurrentClient()?.closeWindow(-1);
},
switchLanguage() {