Commit 2798952e by zhangquan

特色产品编辑添加radio

1 parent 43866653
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="upload-ctnr"> <div class="upload-ctnr">
<label v-if="name" class="label" for="">{{name}}</label> <label v-if="name" class="label" for="">{{name}}</label>
<div class="img-item" :style="defaultStyle"> <div class="img-item" :style="defaultStyle">
<div v-if="!formObj[attr]" class="add-img" @click.stop="addFile"> <div v-if="!formObj[attr]" :class="['add-img',{'disabled': disabled}]" @click.stop="addFile">
<input type="file" class="file" id="file" ref="fileRef" @change="handleFileChange" :accept="accept" /> <input type="file" class="file" id="file" ref="fileRef" @change="handleFileChange" :accept="accept" />
<i class="el-icon-plus add"></i> <i class="el-icon-plus add"></i>
<p>{{ btnName }}</p> <p>{{ btnName }}</p>
...@@ -42,6 +42,10 @@ export default { ...@@ -42,6 +42,10 @@ export default {
bigView bigView
}, },
props: { props: {
disabled: {
type: Boolean,
default: false
},
fileType: { fileType: {
type: String, type: String,
default: 'image' default: 'image'
...@@ -117,6 +121,7 @@ export default { ...@@ -117,6 +121,7 @@ export default {
this.dialogVisibleImg = true this.dialogVisibleImg = true
}, },
addFile(){ addFile(){
if(this.disabled) return;
if(this.empty){ if(this.empty){
this.$emit('clickEvent') this.$emit('clickEvent')
return; return;
...@@ -310,8 +315,11 @@ export default { ...@@ -310,8 +315,11 @@ export default {
line-height: 22px; line-height: 22px;
} }
} }
.disabled{
cursor: not-allowed;
}
.operate{ .operate{
display: block; display: none;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<GLCombiForm class="search-wrap" ref="searchRef" labelWidth="154px" defaultWidth="432px" @handleOk="handleSearch" @handleRest="handleReset" :formObj="searchFormObj" :formData="searchFormData"> <GLCombiForm class="search-wrap" ref="searchRef" labelWidth="154px" defaultWidth="432px" @handleOk="handleSearch" @handleRest="handleReset" :formObj="searchFormObj" :formData="searchFormData">
</GLCombiForm> </GLCombiForm>
<div class="operate-wrap"> <div class="operate-wrap">
<span class="table-title">商品列表</span> <span class="table-title">内容列表</span>
<div class="operate-btn"> <div class="operate-btn">
<el-button :size="size" type="primary">新增<i class="el-icon-arrow-down arrow-icon"></i></el-button> <el-button :size="size" type="primary">新增<i class="el-icon-arrow-down arrow-icon"></i></el-button>
<div class="dropdown-wrap"> <div class="dropdown-wrap">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!