From 4b2ed36943b401716eecd7460c7a3ef6f797bde9 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 1 Sep 2025 20:38:18 +0800 Subject: [PATCH] bugfix --- bricks/input.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/bricks/input.js b/bricks/input.js index fb6f0b9..3b0f87d 100644 --- a/bricks/input.js +++ b/bricks/input.js @@ -548,7 +548,7 @@ bricks.UiImage =class extends bricks.VBox { this.value = e.target.result; console.log('this.value=', this.value); this.imgw = new bricks.Image({ - url:e.target.result, + url:this.value, width:'100%' }); this.add_widget(this.imgw); @@ -560,20 +560,14 @@ bricks.UiImage =class extends bricks.VBox { fd.append(this.name, this.resultValue()); } resultValue(){ - if (this.imgw){ - this.value = this.imgw.base64(); + if (this.value){ return this.value; } return null; } getValue(){ - var ret = {} - if (this.imgw){ - // ret[this.name] = this.imgw.base64() - ret[this.name] = this.value; - } else { - ret[this.name] = null; - } + var ret = {}; + ret[this.name] = this.resultValue(); return ret; } }