refactor(projects): perf page function_tab

This commit is contained in:
Soybean 2024-01-26 02:00:34 +08:00
parent 59bec2d923
commit b5477e8996

View File

@ -27,14 +27,9 @@ function resetTabLabel() {
segmented segmented
class="card-wrapper" class="card-wrapper"
> >
<NList> <NDivider title-placement="left">{{ $t('page.function.tab.tabOperate.addTab') }}</NDivider>
<NListItem>
<NThing :title="$t('page.function.tab.tabOperate.addTab')">
<NButton @click="routerPushByKey('about')">{{ $t('page.function.tab.tabOperate.addTabDesc') }}</NButton> <NButton @click="routerPushByKey('about')">{{ $t('page.function.tab.tabOperate.addTabDesc') }}</NButton>
</NThing> <NDivider title-placement="left">{{ $t('page.function.tab.tabOperate.closeTab') }}</NDivider>
</NListItem>
<NListItem>
<NThing :title="$t('page.function.tab.tabOperate.closeTab')">
<NSpace> <NSpace>
<NButton @click="tabStore.removeActiveTab"> <NButton @click="tabStore.removeActiveTab">
{{ $t('page.function.tab.tabOperate.closeCurrentTab') }} {{ $t('page.function.tab.tabOperate.closeCurrentTab') }}
@ -43,10 +38,7 @@ function resetTabLabel() {
{{ $t('page.function.tab.tabOperate.closeAboutTab') }} {{ $t('page.function.tab.tabOperate.closeAboutTab') }}
</NButton> </NButton>
</NSpace> </NSpace>
</NThing> <NDivider title-placement="left">{{ $t('page.function.tab.tabOperate.addMultiTab') }}</NDivider>
</NListItem>
<NListItem>
<NThing :title="$t('page.function.tab.tabOperate.addMultiTab')">
<NSpace> <NSpace>
<NButton @click="routerPushByKey('function_multi-tab')"> <NButton @click="routerPushByKey('function_multi-tab')">
{{ $t('page.function.tab.tabOperate.addMultiTabDesc1') }} {{ $t('page.function.tab.tabOperate.addMultiTabDesc1') }}
@ -55,9 +47,6 @@ function resetTabLabel() {
{{ $t('page.function.tab.tabOperate.addMultiTabDesc2') }} {{ $t('page.function.tab.tabOperate.addMultiTabDesc2') }}
</NButton> </NButton>
</NSpace> </NSpace>
</NThing>
</NListItem>
</NList>
</NCard> </NCard>
<NCard <NCard
:title="$t('page.function.tab.tabTitle.title')" :title="$t('page.function.tab.tabTitle.title')"
@ -66,21 +55,15 @@ function resetTabLabel() {
segmented segmented
class="card-wrapper" class="card-wrapper"
> >
<NList> <NDivider title-placement="left">{{ $t('page.function.tab.tabTitle.changeTitle') }}</NDivider>
<NListItem> <NInputGroup class="max-w-240px">
<NThing :title="$t('page.function.tab.tabTitle.changeTitle')">
<NInputGroup class="w-240px">
<NInput v-model:value="tabLabel" /> <NInput v-model:value="tabLabel" />
<NButton @click="changeTabLabel">{{ $t('page.function.tab.tabTitle.change') }}</NButton> <NButton type="primary" @click="changeTabLabel">{{ $t('page.function.tab.tabTitle.change') }}</NButton>
</NInputGroup> </NInputGroup>
</NThing> <NDivider title-placement="left">{{ $t('page.function.tab.tabTitle.resetTitle') }}</NDivider>
</NListItem> <NButton type="error" ghost class="w-80px" @click="resetTabLabel">
<NListItem> {{ $t('page.function.tab.tabTitle.reset') }}
<NThing :title="$t('page.function.tab.tabTitle.resetTitle')"> </NButton>
<NButton @click="resetTabLabel">{{ $t('page.function.tab.tabTitle.reset') }}</NButton>
</NThing>
</NListItem>
</NList>
</NCard> </NCard>
</NSpace> </NSpace>
</template> </template>