Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <StackLayout>
- <StackLayout>
- <Image width="100%" margin="0" :src="checkIfImageUrlAvailable()" class="banner" />
- </StackLayout>
- </StackLayout>
- export default {
- data() {
- return {
- item: {
- attachments: {},
- image: {}
- },
- isAndroidOs: null,
- isDownloading: false
- };
- },
- props: {
- itemSelected: {
- type: Object,
- default: {}
- }
- },
- props: ["itemSelected"],
- methods: {
- getValue(resource, key) {
- return get(resource, key);
- },
- // imageNotFound(item) {
- // if (item.image == null) {
- // return getValue(item.image, ");
- // }
- // },
- checkIfImageUrlAvailable() {
- // CHECK IF ITEM URL IS THERE, IF NOT SHOW THE PLACEHOLDER, ELSE WE USE ITEM.IMAGE.URL
- // return either the placeholder or return the item.image.url
- if (!item.image.url) {
- return getValue("https://fakeimg.pl/300/");
- } else {
- return getValue(item.image, url);
- }
- },
- beforeMount() {
- console.log(this.itemSelected);
- this.item = this.itemSelected;
- // this.isAndroidOs = myPlatform.android;
- // this.item = this.itemSelected;
- // this.getGeneralInformationDetail();
- firebase.analytics.logEvent({
- key: "select_content"
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement