Skip to content

Commit

Permalink
refactor(projects): perf page function_tab
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Jan 25, 2024
1 parent 59bec2d commit b5477e8
Showing 1 changed file with 29 additions and 46 deletions.
75 changes: 29 additions & 46 deletions src/views/function/tab/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,26 @@ function resetTabLabel() {
segmented
class="card-wrapper"
>
<NList>
<NListItem>
<NThing :title="$t('page.function.tab.tabOperate.addTab')">
<NButton @click="routerPushByKey('about')">{{ $t('page.function.tab.tabOperate.addTabDesc') }}</NButton>
</NThing>
</NListItem>
<NListItem>
<NThing :title="$t('page.function.tab.tabOperate.closeTab')">
<NSpace>
<NButton @click="tabStore.removeActiveTab">
{{ $t('page.function.tab.tabOperate.closeCurrentTab') }}
</NButton>
<NButton @click="tabStore.removeTabByRouteName('about')">
{{ $t('page.function.tab.tabOperate.closeAboutTab') }}
</NButton>
</NSpace>
</NThing>
</NListItem>
<NListItem>
<NThing :title="$t('page.function.tab.tabOperate.addMultiTab')">
<NSpace>
<NButton @click="routerPushByKey('function_multi-tab')">
{{ $t('page.function.tab.tabOperate.addMultiTabDesc1') }}
</NButton>
<NButton @click="routerPushByKey('function_multi-tab', { query: { a: '1' } })">
{{ $t('page.function.tab.tabOperate.addMultiTabDesc2') }}
</NButton>
</NSpace>
</NThing>
</NListItem>
</NList>
<NDivider title-placement="left">{{ $t('page.function.tab.tabOperate.addTab') }}</NDivider>
<NButton @click="routerPushByKey('about')">{{ $t('page.function.tab.tabOperate.addTabDesc') }}</NButton>
<NDivider title-placement="left">{{ $t('page.function.tab.tabOperate.closeTab') }}</NDivider>
<NSpace>
<NButton @click="tabStore.removeActiveTab">
{{ $t('page.function.tab.tabOperate.closeCurrentTab') }}
</NButton>
<NButton @click="tabStore.removeTabByRouteName('about')">
{{ $t('page.function.tab.tabOperate.closeAboutTab') }}
</NButton>
</NSpace>
<NDivider title-placement="left">{{ $t('page.function.tab.tabOperate.addMultiTab') }}</NDivider>
<NSpace>
<NButton @click="routerPushByKey('function_multi-tab')">
{{ $t('page.function.tab.tabOperate.addMultiTabDesc1') }}
</NButton>
<NButton @click="routerPushByKey('function_multi-tab', { query: { a: '1' } })">
{{ $t('page.function.tab.tabOperate.addMultiTabDesc2') }}
</NButton>
</NSpace>
</NCard>
<NCard
:title="$t('page.function.tab.tabTitle.title')"
Expand All @@ -66,21 +55,15 @@ function resetTabLabel() {
segmented
class="card-wrapper"
>
<NList>
<NListItem>
<NThing :title="$t('page.function.tab.tabTitle.changeTitle')">
<NInputGroup class="w-240px">
<NInput v-model:value="tabLabel" />
<NButton @click="changeTabLabel">{{ $t('page.function.tab.tabTitle.change') }}</NButton>
</NInputGroup>
</NThing>
</NListItem>
<NListItem>
<NThing :title="$t('page.function.tab.tabTitle.resetTitle')">
<NButton @click="resetTabLabel">{{ $t('page.function.tab.tabTitle.reset') }}</NButton>
</NThing>
</NListItem>
</NList>
<NDivider title-placement="left">{{ $t('page.function.tab.tabTitle.changeTitle') }}</NDivider>
<NInputGroup class="max-w-240px">
<NInput v-model:value="tabLabel" />
<NButton type="primary" @click="changeTabLabel">{{ $t('page.function.tab.tabTitle.change') }}</NButton>
</NInputGroup>
<NDivider title-placement="left">{{ $t('page.function.tab.tabTitle.resetTitle') }}</NDivider>
<NButton type="error" ghost class="w-80px" @click="resetTabLabel">
{{ $t('page.function.tab.tabTitle.reset') }}
</NButton>
</NCard>
</NSpace>
</template>
Expand Down

1 comment on commit b5477e8

@vercel
Copy link

@vercel vercel bot commented on b5477e8 Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

soybean-admin – ./

soybean-admin-git-main-soybeanjs.vercel.app
soybean-admin-eta.vercel.app
soybean-admin-soybeanjs.vercel.app

Please sign in to comment.