feat: add hooks demo
This commit is contained in:
parent
d4a9ba3aa6
commit
c43f39efef
|
@ -226,14 +226,6 @@ const adminList = [
|
||||||
title: 'router.countTo'
|
title: 'router.countTo'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'watermark',
|
|
||||||
component: 'views/Components/Watermark',
|
|
||||||
name: 'Watermark',
|
|
||||||
meta: {
|
|
||||||
title: 'router.watermark'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'qrcode',
|
path: 'qrcode',
|
||||||
component: 'views/Components/Qrcode',
|
component: 'views/Components/Qrcode',
|
||||||
|
@ -260,6 +252,27 @@ const adminList = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/hooks',
|
||||||
|
component: '#',
|
||||||
|
redirect: '/hooks/useWatermark',
|
||||||
|
name: 'Hooks',
|
||||||
|
meta: {
|
||||||
|
title: 'hooks',
|
||||||
|
icon: 'ic:outline-webhook',
|
||||||
|
alwaysShow: true
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'useWatermark',
|
||||||
|
component: 'views/hooks/useWatermark',
|
||||||
|
name: 'UseWatermark',
|
||||||
|
meta: {
|
||||||
|
title: 'useWatermark'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/level',
|
path: '/level',
|
||||||
component: '#',
|
component: '#',
|
||||||
|
@ -452,10 +465,11 @@ const testList: string[] = [
|
||||||
'/components/icon',
|
'/components/icon',
|
||||||
'/components/echart',
|
'/components/echart',
|
||||||
'/components/count-to',
|
'/components/count-to',
|
||||||
'/components/watermark',
|
|
||||||
'/components/qrcode',
|
'/components/qrcode',
|
||||||
'/components/highlight',
|
'/components/highlight',
|
||||||
'/components/infotip',
|
'/components/infotip',
|
||||||
|
'/hooks',
|
||||||
|
'/hooks/useWatermark',
|
||||||
'/level',
|
'/level',
|
||||||
'/level/menu1',
|
'/level/menu1',
|
||||||
'/level/menu1/menu1-1',
|
'/level/menu1/menu1-1',
|
||||||
|
|
|
@ -277,14 +277,6 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [
|
||||||
title: t('router.countTo')
|
title: t('router.countTo')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'watermark',
|
|
||||||
component: () => import('@/views/Components/Watermark.vue'),
|
|
||||||
name: 'Watermark',
|
|
||||||
meta: {
|
|
||||||
title: t('router.watermark')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'qrcode',
|
path: 'qrcode',
|
||||||
component: () => import('@/views/Components/Qrcode.vue'),
|
component: () => import('@/views/Components/Qrcode.vue'),
|
||||||
|
@ -311,6 +303,27 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/hooks',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/hooks/useWatermark',
|
||||||
|
name: 'Hooks',
|
||||||
|
meta: {
|
||||||
|
title: t('router.component'),
|
||||||
|
icon: 'ic:outline-webhook',
|
||||||
|
alwaysShow: true
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'useWatermark',
|
||||||
|
component: () => import('@/views/hooks/useWatermark.vue'),
|
||||||
|
name: 'UseWatermark',
|
||||||
|
meta: {
|
||||||
|
title: 'useWatermark'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/level',
|
path: '/level',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
@ -20,12 +20,12 @@ onBeforeUnmount(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ContentWrap :title="t('watermarkDemo.watermark')">
|
<ContentWrap title="useWatermark">
|
||||||
<ElButton type="primary" @click="setWatermark(title)">
|
<ElButton type="primary" @click="setWatermark(title)">
|
||||||
{{ t('watermarkDemo.createdWatermark') }}
|
{{ t('watermarkDemo.createdWatermark') }}
|
||||||
</ElButton>
|
</ElButton>
|
||||||
<ElButton type="danger" @click="clear">{{ t('watermarkDemo.clearWatermark') }}</ElButton>
|
<ElButton type="danger" @click="clear">{{ t('watermarkDemo.clearWatermark') }}</ElButton>
|
||||||
<ElButton type="warning" @click="setWatermark(`${title}-new`)">
|
<ElButton type="warning" @click="setWatermark(`New${title}`)">
|
||||||
{{ t('watermarkDemo.resetWatermark') }}
|
{{ t('watermarkDemo.resetWatermark') }}
|
||||||
</ElButton>
|
</ElButton>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
Loading…
Reference in New Issue