Riot 4.7.1 release, based on a simple and elegant UI library components

Riot 4.7.1 release, this version fixes a problem compile cycle property:

Content label with "each" in the project properties can not be read correctly, the error is "TypeError: scope.item.scope undefined." The problem is that the compiler does generate a return scope.classNames ({active: scope.item.scope.isActive}); instead of returning scope.classNames ({active: scope.item.scope.isActive});

<my-tag>
	<select multiple>
	  <option class="{classNames({active: item.isActive})}" each="{item in items}">
	    {item.name}
	  </option>
	</select>

  <style>
    .active { font-weight: bolder; }
  </style>

  <script>
    export default {
      items: [
        {name: "foo", isActive: true},
        {name: "bar", isActive: false},
      ],
      classNames: (classes) => {
        return Object.entries(classes).reduce((acc, item) => {
          const [key, value] = item
          if (value) return [...acc, key]
          return acc
          }, []).join(' ')
      }
    }
  </script>

</my-tag>

Detail View:

Riot is based on a simple and elegant UI library components, bringing a custom component for all modern browsers. Its support for browsers include:

Its volume is small, only 6k:

Guess you like

Origin www.oschina.net/news/111920/riot-4-7-1-released