|
@@ -3,7 +3,13 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main">
|
|
|
<el-col :span="24" class="one">
|
|
|
- <data-form :fields="fields" :data="form" @save="toSave" returns="/adminCenter/test/index"> </data-form>
|
|
|
+ <data-form :fields="fields" :data="form" @save="toSave" returns="/adminCenter/test/index">
|
|
|
+ <template #custom="{ item, form }">
|
|
|
+ <template v-if="item.model == 'img_url'">
|
|
|
+ <e-upload :limit="1" url="/files/cysci/test_imgurl/upload" type="img_url" v-model="form[item.model]"></e-upload>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </data-form>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -19,9 +25,12 @@ export default {
|
|
|
components: {},
|
|
|
data: function () {
|
|
|
return {
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ img_url: [],
|
|
|
+ },
|
|
|
fields: [
|
|
|
{ label: '标题', model: 'title' },
|
|
|
+ { label: '图片文件', model: 'img_url', custom: true },
|
|
|
{ label: '内容', model: 'content', type: 'editor', url: '/files/cysci/news_editor/upload' },
|
|
|
],
|
|
|
};
|