Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么实现控件读取服务器中的图片? #20

Open
sTrevor opened this issue Apr 17, 2018 · 2 comments
Open

怎么实现控件读取服务器中的图片? #20

sTrevor opened this issue Apr 17, 2018 · 2 comments

Comments

@sTrevor
Copy link

sTrevor commented Apr 17, 2018

新增时,我通过该控件上传并保存图片到服务器。编辑时,能否实现控件加载之前上传的图片?能否提供一下思路,谢谢。

@devin87
Copy link
Owner

devin87 commented Apr 17, 2018

在view元素下按照图片预览的结构显示图片即可。

<div id="upload-image-view">
    <div class="u-item">
        <div class="u-img">
            <img src="你服务器图片的地址" />
        </div>
    </div>
</div>
var uploader = new Uploader({
    view: document.getElementById("upload-image-view"),
};

@sTrevor
Copy link
Author

sTrevor commented Apr 19, 2018

虽然我已经通过复杂的方式实现了该功能,但是还是感谢您的答复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants