File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <img @error =" $emit('onLoadError', $event)" v-common-directive :src =" imageSrc" :class =" stretchClass" :width =" width" :height =" height" />
2
+ <img @error =" $emit('onLoadError', $event)" v-common-directive :src =" imageSrc" :class =" stretchClass" :width =" width" :height =" height" />
3
3
</template >
4
4
5
5
<script >
@@ -18,12 +18,10 @@ export default {
18
18
width: [String , Number ],
19
19
height: [String , Number ],
20
20
},
21
- data () {
22
- return {
23
- imageSrc: ` ${ this .src .replace (' ~' , ' ' )} ` ,
24
- };
25
- },
26
21
computed: {
22
+ imageSrc : function () {
23
+ return this .src .replace (' ~' , ' ' );
24
+ },
27
25
stretchClass : function () {
28
26
return ` nvw-img ${ this .stretch !== ' none' ? ' nvw-img--' + camelCaseToDash (this .stretch ) : ' ' } ` .trim ();
29
27
},
You can’t perform that action at this time.
0 commit comments