feat(资源管理): 完善资源管理与校验,优化性能
build.yaml / build (push) Successful in 50s

This commit is contained in:
xiaoqidun committed 2026-10-13 14:24:37 +08:00
1 parent 0e423c9713
commit 7bdb03f7bd
12 files changed
+319 -68

No files matched your search

+6
View File
@@ -842,6 +842,12 @@ func changeResource(args []js.Value) (any, error) {
case "delete":
return currentEditor.DeleteResource(ctx, kind, id)
case "bind", "unbind":
if kind == "Attachment" {
return currentEditor.BindAttachment(ctx, id, args[5].Int(), args[6].String(), action == "bind")
}
if kind != "Audio" && kind != "Video" {
return fmt.Errorf("resource does not support actions")
}
return currentEditor.BindMedia(ctx, id, args[5].Int(), args[6].String(), action == "bind")
case "add", "replace":
data, err := bytesFromJS(args[4])