if (app.documents.length != 0) {
var doc= app.activeDocument;
for (i = 0; i < 5; i++) {
var layer = doc.artLayers[0]
layer.textItem.contents = i;
var pngFile = new File("/Users/dlokshin/temp/" + i + ".png");
pngSaveOptions = new PNGSaveOptions();
pngSaveOptions.interlaced = false;
doc.saveAs(pngFile, pngSaveOptions, true, Extension.LOWERCASE);
}
}
Run Code Online (Sandbox Code Playgroud)
每当我运行上面的脚本时,不是将文件保存为1.png,2.png,3.png等,而是打开保存对话框并提示我输入文件名并单击保存.我究竟做错了什么?
这是我正在使用的:
Run Code Online (Sandbox Code Playgroud)<Modal visible = {this.props.visible} animationType="slide" transparent onRequestClose={() => {}} > <TextInput style = {styles.inputBox} ref = {this.props.destinatinon} /> </Modal>
在容器中
<ExampleModal
destination = {this.state.destination} >
</ExampleModal>
Run Code Online (Sandbox Code Playgroud)
我不知道如何将数据从Modal传递给Parent Component.任何类型的教程或链接都可以.提前致谢.