95 lines
1.9 KiB
HTML
95 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>demo</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes">
|
|
<style media="screen">
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
padding: 100px 20%;
|
|
font-family: '微软雅黑';
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
#app {
|
|
position: relative;
|
|
text-align: center;
|
|
}
|
|
|
|
.wrap {
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.btn {
|
|
display: block;
|
|
margin: 30px auto 10px auto;
|
|
width: 120px;
|
|
height: 40px;
|
|
font-size: 14px;
|
|
line-height: 40px;
|
|
text-align: center;
|
|
background-color: rgba(0, 0, 0, 0.08);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.avatar {
|
|
display: block;
|
|
width: 200px;
|
|
margin: 10px auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="app">
|
|
<div class="item">
|
|
<a class="btn" @click="toggleShow1">设置头像</a>
|
|
<img class="avatar" v-if="avatarUrl1" :src="avatarUrl1" v-show="true" style="display: none;">
|
|
<my-upload url="https://httpbin.org/post" img-format="png"
|
|
:width="400"
|
|
:height="300"
|
|
field="avatar1"
|
|
key="0"
|
|
:no-rotate="false"
|
|
:value.sync="show1"
|
|
:params="otherParams"></my-upload>
|
|
</div>
|
|
|
|
<div class="item">
|
|
<a class="btn" @click="toggleShow2">Set Avatar</a>
|
|
<img class="avatar" v-if="avatarUrl2" :src="avatarUrl2" v-show="true" style="display: none;">
|
|
<my-upload url="https://httpbin.org/post"
|
|
field="avatar2"
|
|
key="0"
|
|
lang-type="en"
|
|
:value.sync="show2"
|
|
:params="otherParams"></my-upload>
|
|
</div>
|
|
|
|
<div class="item">
|
|
<a class="btn" @click="toggleShow3">аватара</a>
|
|
<img class="avatar" v-if="avatarUrl3" :src="avatarUrl3" v-show="true" style="display: none;">
|
|
<my-upload url="https://httpbin.org/post"
|
|
field="avatar3"
|
|
key="0"
|
|
lang-type="ru"
|
|
:value.sync="show3"
|
|
:params="otherParams"></my-upload>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="demo-src.js"></script>
|
|
</body>
|
|
|
|
</html>
|