-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
33 lines (28 loc) · 915 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
<link rel="stylesheet" href="/static/css/cropper.min.css">
<link rel="stylesheet" href="/static/css/ImgCropping.css">
</head>
<body>
<button type="button" class="layui-btn" id="uploadAvatar">
<i class="layui-icon layui-icon-upload"></i>更换头像
</button>
<script src="https://www.layuicdn.com/layui/layui.js"></script>
<script type="text/javascript">
layui.config({
base: '/static/mod/'
}).use('avatar', function () {
var avatar = layui.avatar;
avatar.render({
success: function (base64, size) {
console.log(base64);
console.log(size);
}
});
});
</script>
</body>
</html>