代码实现
<template> <div> <div class="f_mean" v-if="data"> 域名aa.com显示的内容 </div> <div class="f_mean" v-else> 域名bb.com显示的内容 </div> </div> </template>
<script> export default { data() { return { data: true, }; }, mounted() { this.data = location.host.includes('aa') }, methods: { }, }; </script>