12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <template>
- <div class="uploadClass">
- <el-upload
- action="#"
- list-type="picture-card"
- :limit="1"
- :on-remove="handleRemove"
- :on-change="handleChange"
- :auto-upload="false"
- >
- <i class="el-icon-plus"></i>
- </el-upload>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- dialogImageUrl: "",
- dialogVisible: false,
- };
- },
- methods: {
- handleRemove(file, fileList) {
- console.log(file, fileList);
- },
- handleChange(file, fileList) {
- console.log(fileList[0].raw);
- },
- },
- };
- </script>
- <style>
- .uploadClass .el-upload--picture-card {
- width: 100px;
- height: 100px;
- line-height: 106px;
- }
- .el-upload-list--picture-card .el-upload-list__item {
- width: 100px;
- height: 100px;
- }
- </style>
|