<html>

<head>

<script src="vue.js"></script>

<title>标题</title>

</head>

<body>

<div id="ids">{{show()}}

<login2 items="1212qqq" username="89adasads0" message="jfsdajfsadjflaksjfkds"></login2>

<button v-on:click="click()">{{message}}</button>

</div>

<script>

Vue.component('login2', {

props: ['items', 'username'],

template: '<h1>{{items}}---{{username}}</h1>'

});

var vue = new Vue({

el: '#ids',

data: {

title: 'titles',

message: 'fdasfidsajflhdsa'

},

methods: {

show: function () {

return 100;

},

click: function () {

return this.message = "you guess!";

}

},

});

</script>

</body>

</html>

Logo

前往低代码交流专区

更多推荐