perf: standard code format in the layout folder

This commit is contained in:
xiaoxian521 2022-05-14 11:01:43 +08:00
parent 58f6be4d02
commit 25f70fd51b
9 changed files with 45 additions and 32 deletions

View File

@ -78,19 +78,22 @@ function translationEn() {
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'zh')"
@click="translationCh"
><IconifyIconOffline
>
<IconifyIconOffline
class="check-zh"
v-show="locale === 'zh'"
icon="check"
/></el-dropdown-item
>
/>
简体中文
</el-dropdown-item>
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'en')"
@click="translationEn"
>
<span class="check-en" v-show="locale === 'en'">
<IconifyIconOffline icon="check" /> </span
>English
<IconifyIconOffline icon="check" />
</span>
English
</el-dropdown-item>
</el-dropdown-menu>
</template>
@ -107,8 +110,9 @@ function translationEn() {
<IconifyIconOffline
icon="logout-circle-r-line"
style="margin: 5px"
/>{{ t("buttons.hsLoginOut") }}</el-dropdown-item
>
/>
{{ t("buttons.hsLoginOut") }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>

View File

@ -72,7 +72,8 @@ function hoverDescription(event, description) {
:type="props.noticeItem?.status"
size="small"
class="notice-title-extra"
>{{ props.noticeItem?.extra }}
>
{{ props.noticeItem?.extra }}
</el-tag>
</div>

View File

@ -445,8 +445,8 @@ nextTick(() => {
height="15"
style="margin-right: 4px"
/>
清空缓存并返回登录页</el-button
>
清空缓存并返回登录页
</el-button>
</panel>
</template>

View File

@ -104,8 +104,9 @@ const handleLink = (item: RouteLocationMatched): any => {
<span
v-if="item.redirect === 'noRedirect' || index == levelList.length - 1"
class="no-redirect"
>{{ transformI18n(item.meta.title) }}</span
>
{{ transformI18n(item.meta.title) }}
</span>
<a v-else @click.prevent="handleLink(item)">
{{ transformI18n(item.meta.title) }}
</a>

View File

@ -109,17 +109,19 @@ function translationEn() {
@click="translationCh"
>
<span class="check-zh" v-show="locale === 'zh'">
<IconifyIconOffline icon="check" /> </span
>简体中文
<IconifyIconOffline icon="check" />
</span>
简体中文
</el-dropdown-item>
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'en')"
@click="translationEn"
>
<span class="check-en" v-show="locale === 'en'">
<IconifyIconOffline icon="check" /> </span
>English</el-dropdown-item
>
<IconifyIconOffline icon="check" />
</span>
English
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@ -136,8 +138,8 @@ function translationEn() {
icon="logout-circle-r-line"
style="margin: 5px"
/>
{{ t("buttons.hsLoginOut") }}</el-dropdown-item
>
{{ t("buttons.hsLoginOut") }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>

View File

@ -154,17 +154,21 @@ function translationEn() {
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'zh')"
@click="translationCh"
><span class="check-zh" v-show="locale === 'zh'"
><IconifyIconOffline icon="check" /></span
>简体中文</el-dropdown-item
>
<span class="check-zh" v-show="locale === 'zh'">
<IconifyIconOffline icon="check" />
</span>
简体中文
</el-dropdown-item>
<el-dropdown-item
:style="getDropdownItemStyle(locale, 'en')"
@click="translationEn"
><span class="check-en" v-show="locale === 'en'"
><IconifyIconOffline icon="check" /></span
>English</el-dropdown-item
>
<span class="check-en" v-show="locale === 'en'">
<IconifyIconOffline icon="check" />
</span>
English
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@ -181,8 +185,8 @@ function translationEn() {
icon="logout-circle-r-line"
style="margin: 5px"
/>
{{ t("buttons.hsLoginOut") }}</el-dropdown-item
>
{{ t("buttons.hsLoginOut") }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>

View File

@ -172,9 +172,9 @@ function resolvePath(routePath) {
</div>
<template #title>
<div :style="getDivStyle">
<span v-if="!menuMode">{{
transformI18n(onlyOneChild.meta.title)
}}</span>
<span v-if="!menuMode">
{{ transformI18n(onlyOneChild.meta.title) }}
</span>
<el-tooltip
v-else
placement="top"

View File

@ -652,8 +652,8 @@ const getContextMenuStyle = computed((): CSSProperties => {
@mouseleave.prevent="onMouseleave(index)"
@click="tagOnClick(item)"
>
<router-link :to="item.path"
>{{ transformI18n(item.meta.title) }}
<router-link :to="item.path">
{{ transformI18n(item.meta.title) }}
</router-link>
<span
v-if="

View File

@ -234,7 +234,8 @@ const layoutHeader = defineComponent({
<el-backtop
title="回到顶部"
target=".main-container .el-scrollbar__wrap"
><backTop />
>
<backTop />
</el-backtop>
<layout-header />
<!-- 主体内容 -->