Git Product home page Git Product logo

Comments (6)

waveheart avatar waveheart commented on June 4, 2024

问题补充: 应该是由keep-alive引起的。ueditor的内容做的本地存储。不在keep-alive之内

from vue-ueditor-wrap.

 avatar commented on June 4, 2024

这个和keep-alive关系不大,主要原因是autoSave
qq20180711-174630 2x
Ueditor默认配置是每次contentChange的500ms后自动保存编辑器内容到localStorage
qq20180711-162148 2x
 当你跳转路由的时候,挂在this上的editor实例已经被销毁,但是异步的autoSave还是会执行,此时就会出现各种null的错误。如果我没猜错的,这种报错的时机是:你刚输入完内容,编辑器右上角还没有出现本地保存成功的提示,你就点击跳转路由了。这种报错对你项目不会有太大影响.
 所以只要把没什么卵用的autoSave关闭即可,但是ueditor的1.4.3.3版本enableAutoSave: false是无效的,所以我修改了一下源码并把编译后的资源文件放在了dist目录下,你可以下载替换。
 我也在组件的beforeDestory钩子里调用了实例的destory方法(其实没什么用,只是把大部分实例属性销毁并换成textarea),如果你想更新的话,可以执行npm i [email protected]
 当然还有一种取巧的方式,你把自动保存的周期设置的非常大也可以。

from vue-ueditor-wrap.

lyon007 avatar lyon007 commented on June 4, 2024

完美

from vue-ueditor-wrap.

waveheart avatar waveheart commented on June 4, 2024

完美,谢谢大佬,大佬牛逼,大佬six six six!

from vue-ueditor-wrap.

caiya avatar caiya commented on June 4, 2024

怎么我使用的时候每次刷新页面都会报错:
image

第一次打开却是ok的不报错呢

from vue-ueditor-wrap.

dsnzts avatar dsnzts commented on June 4, 2024

我想让它能自动保存,又不想跳转页面的时候报各种null错误,我该咋办呢?求解!谢谢!

from vue-ueditor-wrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.