|
@@ -6,13 +6,13 @@
|
|
|
<el-input v-model="monthly_form.name" placeholder="请输入" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="缩略图">
|
|
|
- <el-upload action="http://star.xiaojukeji.com/upload/img.node" list-type="picture-card" :limit="1" :multiple="false" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
|
|
|
+ <el-upload action="http://star.xiaojukeji.com/upload/img.node" list-type="picture-card" :limit="1" :multiple="false" :on-success="handlePictureCardPreview" :on-remove="handleRemove">
|
|
|
<i class="el-icon-plus" />
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过5MB</div>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="素材">
|
|
|
- <el-upload action="http://star.xiaojukeji.com/upload/img.node" list-type="picture-card" :limit="1" :multiple="false" :on-preview="handlePictureCardPreviewTow" :on-remove="handleRemoveTow">
|
|
|
+ <el-upload action="http://star.xiaojukeji.com/upload/img.node" list-type="picture-card" :limit="1" :multiple="false" :on-success="handlePictureCardPreviewTow" :on-remove="handleRemoveTow">
|
|
|
<i class="el-icon-plus" />
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过5MB</div>
|
|
|
</el-upload>
|
|
@@ -22,9 +22,6 @@
|
|
|
<el-button @click="monthly_show = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="monthly_dialog">创 建</el-button>
|
|
|
</span>
|
|
|
- <el-dialog :visible.sync="dialogVisible">
|
|
|
- <img width="100%" :src="monthly_form.content" alt="">
|
|
|
- </el-dialog>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
@@ -37,8 +34,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
monthly_show: this.show,
|
|
|
- monthly_form: {},
|
|
|
- dialogVisible: false
|
|
|
+ monthly_form: {}
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -62,7 +58,6 @@ export default {
|
|
|
handlePictureCardPreviewTow(file) {
|
|
|
console.log(file, file.url)
|
|
|
this.monthly_form.thumb = 'http:' + file.url
|
|
|
- this.dialogVisible = true
|
|
|
},
|
|
|
handleRemove(file, fileList) {
|
|
|
console.log(file, fileList)
|
|
@@ -70,7 +65,6 @@ export default {
|
|
|
handlePictureCardPreview(file) {
|
|
|
console.log(file, file.url)
|
|
|
this.monthly_form.content = 'http:' + file.url
|
|
|
- this.dialogVisible = true
|
|
|
}
|
|
|
}
|
|
|
}
|