|
@@ -32,7 +32,15 @@
|
|
|
<upload :limit="1" :data="form.picture" type="picture" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="视频" prop="filepath">
|
|
|
- <upload :limit="1" :data="form.filepath" type="filepath" listType="" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
|
|
|
+ <uploaddock
|
|
|
+ :limit="1"
|
|
|
+ :data="form.filepath"
|
|
|
+ type="filepath"
|
|
|
+ listType=""
|
|
|
+ :url="'/files/imgpath/upload'"
|
|
|
+ @upload="uploadSuccess"
|
|
|
+ @delete="uploadDelete"
|
|
|
+ ></uploaddock>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="信息内容">
|
|
|
<wang-editor v-model="form.content" placeholder="请输入信息内容"></wang-editor>
|
|
@@ -64,6 +72,7 @@
|
|
|
<script>
|
|
|
import WangEditor from '@/components/wang-editor.vue';
|
|
|
import upload from '@/components/upload.vue';
|
|
|
+import uploaddock from '@/components/uploaddock.vue';
|
|
|
import dataTable from '@/components/data-table.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
@@ -75,6 +84,7 @@ export default {
|
|
|
dataTable,
|
|
|
WangEditor,
|
|
|
upload,
|
|
|
+ uploaddock,
|
|
|
},
|
|
|
data: function() {
|
|
|
return {
|
|
@@ -169,6 +179,9 @@ export default {
|
|
|
uploadSuccess({ type, data }) {
|
|
|
this.$set(this.form, `${type}`, data.uri);
|
|
|
},
|
|
|
+ uploadDelete(index) {
|
|
|
+ this.$set(this.form, `filepath`, '');
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|