作业

2019-07-10  本文已影响0人  Python黑户
<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <div v-html="msg1" v-bind:id="id"></div>
<!--    //id="{{id}}"错误 一看input就-->
<!--    <div>-->
<!--      {{number + 1}}-->
<!--    </div>-->
<!--    <p v-if="seen">试试就试试!!</p>-->
<!--    <p v-else>大哥你赢了</p>-->
<!--    <p v-show="isShow">nizhen </p>-->
    <div>
      姓{{'臧'}},名{{'一凡'}} , 姓名{{臧一凡}}
    </div>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  data () {
    return {
      msg1: '<span style="color: #f00;">学习 </span>',
      id: 'txt',
      number: 1,
      seen: true,
      isShow: true,
      firstName: '臧' ,
      lastname: '一凡'
    }
  },
  computed: {
    s: function () {
      return this.firstName + this.lastname
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
上一篇 下一篇

猜你喜欢

热点阅读