feat:Image add imageFilePath
This commit is contained in:
@@ -51,6 +51,8 @@ import com.github.pengfeizhou.jscore.JSONBuilder;
|
||||
import com.github.pengfeizhou.jscore.JSObject;
|
||||
import com.github.pengfeizhou.jscore.JSValue;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import jp.wasabeef.glide.transformations.BlurTransformation;
|
||||
import pub.doric.DoricContext;
|
||||
import pub.doric.extension.bridge.DoricPlugin;
|
||||
@@ -422,6 +424,14 @@ public class ImageNode extends ViewNode<ImageView> {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "imageFilePath":
|
||||
if (!prop.isString()) {
|
||||
return;
|
||||
}
|
||||
String filePath = prop.asString().value();
|
||||
File file = new File(filePath);
|
||||
loadIntoTarget(Glide.with(getContext()).load(file));
|
||||
break;
|
||||
default:
|
||||
super.blend(view, name, prop);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user