暂无权限

加入尚新途,才有权限看这些视频哦!

点击前往
×
问答
流年岁月
1楼
<template>
  <div>
    <p>{{count}}</p>
    <button @click="setCountHandler">按钮</button>
    <a :href="url">百度</a>
    <p v-for="(item,index) in names" :key="index">{{item}}</p>
    <button @click="addNames">按钮</button>
  </div>
</template>

<script>
    export default {
        name: "APIDemo1",
      data(){
          return{
            count:10,
            url:"http://www.baidu.com",
            names:["a","b","c","d"]
          }
      },
      methods:{
          setCountHandler(){
            this.count+=1
          },
          addNames(){
            let currentName = ["e","f"];
            let totalNames = this.name.concat(currentName);
            this.names = totalNames;
          }
      }
    }
</script>

image.png

尚新途

这是  this.count

image.png

自我检测(5S)