feat(plugins): 添加ONNX模型演示插件并优化组件加载逻辑
refactor(component2plugin): 改进组件加载逻辑避免重复加载 style(components.d.ts): 清理未使用的组件类型声明 chore(package.json): 添加build:normal脚本
This commit is contained in:
1 parent
b8bea8e3bd
commit
97276224ee
8 files changed
+378
-14
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { Plugin, PluginGroup } from '@/class/PluginCenter'
|
||||
import { LogoGithub } from '@vicons/ionicons5'
|
||||
import { PluginExportType } from '@/types/type'
|
||||
import { shallowRef } from 'vue'
|
||||
import registerExternalPlugin from './registerExternalPlugin'
|
||||
|
||||
const pluginConfig: Plugin = {
|
||||
name: '导入插件',
|
||||
icon: shallowRef(LogoGithub),
|
||||
filter: (vDirs, vFiles) => {
|
||||
if (vDirs.length !== 0) {
|
||||
return false
|
||||
}
|
||||
if (vFiles.length !== 1) {
|
||||
return false
|
||||
}
|
||||
return vFiles[0].name.endsWith('js')
|
||||
},
|
||||
disable: false,
|
||||
group: [PluginGroup.default],
|
||||
func: registerExternalPlugin,
|
||||
priority: -1
|
||||
}
|
||||
|
||||
export default pluginConfig
|
||||
|
||||
export const type = PluginExportType.default
|
||||
|
||||
export const key = 'registerExternalPlugin'
|
||||
Reference in new issue
Block a user