refactor(component2plugin): 改进组件加载逻辑避免重复加载 style(components.d.ts): 清理未使用的组件类型声明 chore(package.json): 添加build:normal脚本
25 lines
616 B
TypeScript
25 lines
616 B
TypeScript
// @ts-nocheck
|
|
import { registerComponentOption } from '@/class/PluginCenter'
|
|
import { PluginExportType } from '@/types/type'
|
|
|
|
const pluginConfig: registerComponentOption = {
|
|
key: 'miaoCrypto',
|
|
name: '文件加密',
|
|
getComponent: async () => (await import('./miaoCrypto.vue')).default,
|
|
filter: (vDirs, vFiles) => {
|
|
return true
|
|
if (vDirs.length !== 0) {
|
|
return false
|
|
}
|
|
if (vFiles.length !== 1) {
|
|
return false
|
|
}
|
|
return vFiles[0].name.endsWith('txt')
|
|
},
|
|
disable: true
|
|
}
|
|
|
|
export default pluginConfig
|
|
|
|
export const type = PluginExportType.component
|