use*_*029 5 javascript vue.js virtual-dom server-side-rendering nuxt.js
Ezoic 为网络发布商提供了针对其广告、内容、布局等的自动化网站智能。
Ezoic 只能由 Cloudflare 或名称服务器集成 - https://support.ezoic.com/support/solutions/articles/48000453862-how-can-i-integrate-my-site-with-ezoic-
ezoic 服务器正在用广告脚本替换广告占位符。
例子:
<span id="ezoic-pub-ad-placeholder-100"></span> ---> ad script
Run Code Online (Sandbox Code Playgroud)
问题是我如何将它与 NuxtJS 和 Vue 连接起来。水合后,广告脚本被删除并替换为占位符。我可以告诉 Vue - 不要重新渲染那段代码吗?
组件代码:
<template>
<div class="google-ads" :class="`google-ads--${type}`">
<template v-if="type === 'top'">
<!-- Ezoic - standard - top_of_page -->
<div id="ezoic-pub-ad-placeholder-102"></div>
<!-- End Ezoic - standard - top_of_page -->
</template>
</div>
</template>
Run Code Online (Sandbox Code Playgroud)