Question on widgets

Hey @marc1310

there are multiple articles in this forum for the used f7-components - you also have tooltips in the editor for the most of the components and the configuration properties that each component have. Especially usefull for the oh-specific components as they might have additional settings that are not documented at a single place currently.

I mentioned some of these sources here, if you’re interested.

Image items does not populate the base64 encoded string they hold (only some basic information of the image-type and size will be returned) as their state. So accessing the state inside a css background-image won’t work.

AFAIK, the only way to access these encoded images dynamically from items, is to add the it to a image-component and call it via the ‘item’ config property.


@ysc Is there a reason why the string isn’t populated as item state? Maybe it’d be useful to make this encoded string available to reuse it in cases like this?!


Besides the messed up YAML structure (which is most likely related to the wrong code fence selection), you try to access the state of the item here and not the name of the item itself.

To get the item name from a prop, you have to do it this way:

component: f7-card
slots:
  default:
    - component: oh-image
      config:
        item: =props.item
        style:
          width: 100%
          height: auto
2 Likes