11<script setup lang="ts">
2- import { ElBacktop , ElButton , ElCheckbox , ElIcon , ElInput , ElOption , ElSelect , ElTable , ElTableColumn , ElText , ElTooltip } from ' element-plus'
2+ import { ElBacktop , ElButton , ElCheckbox , ElIcon , ElInput , ElTable , ElTableColumn , ElText , ElTooltip } from ' element-plus'
33import { defineComponent , h } from ' vue'
44import { useDevToolsPanel } from ' ./hooks/useDevToolsPanel'
5+ import { t } from ' ./lang'
56import { filterJoin } from ' ./utils'
67
78const {
@@ -44,29 +45,22 @@ const PropertyNode = defineComponent({
4445 <h2 class =" font-bold text-center text-lg" >
4546 DOM Diff
4647 </h2 >
47-
48- <ElSelect v-model =" $i18n .locale " class="!w-[100px] !absolute !right-0 !top-0" size="small">
49- <ElOption v-for =" locale in $i18n .availableLocales " :key =" ` locale-${locale } ` " :value =" locale " >
50- {{ locale }}
51- </ElOption >
52- </ElSelect >
53-
5448 <ElText class="block" type="primary">
55- {{ $ t('info') }}
49+ {{ t('info') }}
5650 </ElText >
5751
5852 <ElButton class="mt-[10px]" type="warning" plain @click =" handleClearSelection " >
59- {{ $ t('removeBtn') }}
53+ {{ t('removeBtn') }}
6054 </ElButton >
6155
6256 <ElText v-if =" ! renderCssDiffs .length " class="block !mt-[10px]" type="danger">
63- {{ $ t('selectedInfo') }}
57+ {{ t('selectedInfo') }}
6458 </ElText >
6559
6660 <div class =" flex justify-between my-3" >
67- <ElInput v-model =" inputValue " :placeholder =" $ t (' inputPlaceholder' )" clearable class="!w-[50%]" />
61+ <ElInput v-model =" inputValue " :placeholder =" t (' inputPlaceholder' )" clearable class="!w-[50%]" />
6862
69- <ElCheckbox v-model =" isAllProperty " :label =" $ t (' isAllProperty' )" />
63+ <ElCheckbox v-model =" isAllProperty " :label =" t (' isAllProperty' )" />
7064 </div >
7165 <ElTable
7266 class="w-full"
@@ -76,7 +70,7 @@ const PropertyNode = defineComponent({
7670 :row-class-name =" onTableRowClassName "
7771 @cell-click =" handleCopyStyle "
7872 >
79- <ElTableColumn prop="property" :label =" $ t (' property' )" >
73+ <ElTableColumn prop="property" :label =" t (' property' )" >
8074 <template #default =" scope " >
8175 <PropertyNode :text =" scope .row .property " />
8276 </template >
@@ -86,7 +80,7 @@ const PropertyNode = defineComponent({
8680 <template #header >
8781 <span class =" align-middle" >{{ filterJoin(el.tag, el.id, el.class) }}</span >
8882
89- <ElTooltip :content =" $ t (' tableColumnInfo' )" trigger="click">
83+ <ElTooltip :content =" t (' tableColumnInfo' )" trigger="click">
9084 <ElIcon class="align-middle ml-[4px]">
9185 <svg xmlns =" http://www.w3.org/2000/svg" width =" 1024" height =" 1024" viewBox =" 0 0 1024 1024" ><path fill =" currentColor" d =" M512 64a448 448 0 1 1 0 896a448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768a384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0a48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32" /></svg >
9286 </ElIcon >
0 commit comments