27 lines
793 B
TypeScript
27 lines
793 B
TypeScript
import type { ModuleConfig } from '@/types/module'
|
|
import type { SearchIndexItem } from '@/stores/searchIndex'
|
|
import { TOOLS_META } from './tools'
|
|
|
|
/** 开发者工具模块:聚合大量轻量文本/编码/转换工具 */
|
|
|
|
const searchItems: SearchIndexItem[] = TOOLS_META.map((t) => ({
|
|
title: t.name,
|
|
description: t.description,
|
|
keywords: [t.name, ...t.keywords]
|
|
}))
|
|
|
|
export const moduleConfig: ModuleConfig = {
|
|
id: 'devtools',
|
|
name: '开发者工具',
|
|
icon: 'devtools',
|
|
description: 'JSON / Base64 / 时间戳 / 正则 / 颜色 / Cron / 密码等 20 个常用开发工具',
|
|
category: 'tool',
|
|
defaultEnabled: true,
|
|
loader: () => import('./DevToolsModule.vue'),
|
|
searchItems,
|
|
lifecycle: {
|
|
onEnable: async () => {},
|
|
onDisable: async () => {}
|
|
},
|
|
order: 60
|
|
} |