小编Mac*_*ace的帖子

[Vue 警告]:nextTick 中的错误:“InvalidCharacterError: String contains an invalid character”

在我决定使用 stackoverflow 之前,我已经去了很多网站寻找这个问题的根源,但无济于事。我有两个文件,master.blade.phpheader.blade.php。master 使用@include 到头文件。我使用 vuejs 来获取通知并将它们显示在标题中。它在 mozilla firefox 控制台中显示错误

[Vue 警告]:nextTick 中的错误:“InvalidCharacterError: String contains an invalid character”

DOMException: “字符串包含无效字符”

请帮我。这是我的 master.blade.php 代码

@include('backend.partials.sidebar')
<script src="{{asset('js/vue.js')}}"></script>
var vueNotifications = new Vue({
        el: '#vue-notifications',
        data: {
            results: null,
            timer: '',
        },
        created: function () {
            this.fetchNotifications();
            this.timer = setInterval(this.fetchNotifications, 15000)
        },
        methods: {
            fetchNotifications: function () {
                $.ajax({
                    url: '{{ url("/notifications/notify") }}',
                    type: "GET",
                    success: function (results) {
                        console.log(results);
                        vueNotifications.results = results;
                    },
                    error: function () { …
Run Code Online (Sandbox Code Playgroud)

laravel vue.js

4
推荐指数
1
解决办法
5805
查看次数

标签 统计

laravel ×1

vue.js ×1