perf(双端优化): 优化双端加载与资源复用
build.yaml / build (push) Successful in 47s

This commit is contained in:
xiaoqidun committed 2026-10-19 20:34:17 +08:00
1 parent 010ab9f314
commit 66aa87304b
10 files changed
+365 -79

No files matched your search

+4 -1
View File
@@ -221,8 +221,11 @@ func platformParseJSON(data []byte) map[string]any {
return result
}
// inputFromValue 读取浏览器二进制源
// inputFromValue 读取浏览器随机输入或二进制数据
func (e *businessEngine) inputFromValue(value platformValue) (*ofdgo.Input, error) {
if value.Type() == platformTypeObject && !value.IsNull() && value.Get("read").Type() == platformTypeFunction {
return ofdgo.NewInput(&browserReaderAt{read: value.Get("read"), size: int64(value.Get("size").Float())}, int64(value.Get("size").Float()))
}
data, err := e.bytesFromJS(value)
if err != nil {
return nil, err