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