|
|
@ -80,8 +80,8 @@ |
|
|
|
<el-form-item v-for="(item, i) in data.forms" :key="i" :prop="item.prop" :label="item.label"> |
|
|
|
<el-form-item v-for="(item, i) in data.forms" :key="i" :prop="item.prop" :label="item.label"> |
|
|
|
<el-input v-if="item.type === 'input'" v-model="data.form[item.prop]" placeholder="请输入" maxlength="100"></el-input> |
|
|
|
<el-input v-if="item.type === 'input'" v-model="data.form[item.prop]" placeholder="请输入" maxlength="100"></el-input> |
|
|
|
<el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="300"></el-input> |
|
|
|
<el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="300"></el-input> |
|
|
|
|
|
|
|
<div v-if="item.type === 'upload' || item.type === 'video' || item.type === 'media'" class="uploader-wrap"> |
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
|
v-if="item.type === 'upload'" |
|
|
|
|
|
|
|
class="uploader" |
|
|
|
class="uploader" |
|
|
|
accept=".jpg,.png,.jpeg" |
|
|
|
accept=".jpg,.png,.jpeg" |
|
|
|
:on-success="res => uploadSuccess(res, data.form)" |
|
|
|
:on-success="res => uploadSuccess(res, data.form)" |
|
|
@ -115,6 +115,8 @@ |
|
|
|
:action="api.upload"> |
|
|
|
:action="api.upload"> |
|
|
|
<el-button>上传资源</el-button> |
|
|
|
<el-button>上传资源</el-button> |
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
|
|
|
|
|
<i v-if="!item.required" class="el-icon-delete del" @click="data.form[item.prop] = ''"></i> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div v-if="item.type === 'link'" class="flex"> |
|
|
|
<div v-if="item.type === 'link'" class="flex"> |
|
|
|
<el-input class="m-r-10" v-model="data.form.link.linkName"></el-input> |
|
|
|
<el-input class="m-r-10" v-model="data.form.link.linkName"></el-input> |
|
|
|
<el-button @click="toLink(data.form)">设置链接</el-button> |
|
|
|
<el-button @click="toLink(data.form)">设置链接</el-button> |
|
|
|