<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>
网友评论