You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/WebMVC/wwwroot/pages/home.html

25 lines
638 B

<template>
<a-button type="primary" v-if="isMobile">
Primary
</a-button>
<h2 v-else>{{title}}</h2>
</template>
<script>
export default {
data: function () {
return {
title: '首页',
token: null
}
},
mounted: function () {
document.querySelector('title').innerHTML = this.title;
this.token = PubSub.subscribe('msg', function (msg, data) {
alert(msg + data);
});
},
beforeDestroy: function () {
PubSub.unsubscribe(this.token);
}
}
</script>