|
|
|
@ -6,12 +6,17 @@ |
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edfe"> |
|
|
|
|
<script src="https://unpkg.com/vue@3.3.4/dist/vue.global.js"></script> |
|
|
|
|
<title>v-bind</title> |
|
|
|
|
<style> |
|
|
|
|
.active{ |
|
|
|
|
border: 1px solid red; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
</head> |
|
|
|
|
<body> |
|
|
|
|
<div id="app"> |
|
|
|
|
<img v-bind:src="imgSrc" v-bind:title="imgTitle"> |
|
|
|
|
<img :src="imgSrc" :class="isActive?'active':''"> |
|
|
|
|
<img :src="imgSrc" :class="{active:!isActive}"> |
|
|
|
|
<img v-bind:src="imgSrc" v-bind:title="imgTitle" alt=""> |
|
|
|
|
<img :src="imgSrc" :class="isActive?'active':''" alt=""> |
|
|
|
|
<img :src="imgSrc" :class="{active:!isActive}" alt=""> |
|
|
|
|
</div> |
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
const App = { |
|
|
|
|