
* feat: captcha example * fix: fix lint errors * chore: event handling and methods * chore: add accessibility features ARIA labels and roles * refactor: refactor code structure and improve captcha demo page * feat: add captcha internationalization * chore: 适配时间戳国际化展示 * fix: 1. 添加点击位置边界校验,防止点击外部导致x,y误差。2. 演示页面宽度过长添加滚动条。3. 添加hooks * feat: sync test * feat: 添加合并表单功能 * fix: 修复上一步不展示问题 --------- Co-authored-by: vince <vince292007@gmail.com>
154 lines
4.4 KiB
TypeScript
154 lines
4.4 KiB
TypeScript
import type { RouteRecordRaw } from 'vue-router';
|
|
|
|
import { BasicLayout } from '#/layouts';
|
|
import { $t } from '#/locales';
|
|
|
|
const routes: RouteRecordRaw[] = [
|
|
{
|
|
component: BasicLayout,
|
|
meta: {
|
|
icon: 'ion:layers-outline',
|
|
keepAlive: true,
|
|
order: 1000,
|
|
title: $t('page.examples.title'),
|
|
},
|
|
name: 'Examples',
|
|
path: '/examples',
|
|
children: [
|
|
{
|
|
name: 'ModalExample',
|
|
path: '/examples/modal',
|
|
component: () => import('#/views/examples/modal/index.vue'),
|
|
meta: {
|
|
icon: 'system-uicons:window-content',
|
|
title: $t('page.examples.modal.title'),
|
|
},
|
|
},
|
|
{
|
|
name: 'DrawerExample',
|
|
path: '/examples/drawer',
|
|
component: () => import('#/views/examples/drawer/index.vue'),
|
|
meta: {
|
|
icon: 'iconoir:drawer',
|
|
title: $t('page.examples.drawer.title'),
|
|
},
|
|
},
|
|
{
|
|
name: 'EllipsisExample',
|
|
path: '/examples/ellipsis',
|
|
component: () => import('#/views/examples/ellipsis/index.vue'),
|
|
meta: {
|
|
icon: 'ion:ellipsis-horizontal',
|
|
title: $t('page.examples.ellipsis.title'),
|
|
},
|
|
},
|
|
|
|
{
|
|
name: 'FormExample',
|
|
path: '/examples/form',
|
|
meta: {
|
|
icon: 'mdi:form-select',
|
|
title: $t('page.examples.form.title'),
|
|
},
|
|
children: [
|
|
{
|
|
name: 'FormBasicExample',
|
|
path: '/examples/form/basic',
|
|
component: () => import('#/views/examples/form/basic.vue'),
|
|
meta: {
|
|
title: $t('page.examples.form.basic'),
|
|
},
|
|
},
|
|
{
|
|
name: 'FormQueryExample',
|
|
path: '/examples/form/query',
|
|
component: () => import('#/views/examples/form/query.vue'),
|
|
meta: {
|
|
title: $t('page.examples.form.query'),
|
|
},
|
|
},
|
|
{
|
|
name: 'FormRulesExample',
|
|
path: '/examples/form/rules',
|
|
component: () => import('#/views/examples/form/rules.vue'),
|
|
meta: {
|
|
title: $t('page.examples.form.rules'),
|
|
},
|
|
},
|
|
{
|
|
name: 'FormDynamicExample',
|
|
path: '/examples/form/dynamic',
|
|
component: () => import('#/views/examples/form/dynamic.vue'),
|
|
meta: {
|
|
title: $t('page.examples.form.dynamic'),
|
|
},
|
|
},
|
|
{
|
|
name: 'FormCustomExample',
|
|
path: '/examples/form/custom',
|
|
component: () => import('#/views/examples/form/custom.vue'),
|
|
meta: {
|
|
title: $t('page.examples.form.custom'),
|
|
},
|
|
},
|
|
{
|
|
name: 'FormApiExample',
|
|
path: '/examples/form/api',
|
|
component: () => import('#/views/examples/form/api.vue'),
|
|
meta: {
|
|
title: $t('page.examples.form.api'),
|
|
},
|
|
},
|
|
{
|
|
name: 'FormMergeExample',
|
|
path: '/examples/form/merge',
|
|
component: () => import('#/views/examples/form/merge.vue'),
|
|
meta: {
|
|
title: $t('page.examples.form.merge'),
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'CaptchaExample',
|
|
path: '/examples/captcha',
|
|
meta: {
|
|
icon: 'logos:recaptcha',
|
|
title: $t('page.examples.captcha.title'),
|
|
},
|
|
children: [
|
|
{
|
|
name: 'DragVerifyExample',
|
|
path: '/examples/captcha/slider',
|
|
component: () =>
|
|
import('#/views/examples/captcha/slider-captcha.vue'),
|
|
meta: {
|
|
title: $t('page.examples.captcha.sliderCaptcha'),
|
|
},
|
|
},
|
|
{
|
|
name: 'RotateVerifyExample',
|
|
path: '/examples/captcha/slider-rotate',
|
|
component: () =>
|
|
import('#/views/examples/captcha/slider-rotate-captcha.vue'),
|
|
meta: {
|
|
title: $t('page.examples.captcha.sliderRotateCaptcha'),
|
|
},
|
|
},
|
|
{
|
|
name: 'CaptchaPointSelectionExample',
|
|
path: '/examples/captcha/point-selection',
|
|
component: () =>
|
|
import('#/views/examples/captcha/point-selection-captcha.vue'),
|
|
meta: {
|
|
title: $t('page.examples.captcha.pointSelection'),
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
export default routes;
|