-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c83a026
commit 5c253ce
Showing
6 changed files
with
112 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup lang="ts"> | ||
import { ContentWrap } from '@/components/ContentWrap' | ||
import { ElButton } from 'element-plus' | ||
import { useRouter } from 'vue-router' | ||
const { push } = useRouter() | ||
const openTab = (item: number) => { | ||
push(`/function/multipleTabs-demo/${item}`) | ||
} | ||
</script> | ||
|
||
<template> | ||
<ContentWrap> | ||
<ElButton v-for="item in 5" :key="item" type="primary" @click="openTab(item)"> | ||
打开详情页{{ item }} | ||
</ElButton> | ||
</ContentWrap> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script setup lang="ts"> | ||
import { ContentWrap } from '@/components/ContentWrap' | ||
import { ElInput } from 'element-plus' | ||
import { ref } from 'vue' | ||
import { useRoute } from 'vue-router' | ||
const { params } = useRoute() | ||
const val = ref(params.id as string) | ||
</script> | ||
|
||
<template> | ||
<ContentWrap> 获取参数: <ElInput v-model="val" /> </ContentWrap> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script setup lang="ts"> | ||
import { ContentWrap } from '@/components/ContentWrap' | ||
import { useI18n } from '@/hooks/web/useI18n' | ||
import { ElButton } from 'element-plus' | ||
import { useWatermark } from '@/hooks/web/useWatermark' | ||
import { computed, onBeforeUnmount } from 'vue' | ||
import { useAppStore } from '@/store/modules/app' | ||
const appStore = useAppStore() | ||
const title = computed(() => appStore.getTitle) | ||
const { setWatermark, clear } = useWatermark() | ||
const { t } = useI18n() | ||
onBeforeUnmount(() => { | ||
clear() | ||
}) | ||
</script> | ||
|
||
<template> | ||
<ContentWrap title="useTab"> | ||
<ElButton type="primary" @click="setWatermark(title)"> | ||
{{ t('watermarkDemo.createdWatermark') }} | ||
</ElButton> | ||
<ElButton type="danger" @click="clear">{{ t('watermarkDemo.clearWatermark') }}</ElButton> | ||
<ElButton type="warning" @click="setWatermark(`New${title}`)"> | ||
{{ t('watermarkDemo.resetWatermark') }} | ||
</ElButton> | ||
</ContentWrap> | ||
</template> |