pandao / editor.md

The open source embeddable online markdown editor (component).
http://editor.md.ipandao.com/
MIT License
13.82k stars 2.42k forks source link

引入之后一直转圈 #990

Closed tyza66 closed 1 year ago

tyza66 commented 1 year ago

资源引入都正确,之后不报错,就转圈

tyza66 commented 1 year ago

解决了,如果和vue一起用的话不要用在生命周期函数created中。我放回了jq加载完毕函数里面了就好了。

<script>
 $(function(){
            this.testEditor = editormd({
                    id      : "editormd",
                    width   : "100%",
                    height  : 640,
                    path    : "../lib/"
                });
        })
        var app = new Vue({
            el: '#app',
            data: {
            },
            created() {
                var that = this
                axios.get("./user/check").then(function (response) {
                    if (response.data.code != 200) {
                        window.location.href = "../";
                    }
                }).catch(function (error) {
                    console.log(error);
                })
            },
            methods: {

            }
        })
</script>