小编cod*_*irl的帖子

找不到模块:错误:无法解析“D:\laravel projects\codeGram\resources\js\components”中的“../../../vue-temp/vue-editor-bridge”

我正在使用 laravel + vuejs 来执行 instagram 克隆的关注和取消关注按钮,但是我得到了这个错误我的代码

<template>
    <div>
    <button class="btn btn-primary ml-4" @click="followUser" v-text="buttonText">Folloq</button>
    </div>
</template>

<script>
import func from '../../../vue-temp/vue-editor-bridge';

    export default {
        props: ['userId', 'follows'],

        watch: {
            status: function() {
                this.buttonText = (this.status) ? 'Unfollow' : 'Follow';
            }
        },

        data: function () {
            return {
                status: this.follows,
                buttonText: this.follows ? 'Unfollow' : 'Follow'
            }
        },

        methods: {
            followUser() {
                 axios.post('/follow/' + this.userId)
                    .then(response => {
                        this.status = ! this.status;

                        console.log(response.data);
                    })
                    
                    .catch(errors => {
                        if (errors.response.status == …
Run Code Online (Sandbox Code Playgroud)

node.js laravel vue.js

5
推荐指数
2
解决办法
2503
查看次数

标签 统计

laravel ×1

node.js ×1

vue.js ×1