2
0
mirror of https://github.com/esiur/iui.git synced 2025-06-27 17:33:12 +00:00
This commit is contained in:
2021-10-30 12:31:25 +03:00
parent b3479dbdbd
commit 1bac10e60d
10 changed files with 92 additions and 33 deletions

View File

@ -9,4 +9,31 @@ When the :data attribute is set to an element any other attribute and child will
</div>
</i-codepreview>
Child element will be provided with the data of its parent
<i-codepreview>
<ul :data="screen">
<li>Width: <b>${d.width}</b></li>
<li>Height: <b>${d.height}</b></li>
</ul>
</i-codepreview>
Child element can set its data with *:data* attribute
<i-codepreview>
<ul :data="screen">
<li>Width: <b>${d.width}</b></li>
<li>Height: <b>${d.height}</b></li>
<li :data="d.width / d.height"> Ratio: ${d} </li>
</ul>
</i-codepreview>
Every element in the tree will have a *data* property
<i-codepreview>
<div :data="new Date()">
<button onclick="this.innerText = ((new Date) - this.data) + ' milliseconds passed'">
Click me
</button>
</div>
</i-codepreview>