如何在vuejs中绑定html 内容?</p> <div class="flex at-meta"> <div class="flex tags"> <span class="tag mr-10">JavaScript</span> </div> <p class="text-theme">神奇伽罗Itachi</p> <p class="ml-10">2020-03-11</p> </div> </div> <div class="article-content"><p><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">我正在尝试在vuejs上进行演示。</font><font style="vertical-align: inherit;">现在,我想要html标题绑定vm字段。</font></font></p> <p><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">以下是我尝试的方法:</font></font></p> <p><code>index.html</code></p> <pre><code><!DOCTYPE html><font></font> <html id="html"><font></font> <head><font></font> <title>{{ hello }}</title><font></font> <script src="lib/requirejs/require.min.js" data-main="app"></script><font></font> </head><font></font> <body><font></font> {{ hello }}<font></font> <input v-model="hello" title="hello" /><font></font> </body><font></font> </html><font></font> </code></pre> <p><code>app.js</code></p> <pre><code>define([<font></font> 'jquery', 'vue'<font></font> ], function ($, Vue) {<font></font> var vm = new Vue({<font></font> el: 'html',<font></font> data: {<font></font> hello: 'Hello world'<font></font> }<font></font> });<font></font> });<font></font> </code></pre> <p><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">但是标题似乎没有界限,如何使其发挥作用?</font></font></p></div> </div> <p class="winter_mark">第624篇《如何在vuejs中绑定html <title>内容?》来自Winter(https://github.com/aiyld/aiyld.github.io)的站点</p> <div class="discuss-wrapper"> <div class="discuss-title-area"> <div class="dt-title">共<span class="total">0</span>个回答</div> </div> <div class="discuss-list"> </div> </div> <div> </div>

问题类别

JavaScript Ckeditor Python Webpack TypeScript Vue.js React.js ExpressJS KoaJS CSS Node.js HTML Django 单元测试 PHP Asp.net jQuery Bootstrap IOS Android