update
This commit is contained in:
parent
01f5fdd18d
commit
b827f0abf1
@ -1,32 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.cateId ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.cateId ? '新增' : '修改'"
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
:close-on-click-modal="false"
|
|
||||||
:visible.sync="visible"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
:model="dataForm"
|
|
||||||
:rules="dataRule"
|
|
||||||
ref="dataForm"
|
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
|
||||||
label-width="80px"
|
|
||||||
>
|
|
||||||
<el-form-item label="分类名称" prop="cateName">
|
<el-form-item label="分类名称" prop="cateName">
|
||||||
<el-input v-model="dataForm.cateName" placeholder="分类名称"></el-input>
|
<el-input v-model="dataForm.cateName" placeholder="分类名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="分类图片" prop="coverImage">
|
<el-form-item label="分类图片" prop="coverImage">
|
||||||
<el-upload
|
<el-upload class="avatar-uploader" :action="url" :show-file-list="false" :on-success="handleIconSuccess">
|
||||||
class="avatar-uploader"
|
<img v-if="dataForm.coverImage" :src="dataForm.coverImage" class="avatar" />
|
||||||
:action="url"
|
|
||||||
:show-file-list="false"
|
|
||||||
:on-success="handleIconSuccess"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
v-if="dataForm.coverImage"
|
|
||||||
:src="dataForm.coverImage"
|
|
||||||
class="avatar"
|
|
||||||
/>
|
|
||||||
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<p class="formInfo">建议尺寸:100*100像素,jpg、png图片类型</p>
|
<p class="formInfo">建议尺寸:100*100像素,jpg、png图片类型</p>
|
||||||
@ -133,6 +114,7 @@ export default {
|
|||||||
line-height: 0px;
|
line-height: 0px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-uploader .el-upload {
|
.avatar-uploader .el-upload {
|
||||||
border: 1px dashed #d9d9d9;
|
border: 1px dashed #d9d9d9;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@ -140,9 +122,11 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-uploader .el-upload:hover {
|
.avatar-uploader .el-upload:hover {
|
||||||
border-color: #409eff;
|
border-color: #409eff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-uploader-icon {
|
.avatar-uploader-icon {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color: #8c939d;
|
color: #8c939d;
|
||||||
@ -151,6 +135,7 @@ export default {
|
|||||||
line-height: 100px;
|
line-height: 100px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
Loading…
Reference in New Issue
Block a user