mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-26 12:42:34 +08:00
feat: 支持文档模板
This commit is contained in:
@@ -99,9 +99,15 @@ const actions = {
|
||||
|
||||
const pluginConfig = {
|
||||
...config,
|
||||
sourceFile: path.join(fileUrl, `../${config.main}`),
|
||||
sourceFile: path.join(fileUrl, `../${config.main || 'index.html'}`),
|
||||
name: uuidv4(),
|
||||
type: 'dev'
|
||||
type: 'dev',
|
||||
subType: (() => {
|
||||
if (config.main) {
|
||||
return ''
|
||||
}
|
||||
return 'template';
|
||||
})()
|
||||
};
|
||||
commit('commonUpdate', {
|
||||
selected: {
|
||||
@@ -164,7 +170,7 @@ const actions = {
|
||||
...cmds.map((cmd) => ({
|
||||
name: cmd,
|
||||
value: 'plugin',
|
||||
icon: 'file://' + path.join(plugin.sourceFile, `../${plugin.logo}`),
|
||||
icon: 'image://' + path.join(plugin.sourceFile, `../${plugin.logo}`),
|
||||
desc: fe.explain,
|
||||
click: (router) => {
|
||||
actions.openPlugin({commit}, {cmd, plugin, feature: fe, router});
|
||||
@@ -201,7 +207,7 @@ const actions = {
|
||||
selected: {
|
||||
key: 'plugin-container',
|
||||
name: cmd,
|
||||
icon: 'file://' + path.join(plugin.sourceFile, `../${plugin.logo}`),
|
||||
icon: 'image://' + path.join(plugin.sourceFile, `../${plugin.logo}`),
|
||||
},
|
||||
searchValue: '',
|
||||
showMain: true,
|
||||
|
||||
Reference in New Issue
Block a user