-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maciej Kucmus
committed
Nov 12, 2019
1 parent
5427bf0
commit 34e1210
Showing
5 changed files
with
42 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule vue
added at
df1554
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
<template> | ||
<div class="sw-image"> | ||
<!-- <SfImage :content="getCmsSlot" /> --> | ||
<h3>image but no content</h3> | ||
<SfImage :src="imgUrl" :title="title" :alt="alt" :lazy="lazyLoad" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
// import { | ||
// SfImage | ||
// } from "@storefront-ui/vue"; | ||
import { | ||
SfImage | ||
} from "@storefront-ui/vue"; | ||
export default { | ||
components: { | ||
// SfImage | ||
SfImage | ||
}, | ||
props: { | ||
content: { | ||
type: Object, | ||
default: () => ({}) | ||
} | ||
}, | ||
computed: {} | ||
computed: { | ||
imgUrl() { | ||
return this.content.data.media.url || "" | ||
}, | ||
alt() { | ||
return this.content.data.media.alt || "" | ||
}, | ||
title() { | ||
return this.content.data.media.title || "" | ||
}, | ||
lazyLoad() { | ||
return true; | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.sw-image { | ||
border: 1px dashed #ff000a; | ||
h3 { | ||
padding: 10px; | ||
color: #ff000a; | ||
} | ||
} | ||
</style> | ||
<style lang="scss" scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters