-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06ba4cd
commit 16aaf15
Showing
6 changed files
with
71 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
test/runtime/samples/component-binding-blowback-b/Nested.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<li> | ||
{{yield}} | ||
</li> | ||
|
||
<script> | ||
const initialValues = { | ||
'id-0': 'zero', | ||
'id-1': 'one', | ||
'id-2': 'two' | ||
}; | ||
|
||
export default { | ||
oncreate() { | ||
this.set({ value: initialValues[this.get('id')] }); | ||
} | ||
}; | ||
</script> |
16 changes: 16 additions & 0 deletions
16
test/runtime/samples/component-binding-blowback-b/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export default { | ||
// solo: true, | ||
'skip-ssr': true, | ||
|
||
html: ` | ||
<ol> | ||
<li>id-0: value is zero</li> | ||
<li>id-1: value is one</li> | ||
<li>id-2: value is two</li> | ||
</ol> | ||
`, | ||
|
||
// test ( assert, component, target, window ) { | ||
|
||
// } | ||
}; |
24 changes: 24 additions & 0 deletions
24
test/runtime/samples/component-binding-blowback-b/main.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<ol> | ||
{{#each ids as id}} | ||
<Nested :id bind:value="idToValue[id]"> | ||
{{id}}: value is {{idToValue[id]}} | ||
</Nested> | ||
{{/each}} | ||
</ol> | ||
|
||
<script> | ||
import Nested from './Nested.html'; | ||
|
||
export default { | ||
data() { | ||
return { | ||
ids: ['id-0', 'id-1', 'id-2'], | ||
idToValue: Object.create(null) | ||
}; | ||
}, | ||
|
||
components: { | ||
Nested | ||
} | ||
}; | ||
</script> |