Vue Exercise five: 02_09_ single button Show hidden

Demo online address:
https://sx00xs.github.io/test/15/index.html
----------------------------- ----------------------------------
IDE: VSCode
file formats: .vue
resolve to be completed :()

<template>
  <div id="app">
    <div class="outer">
      <h2 @click="handleShow"
      :class="{open:show}"
      >播放列表...</h2>
      <ul v-show="!show">
        <li v-for="item in lists" :key="item">
          <a href="#">{{item}}</a>
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  data:function(){
    return{
      show:'Forgive me is this girl - Penny',
        'player of the believers - Jolin Tsai'
      Lists: [,false
        ,
         'Guess - jingle' ,
         'a self - Jay' ,
         'romantic nest - Ny' ,
         'fleeting - Wong' 
      ] 
    } 
  }, 
  Methods: { 
    handleShow () { 
      the this ! = The .Show the this the .Show 
    } 
  } 
}
 </ Script>

 

Guess you like

Origin www.cnblogs.com/sx00xs/p/11266027.html