Преглед на файлове

perf: standard code format in the layout folder

xiaoxian521 преди 2 години
родител
ревизия
25f70fd51b

+ 11 - 7
src/layout/components/navbar.vue

@@ -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>

+ 2 - 1
src/layout/components/notice/noticeItem.vue

@@ -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>
 

+ 2 - 2
src/layout/components/setting/index.vue

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

+ 2 - 1
src/layout/components/sidebar/breadCrumb.vue

@@ -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>

+ 9 - 7
src/layout/components/sidebar/horizontal.vue

@@ -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>

+ 12 - 8
src/layout/components/sidebar/mixNav.vue

@@ -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>

+ 3 - 3
src/layout/components/sidebar/sidebarItem.vue

@@ -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"

+ 2 - 2
src/layout/components/tag/index.vue

@@ -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="

+ 2 - 1
src/layout/index.vue

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