1 | /** |
||
2 | * @public |
||
3 | * @status ready |
||
4 | * @description The <u>sw-media-replace</u> component extends the <u>sw-media-upload</u> component. It is |
||
5 | * used in cases of replacing items rather than uploading them. |
||
6 | * @example-type code-only |
||
7 | * @component-example |
||
8 | * <sw-media-replace itemToReplace="mediaItem" variant="regular"> |
||
9 | * </sw-media-replace> |
||
10 | */ |
||
11 | Shopware.Component.extend('sw-media-replace', 'sw-media-upload-v2', { |
||
0 ignored issues
–
show
|
|||
12 | props: { |
||
13 | itemToReplace: { |
||
14 | type: Object, |
||
15 | required: true |
||
16 | } |
||
17 | }, |
||
18 | |||
19 | data() { |
||
20 | return { |
||
21 | multiSelect: false |
||
22 | }; |
||
23 | }, |
||
24 | |||
25 | methods: { |
||
26 | getMediaEntityForUpload() { |
||
27 | return this.itemToReplace; |
||
28 | }, |
||
29 | |||
30 | cleanUpFailure(mediaEntity, message) { |
||
31 | this.createNotificationError({ message }); |
||
32 | } |
||
33 | } |
||
34 | }); |
||
35 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.