修改ui自动拼接规则

This commit is contained in:
李宇翔
2020-04-10 17:07:00 +08:00
parent 20db5d5f75
commit 10767a3b39
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"log"
"path/filepath"
"runtime"
"strings"
"github.com/Monibuca/engine/util"
)
@@ -35,7 +36,7 @@ func InstallPlugin(opt *PluginConfig) {
Plugins[opt.Name] = opt
_, pluginFilePath, _, _ := runtime.Caller(1)
opt.Dir = filepath.Dir(pluginFilePath)
ui := filepath.Join(opt.Dir, "ui", "dist")
ui := filepath.Join(opt.Dir, "ui", "dist", "plugin-"+strings.ToLower(opt.Name)+".min.js")
if util.Exist(ui) {
opt.UI = ui
}