File tree Expand file tree Collapse file tree 2 files changed +6
-17
lines changed
themes/vue/layout/partials Expand file tree Collapse file tree 2 files changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ Les moustaches ne peuvent pas être utilisées à l'intérieur des attributs HTM
51
51
Cela fonctionne également pour les attributs booléens - l'attribut sera retiré si la condition est évaluée fausse :
52
52
53
53
``` html
54
- <button v-bind:disabled =" someDynamicCondition " >Button</button >
54
+ <button v-bind:disabled =" isButtonDisabled " >Button</button >
55
55
```
56
56
57
57
### Utilisation des expressions JavaScript
Original file line number Diff line number Diff line change 1
1
<div id =" ad" >
2
2
<script >
3
3
(function () {
4
- var showConfPromo = Math .random () <= 0.33
5
- if (showConfPromo) {
6
- var c = document .createElement (' div' )
7
- c .id = ' conf-promo'
8
- c .innerHTML = ' <a href="https://conf.vuejs.org" target="_blank">' +
9
- ' <img src="/images/conf.png" alt="vueconf">' +
10
- ' <span>The first VueConf EU is being held in Wrocław, Poland, June 21-23!</span>'
11
- ' </a>'
12
- document .getElementById (' ad' ).appendChild (c)
13
- } else {
14
- var s = document .createElement (' script' )
15
- s .setAttribute (' async' , ' ' )
16
- s .src = ' //cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=vuejs'
17
- s .id = ' _carbonads_js'
18
- document .getElementById (' ad' ).appendChild (s)
19
- }
4
+ var s = document .createElement (' script' )
5
+ s .setAttribute (' async' , ' ' )
6
+ s .src = ' //cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=vuejs'
7
+ s .id = ' _carbonads_js'
8
+ document .getElementById (' ad' ).appendChild (s)
20
9
})()
21
10
</script >
22
11
</div >
You can’t perform that action at this time.
0 commit comments