<el-tab-pane label="基本配置">
<div v-for="(item,index) in tableData" :key="index" class="syslist">
<div v-if="item.name==='首页左侧图片'||item.name==='首页右侧图片'||item.name==='平台LOGO'||item.name==='微信二维码'||item.name==='微博二维码'||item.name==='平台小横幅'||item.name==='平台长横幅'">
<div class="label">{{item.name}}<span>({{item.remark}})</span></div>
<upload v-model="item.value" :file="item.file" @setUrl="item.value = $event[0]"/>
</div>
<div v-else-if="item.name==='LOGO区图片大小'">
<div class="label">{{item.name}}<span>(建议选择logo图与内容区等宽)</span></div>
<el-select v-model="item.value" style="width: 220px;">
<el-option label="logo图覆盖大小:800*218" value="0" />
<el-option label="logo图覆盖整个logo区" value="1" />
<el-option label="logo图与内容区等宽" value="2" />
</el-select>
</div>
<div v-else>
<div class="label">{{item.name}}</div>
<el-input v-model="item.value" placeholder="请输入内容"/>
</div>
</div>
data:{
return:{
tableData:[
{
group: 1
id: 16
key: "web_site_home_right_pic"
name: "首页右侧图片"
priority: 13
remark: "首页右侧图片"
status: 1
value: "http://192.168.1.33:9000/spepc-partybuilding/2021/12/4a9a64340bf64e3db95f8d95f030f9eb.jpg"
},
{
group: 1
id: 18
key: "web_site_home_right_url"
name: "首页右侧图片链接设置"
priority: 13
remark: "首页右侧图片链接设置"
status: 1
value: "https://www.baidu.com"
}
]
}
}
<script>
tableData = tableData.map(vo=>{
let val = vo.value
if(val){
vo.file=[{sys:1,"url": val}]
}else{
vo.file=[]
}
return vo
})
</script>
elementui <upload> 动态写入图片(后台数据格式不是file)
最新推荐文章于 2023-05-25 13:13:44 发布