Skip to content

Commit b2d34d2

Browse files
committed
Add test for binding with templatestring
1 parent 1fa7200 commit b2d34d2

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% set foo = foo|default('') %}
2+
<div class="block {{ class|default('') }}" style="{{ style|default('') }}">
3+
<div style="{{ foo ? foo : "width: " ~ size ~ "; height: " ~ size }}">
4+
Foo
5+
</div>
6+
</div>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<template>
2+
<div class="block">
3+
<div :style="foo ? foo : `width: ${size}; height: ${size}`">
4+
Foo
5+
</div>
6+
</div>
7+
</template>
8+
9+
<script>
10+
export default {
11+
props: {
12+
foo: {
13+
type: String,
14+
default: '',
15+
},
16+
size: {
17+
type: Number,
18+
required: true,
19+
},
20+
},
21+
};
22+
</script>

0 commit comments

Comments
 (0)