2026-07-30 11:23:50 +08:00
|
|
|
/* eslint-disable */
|
|
|
|
|
/* prettier-ignore */
|
|
|
|
|
// Generated by elegant-router
|
|
|
|
|
// Read more: https://github.com/soybeanjs/elegant-router
|
|
|
|
|
|
|
|
|
|
declare module "@elegant-router/types" {
|
|
|
|
|
type ElegantConstRoute = import('@elegant-router/vue').ElegantConstRoute;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* route layout
|
|
|
|
|
*/
|
|
|
|
|
export type RouteLayout = "base" | "blank";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* route map
|
|
|
|
|
*/
|
|
|
|
|
export type RouteMap = {
|
|
|
|
|
"root": "/";
|
|
|
|
|
"not-found": "/:pathMatch(.*)*";
|
|
|
|
|
"403": "/403";
|
|
|
|
|
"404": "/404";
|
|
|
|
|
"500": "/500";
|
2026-08-25 14:18:47 +08:00
|
|
|
"customer-service": "/customer-service";
|
|
|
|
|
"customer-service_feedbacks": "/customer-service/feedbacks";
|
2026-07-30 11:23:50 +08:00
|
|
|
"headphone": "/headphone";
|
|
|
|
|
"headphone_brand": "/headphone/brand";
|
2026-08-17 15:41:32 +08:00
|
|
|
"headphone_impedance": "/headphone/impedance";
|
2026-07-30 11:23:50 +08:00
|
|
|
"headphone_model": "/headphone/model";
|
|
|
|
|
"home": "/home";
|
|
|
|
|
"iframe-page": "/iframe-page/:url";
|
|
|
|
|
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
|
2026-08-14 11:26:20 +08:00
|
|
|
"meilisearch": "/meilisearch";
|
2026-07-30 11:23:50 +08:00
|
|
|
"share-code": "/share-code";
|
|
|
|
|
"share-code_log": "/share-code/log";
|
|
|
|
|
"system": "/system";
|
|
|
|
|
"system_users": "/system/users";
|
|
|
|
|
"toolbox": "/toolbox";
|
|
|
|
|
"toolbox_luxsin-controller": "/toolbox/luxsin-controller";
|
|
|
|
|
"upgrade": "/upgrade";
|
|
|
|
|
"upgrade_blacklist": "/upgrade/blacklist";
|
|
|
|
|
"upgrade_ota": "/upgrade/ota";
|
|
|
|
|
"upgrade_ota-target-device": "/upgrade/ota-target-device";
|
2026-07-30 18:27:42 +08:00
|
|
|
"www": "/www";
|
|
|
|
|
"www_contact": "/www/contact";
|
|
|
|
|
"www_contact_settings": "/www/contact/settings";
|
|
|
|
|
"www_contact_submissions": "/www/contact/submissions";
|
|
|
|
|
"www_global": "/www/global";
|
|
|
|
|
"www_global_basic": "/www/global/basic";
|
|
|
|
|
"www_global_footer": "/www/global/footer";
|
|
|
|
|
"www_global_seo": "/www/global/seo";
|
|
|
|
|
"www_global_social": "/www/global/social";
|
|
|
|
|
"www_i18n": "/www/i18n";
|
|
|
|
|
"www_media": "/www/media";
|
|
|
|
|
"www_nav": "/www/nav";
|
|
|
|
|
"www_nav_appearance": "/www/nav/appearance";
|
|
|
|
|
"www_nav_items": "/www/nav/items";
|
|
|
|
|
"www_news": "/www/news";
|
|
|
|
|
"www_news_articles": "/www/news/articles";
|
|
|
|
|
"www_page": "/www/page";
|
|
|
|
|
"www_page_about": "/www/page/about";
|
|
|
|
|
"www_page_home": "/www/page/home";
|
|
|
|
|
"www_page_news-list": "/www/page/news-list";
|
|
|
|
|
"www_page_product-list": "/www/page/product-list";
|
|
|
|
|
"www_page_support": "/www/page/support";
|
|
|
|
|
"www_page-seo": "/www/page-seo";
|
|
|
|
|
"www_product": "/www/product";
|
2026-08-13 16:48:05 +08:00
|
|
|
"www_product_detail": "/www/product/detail";
|
2026-07-30 18:27:42 +08:00
|
|
|
"www_product_list": "/www/product/list";
|
|
|
|
|
"www_product_series": "/www/product/series";
|
2026-07-30 11:23:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* route key
|
|
|
|
|
*/
|
|
|
|
|
export type RouteKey = keyof RouteMap;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* route path
|
|
|
|
|
*/
|
|
|
|
|
export type RoutePath = RouteMap[RouteKey];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* custom route key
|
|
|
|
|
*/
|
|
|
|
|
export type CustomRouteKey = Extract<
|
|
|
|
|
RouteKey,
|
|
|
|
|
| "root"
|
|
|
|
|
| "not-found"
|
|
|
|
|
>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the generated route key
|
|
|
|
|
*/
|
|
|
|
|
export type GeneratedRouteKey = Exclude<RouteKey, CustomRouteKey>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the first level route key, which contain the layout of the route
|
|
|
|
|
*/
|
|
|
|
|
export type FirstLevelRouteKey = Extract<
|
|
|
|
|
RouteKey,
|
|
|
|
|
| "403"
|
|
|
|
|
| "404"
|
|
|
|
|
| "500"
|
2026-08-25 14:18:47 +08:00
|
|
|
| "customer-service"
|
2026-07-30 11:23:50 +08:00
|
|
|
| "headphone"
|
|
|
|
|
| "home"
|
|
|
|
|
| "iframe-page"
|
|
|
|
|
| "login"
|
2026-08-14 11:26:20 +08:00
|
|
|
| "meilisearch"
|
2026-07-30 11:23:50 +08:00
|
|
|
| "share-code"
|
|
|
|
|
| "system"
|
|
|
|
|
| "toolbox"
|
|
|
|
|
| "upgrade"
|
2026-07-30 18:27:42 +08:00
|
|
|
| "www"
|
2026-07-30 11:23:50 +08:00
|
|
|
>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom first level route key
|
|
|
|
|
*/
|
|
|
|
|
export type CustomFirstLevelRouteKey = Extract<
|
|
|
|
|
CustomRouteKey,
|
|
|
|
|
| "root"
|
|
|
|
|
| "not-found"
|
|
|
|
|
>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the last level route key, which has the page file
|
|
|
|
|
*/
|
|
|
|
|
export type LastLevelRouteKey = Extract<
|
|
|
|
|
RouteKey,
|
|
|
|
|
| "403"
|
|
|
|
|
| "404"
|
|
|
|
|
| "500"
|
|
|
|
|
| "iframe-page"
|
|
|
|
|
| "login"
|
2026-08-25 14:18:47 +08:00
|
|
|
| "customer-service_feedbacks"
|
2026-07-30 11:23:50 +08:00
|
|
|
| "headphone_brand"
|
2026-08-17 15:41:32 +08:00
|
|
|
| "headphone_impedance"
|
2026-07-30 11:23:50 +08:00
|
|
|
| "headphone_model"
|
|
|
|
|
| "home"
|
2026-08-14 11:26:20 +08:00
|
|
|
| "meilisearch"
|
2026-07-30 11:23:50 +08:00
|
|
|
| "share-code_log"
|
|
|
|
|
| "system_users"
|
|
|
|
|
| "toolbox_luxsin-controller"
|
|
|
|
|
| "upgrade_blacklist"
|
|
|
|
|
| "upgrade_ota-target-device"
|
|
|
|
|
| "upgrade_ota"
|
2026-07-30 18:27:42 +08:00
|
|
|
| "www_contact_settings"
|
|
|
|
|
| "www_contact_submissions"
|
|
|
|
|
| "www_global_basic"
|
|
|
|
|
| "www_global_footer"
|
|
|
|
|
| "www_global_seo"
|
|
|
|
|
| "www_global_social"
|
|
|
|
|
| "www_i18n"
|
|
|
|
|
| "www_media"
|
|
|
|
|
| "www_nav_appearance"
|
|
|
|
|
| "www_nav_items"
|
|
|
|
|
| "www_news_articles"
|
|
|
|
|
| "www_page-seo"
|
|
|
|
|
| "www_page_about"
|
|
|
|
|
| "www_page_home"
|
|
|
|
|
| "www_page_news-list"
|
|
|
|
|
| "www_page_product-list"
|
|
|
|
|
| "www_page_support"
|
2026-08-13 16:48:05 +08:00
|
|
|
| "www_product_detail"
|
2026-07-30 18:27:42 +08:00
|
|
|
| "www_product_list"
|
|
|
|
|
| "www_product_series"
|
2026-07-30 11:23:50 +08:00
|
|
|
>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom last level route key
|
|
|
|
|
*/
|
|
|
|
|
export type CustomLastLevelRouteKey = Extract<
|
|
|
|
|
CustomRouteKey,
|
|
|
|
|
| "root"
|
|
|
|
|
| "not-found"
|
|
|
|
|
>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the single level route key
|
|
|
|
|
*/
|
|
|
|
|
export type SingleLevelRouteKey = FirstLevelRouteKey & LastLevelRouteKey;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom single level route key
|
|
|
|
|
*/
|
|
|
|
|
export type CustomSingleLevelRouteKey = CustomFirstLevelRouteKey & CustomLastLevelRouteKey;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the first level route key, but not the single level
|
|
|
|
|
*/
|
|
|
|
|
export type FirstLevelRouteNotSingleKey = Exclude<FirstLevelRouteKey, SingleLevelRouteKey>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom first level route key, but not the single level
|
|
|
|
|
*/
|
|
|
|
|
export type CustomFirstLevelRouteNotSingleKey = Exclude<CustomFirstLevelRouteKey, CustomSingleLevelRouteKey>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the center level route key
|
|
|
|
|
*/
|
|
|
|
|
export type CenterLevelRouteKey = Exclude<GeneratedRouteKey, FirstLevelRouteKey | LastLevelRouteKey>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom center level route key
|
|
|
|
|
*/
|
|
|
|
|
export type CustomCenterLevelRouteKey = Exclude<CustomRouteKey, CustomFirstLevelRouteKey | CustomLastLevelRouteKey>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the center level route key
|
|
|
|
|
*/
|
|
|
|
|
type GetChildRouteKey<K extends RouteKey, T extends RouteKey = RouteKey> = T extends `${K}_${infer R}`
|
|
|
|
|
? R extends `${string}_${string}`
|
|
|
|
|
? never
|
|
|
|
|
: T
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the single level route
|
|
|
|
|
*/
|
|
|
|
|
type SingleLevelRoute<K extends SingleLevelRouteKey = SingleLevelRouteKey> = K extends string
|
|
|
|
|
? Omit<ElegantConstRoute, 'children'> & {
|
|
|
|
|
name: K;
|
|
|
|
|
path: RouteMap[K];
|
|
|
|
|
component: `layout.${RouteLayout}$view.${K}`;
|
|
|
|
|
}
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the last level route
|
|
|
|
|
*/
|
|
|
|
|
type LastLevelRoute<K extends GeneratedRouteKey> = K extends LastLevelRouteKey
|
|
|
|
|
? Omit<ElegantConstRoute, 'children'> & {
|
|
|
|
|
name: K;
|
|
|
|
|
path: RouteMap[K];
|
|
|
|
|
component: `view.${K}`;
|
|
|
|
|
}
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the center level route
|
|
|
|
|
*/
|
|
|
|
|
type CenterLevelRoute<K extends GeneratedRouteKey> = K extends CenterLevelRouteKey
|
|
|
|
|
? Omit<ElegantConstRoute, 'component'> & {
|
|
|
|
|
name: K;
|
|
|
|
|
path: RouteMap[K];
|
|
|
|
|
children: (CenterLevelRoute<GetChildRouteKey<K>> | LastLevelRoute<GetChildRouteKey<K>>)[];
|
|
|
|
|
}
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the multi level route
|
|
|
|
|
*/
|
|
|
|
|
type MultiLevelRoute<K extends FirstLevelRouteNotSingleKey = FirstLevelRouteNotSingleKey> = K extends string
|
|
|
|
|
? ElegantConstRoute & {
|
|
|
|
|
name: K;
|
|
|
|
|
path: RouteMap[K];
|
|
|
|
|
component: `layout.${RouteLayout}`;
|
|
|
|
|
children: (CenterLevelRoute<GetChildRouteKey<K>> | LastLevelRoute<GetChildRouteKey<K>>)[];
|
|
|
|
|
}
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom first level route
|
|
|
|
|
*/
|
|
|
|
|
type CustomSingleLevelRoute<K extends CustomFirstLevelRouteKey = CustomFirstLevelRouteKey> = K extends string
|
|
|
|
|
? Omit<ElegantConstRoute, 'children'> & {
|
|
|
|
|
name: K;
|
|
|
|
|
path: RouteMap[K];
|
|
|
|
|
component?: `layout.${RouteLayout}$view.${LastLevelRouteKey}`;
|
|
|
|
|
}
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom last level route
|
|
|
|
|
*/
|
|
|
|
|
type CustomLastLevelRoute<K extends CustomRouteKey> = K extends CustomLastLevelRouteKey
|
|
|
|
|
? Omit<ElegantConstRoute, 'children'> & {
|
|
|
|
|
name: K;
|
|
|
|
|
path: RouteMap[K];
|
|
|
|
|
component?: `view.${LastLevelRouteKey}`;
|
|
|
|
|
}
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom center level route
|
|
|
|
|
*/
|
|
|
|
|
type CustomCenterLevelRoute<K extends CustomRouteKey> = K extends CustomCenterLevelRouteKey
|
|
|
|
|
? Omit<ElegantConstRoute, 'component'> & {
|
|
|
|
|
name: K;
|
|
|
|
|
path: RouteMap[K];
|
|
|
|
|
children: (CustomCenterLevelRoute<GetChildRouteKey<K>> | CustomLastLevelRoute<GetChildRouteKey<K>>)[];
|
|
|
|
|
}
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom multi level route
|
|
|
|
|
*/
|
|
|
|
|
type CustomMultiLevelRoute<K extends CustomFirstLevelRouteNotSingleKey = CustomFirstLevelRouteNotSingleKey> =
|
|
|
|
|
K extends string
|
|
|
|
|
? ElegantConstRoute & {
|
|
|
|
|
name: K;
|
|
|
|
|
path: RouteMap[K];
|
|
|
|
|
component: `layout.${RouteLayout}`;
|
|
|
|
|
children: (CustomCenterLevelRoute<GetChildRouteKey<K>> | CustomLastLevelRoute<GetChildRouteKey<K>>)[];
|
|
|
|
|
}
|
|
|
|
|
: never;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the custom route
|
|
|
|
|
*/
|
|
|
|
|
type CustomRoute = CustomSingleLevelRoute | CustomMultiLevelRoute;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the generated route
|
|
|
|
|
*/
|
|
|
|
|
type GeneratedRoute = SingleLevelRoute | MultiLevelRoute;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* the elegant route
|
|
|
|
|
*/
|
|
|
|
|
type ElegantRoute = GeneratedRoute | CustomRoute;
|
|
|
|
|
}
|