Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法解析vue中使用element-ui的$message语法 #160

Open
fuguxu opened this issue Nov 14, 2023 · 1 comment
Open

无法解析vue中使用element-ui的$message语法 #160

fuguxu opened this issue Nov 14, 2023 · 1 comment

Comments

@fuguxu
Copy link

fuguxu commented Nov 14, 2023

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>控制台</title>
</head>
<body>
    <div id="rrapp" v-cloak></div>
</body>
<script>
    var vm = new Vue({
       el: '#rrapp',
        methods: {
          query(){
            $.ajax(url).then(res=>{
                vm.$message({message:'成功', type: 'success'})
            })
          }
        }
   })
</script>

</html>

以前的老项目,像以上写代码时,会解析$message并报错:Expecting 'MAP_END', 'STRING', 'EVAL_STRING', got 'ID', 请问该如何解决呢

@shepherdwind
Copy link
Owner

不好意思,很久没看这个了。估计是把 $.ajax(url).then( 当初 vm 语法处理了,可以试试 \$.ajax(url).then(

我晚点再看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants