What if vue @ click is parsed into a string?


if you write a single page on the phone in a html, but as shown in the figure above, @ click is parsed into a string, causing the click method to become invalid. Ask for the boss"s answer, thank you.


-sharpapp will resolve


html:

<div id="demo">vue vue!</div>

js:

 var vm = new Vue().$mount(document.querySelector('-sharpdemo'));
<=> 
var vm = new Vue({
    el:"-sharpdemo"
});

in this way, vue will parse your events, attributes, instructions, etc., written in the root element.


Update: brother upstairs is right

your v-grammars are the dsl of vue, either with vue-loader in the .vue file, or with his runtime parsing
if you want to simply use it in .html, you need to introduce another vue.min.js

.

if it helps you, please upvote or adopt ~

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c04ea6-3270e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c04ea6-3270e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?