Showing
4 changed files
with
21 additions
and
23 deletions
1 | import UserInfo from './user-info'; | 1 | import UserInfo from './user-info'; |
2 | import Editor from './editor'; | 2 | import Editor from './editor'; |
3 | import FileUpload from './file-upload'; | 3 | import FileUpload from './file-upload'; |
4 | +import DragFileUpload from './drag-file-upload.vue'; | ||
4 | 5 | ||
5 | export default { | 6 | export default { |
6 | UserInfo, | 7 | UserInfo, |
7 | Editor, | 8 | Editor, |
8 | - FileUpload | 9 | + FileUpload, |
10 | + DragFileUpload | ||
9 | }; | 11 | }; |
@@ -41,11 +41,11 @@ | @@ -41,11 +41,11 @@ | ||
41 | 41 | ||
42 | <div class="upload-item"> | 42 | <div class="upload-item"> |
43 | <div class="upload-item-img"> | 43 | <div class="upload-item-img"> |
44 | - <product-upload | 44 | + <drag-file-upload |
45 | :id="{goodIndex, imageIndex: 1}" | 45 | :id="{goodIndex, imageIndex: 1}" |
46 | @on-success="uploadSuccess" | 46 | @on-success="uploadSuccess" |
47 | @on-remove="uploadRemove"> | 47 | @on-remove="uploadRemove"> |
48 | - </product-upload> | 48 | + </drag-file-upload> |
49 | </div> | 49 | </div> |
50 | 50 | ||
51 | <div class="upload-item-title"> | 51 | <div class="upload-item-title"> |
@@ -58,11 +58,11 @@ | @@ -58,11 +58,11 @@ | ||
58 | <Col span="4"> | 58 | <Col span="4"> |
59 | <div class="upload-item"> | 59 | <div class="upload-item"> |
60 | <div class="upload-item-img"> | 60 | <div class="upload-item-img"> |
61 | - <product-upload | 61 | + <drag-file-upload |
62 | :id="{goodIndex, imageIndex: 2}" | 62 | :id="{goodIndex, imageIndex: 2}" |
63 | @on-success="uploadSuccess" | 63 | @on-success="uploadSuccess" |
64 | @on-remove="uploadRemove"> | 64 | @on-remove="uploadRemove"> |
65 | - </product-upload> | 65 | + </drag-file-upload> |
66 | </div> | 66 | </div> |
67 | 67 | ||
68 | <div class="upload-item-title"> | 68 | <div class="upload-item-title"> |
@@ -75,11 +75,11 @@ | @@ -75,11 +75,11 @@ | ||
75 | 75 | ||
76 | <div class="upload-item"> | 76 | <div class="upload-item"> |
77 | <div class="upload-item-img"> | 77 | <div class="upload-item-img"> |
78 | - <product-upload | 78 | + <drag-file-upload |
79 | :id="{goodIndex, imageIndex: 3}" | 79 | :id="{goodIndex, imageIndex: 3}" |
80 | @on-success="uploadSuccess" | 80 | @on-success="uploadSuccess" |
81 | @on-remove="uploadRemove"> | 81 | @on-remove="uploadRemove"> |
82 | - </product-upload> | 82 | + </drag-file-upload> |
83 | </div> | 83 | </div> |
84 | 84 | ||
85 | <div class="upload-item-title"> | 85 | <div class="upload-item-title"> |
@@ -92,11 +92,11 @@ | @@ -92,11 +92,11 @@ | ||
92 | <Col span="4"> | 92 | <Col span="4"> |
93 | <div class="upload-item"> | 93 | <div class="upload-item"> |
94 | <div class="upload-item-img"> | 94 | <div class="upload-item-img"> |
95 | - <product-upload | 95 | + <drag-file-upload |
96 | :id="{goodIndex, imageIndex: 4}" | 96 | :id="{goodIndex, imageIndex: 4}" |
97 | @on-success="uploadSuccess" | 97 | @on-success="uploadSuccess" |
98 | @on-remove="uploadRemove"> | 98 | @on-remove="uploadRemove"> |
99 | - </product-upload> | 99 | + </drag-file-upload> |
100 | </div> | 100 | </div> |
101 | 101 | ||
102 | <div class="upload-item-title"> | 102 | <div class="upload-item-title"> |
@@ -212,7 +212,7 @@ | @@ -212,7 +212,7 @@ | ||
212 | 212 | ||
213 | <script> | 213 | <script> |
214 | 214 | ||
215 | -import ProductUpload from './create-upload'; | 215 | +import ProductUpload from '../../../../components/global/common/drag-file-upload'; |
216 | import api from '../api'; | 216 | import api from '../api'; |
217 | import service from '../service'; | 217 | import service from '../service'; |
218 | 218 | ||
@@ -343,9 +343,6 @@ export default { | @@ -343,9 +343,6 @@ export default { | ||
343 | 343 | ||
344 | this.product.goods[colorIndex].goodsImage[imageIndex].imageUrl = ''; | 344 | this.product.goods[colorIndex].goodsImage[imageIndex].imageUrl = ''; |
345 | } | 345 | } |
346 | - }, | ||
347 | - components: { | ||
348 | - 'product-upload': ProductUpload | ||
349 | } | 346 | } |
350 | }; | 347 | }; |
351 | </script> | 348 | </script> |
@@ -205,11 +205,11 @@ | @@ -205,11 +205,11 @@ | ||
205 | 205 | ||
206 | <div class="upload-item"> | 206 | <div class="upload-item"> |
207 | <div class="upload-item-img"> | 207 | <div class="upload-item-img"> |
208 | - <product-upload | 208 | + <drag-file-upload |
209 | :id="{goodIndex, imageIndex: 1}" | 209 | :id="{goodIndex, imageIndex: 1}" |
210 | @on-success="uploadImageSuccess" | 210 | @on-success="uploadImageSuccess" |
211 | @on-remove="uploadImageRemove"> | 211 | @on-remove="uploadImageRemove"> |
212 | - </product-upload> | 212 | + </drag-file-upload> |
213 | </div> | 213 | </div> |
214 | 214 | ||
215 | <div class="upload-item-title"> | 215 | <div class="upload-item-title"> |
@@ -222,11 +222,11 @@ | @@ -222,11 +222,11 @@ | ||
222 | <Col span="4"> | 222 | <Col span="4"> |
223 | <div class="upload-item"> | 223 | <div class="upload-item"> |
224 | <div class="upload-item-img"> | 224 | <div class="upload-item-img"> |
225 | - <product-upload | 225 | + <drag-file-upload |
226 | :id="{goodIndex, imageIndex: 2}" | 226 | :id="{goodIndex, imageIndex: 2}" |
227 | @on-success="uploadImageSuccess" | 227 | @on-success="uploadImageSuccess" |
228 | @on-remove="uploadImageRemove"> | 228 | @on-remove="uploadImageRemove"> |
229 | - </product-upload> | 229 | + </drag-file-upload> |
230 | </div> | 230 | </div> |
231 | 231 | ||
232 | <div class="upload-item-title"> | 232 | <div class="upload-item-title"> |
@@ -239,11 +239,11 @@ | @@ -239,11 +239,11 @@ | ||
239 | 239 | ||
240 | <div class="upload-item"> | 240 | <div class="upload-item"> |
241 | <div class="upload-item-img"> | 241 | <div class="upload-item-img"> |
242 | - <product-upload | 242 | + <drag-file-upload |
243 | :id="{goodIndex, imageIndex: 3}" | 243 | :id="{goodIndex, imageIndex: 3}" |
244 | @on-success="uploadImageSuccess" | 244 | @on-success="uploadImageSuccess" |
245 | @on-remove="uploadImageRemove"> | 245 | @on-remove="uploadImageRemove"> |
246 | - </product-upload> | 246 | + </drag-file-upload> |
247 | </div> | 247 | </div> |
248 | 248 | ||
249 | <div class="upload-item-title"> | 249 | <div class="upload-item-title"> |
@@ -256,11 +256,11 @@ | @@ -256,11 +256,11 @@ | ||
256 | <Col span="4"> | 256 | <Col span="4"> |
257 | <div class="upload-item"> | 257 | <div class="upload-item"> |
258 | <div class="upload-item-img"> | 258 | <div class="upload-item-img"> |
259 | - <product-upload | 259 | + <drag-file-upload |
260 | :id="{goodIndex, imageIndex: 4}" | 260 | :id="{goodIndex, imageIndex: 4}" |
261 | @on-success="uploadImageSuccess" | 261 | @on-success="uploadImageSuccess" |
262 | @on-remove="uploadImageRemove"> | 262 | @on-remove="uploadImageRemove"> |
263 | - </product-upload> | 263 | + </drag-file-upload> |
264 | </div> | 264 | </div> |
265 | 265 | ||
266 | <div class="upload-item-title"> | 266 | <div class="upload-item-title"> |
@@ -334,7 +334,6 @@ | @@ -334,7 +334,6 @@ | ||
334 | </template> | 334 | </template> |
335 | <script> | 335 | <script> |
336 | 336 | ||
337 | -import ProductUpload from './create-upload'; | ||
338 | import ShopMaterial from './views/material'; | 337 | import ShopMaterial from './views/material'; |
339 | import MuliSelect from './views/muli-select'; | 338 | import MuliSelect from './views/muli-select'; |
340 | import Age from './views/age'; | 339 | import Age from './views/age'; |
@@ -992,7 +991,6 @@ export default { | @@ -992,7 +991,6 @@ export default { | ||
992 | computed: { | 991 | computed: { |
993 | }, | 992 | }, |
994 | components: { | 993 | components: { |
995 | - 'product-upload': ProductUpload, | ||
996 | 'shop-material': ShopMaterial, | 994 | 'shop-material': ShopMaterial, |
997 | 'multi-select': MuliSelect, | 995 | 'multi-select': MuliSelect, |
998 | 'product-age': Age, | 996 | 'product-age': Age, |
-
Please register or login to post a comment