UNPKG

oda-framework

Version:

It's an ES Progressive Framework based on the technology of Web Components and designed especially for creating custom UI/UX of any complexity for web and cross-platform PWA mobile applications.

32 lines 1.01 kB
<meta charset="UTF-8"> <oda-levenshtein-test id="test"></oda-levenshtein-test> <script type="module"> import '../../../../oda.js'; import {levenshteinList} from './levenshtein.js'; ODA({is: 'oda-levenshtein-test', template:/*html*/` <style> div { max-width: 200px; } </style> <input ::value> <div class="horizontal" ~for="results"> <span class="flex">{{item.value}}</span> <span>{{item.distance}}</span> </div> `, $public: { value: '', data: [], results: { //$default: Array, $type: Array, get() { return levenshteinList(this.value, this.data, true) } } } }) test.data = ['Иванов', 'Петров', 'Сидоров', 'Через забор ногу-задерищенский'] </script>