Giter Club home page Giter Club logo

Comments (4)

hellolex avatar hellolex commented on June 20, 2024

还发现如果是在默认页组件里使用的话,则切换tab后再切回来还是能保持

fgdfgdfgdfg

from vue-router-tab.

bhuh12 avatar bhuh12 commented on June 20, 2024

富文本数据是否 v-model 双向绑定?
如果已绑定存在该问题,可尝试 activated 通过 v-if 控制富文本组件重新创建

<rich-text v-model="value" v-if="show" />

async activated(){
  this.show = false
  await this.$nextTick()
  this.show = true
}

问题发生的根因是,iframe 脱离 document 后重新插入,子页面内容会重新加载。
RouterTab 是基于 KeepAlive 实现的,页面内部的 iframe 在切换页签后,实际 iframe 节点会重新加载。
如果富文本控件是你们自己封装的,可以内部处理一下。

from vue-router-tab.

bhuh12 avatar bhuh12 commented on June 20, 2024

你看看能保持的页签和未保持的页签,是否都配置了缓存页签

from vue-router-tab.

hellolex avatar hellolex commented on June 20, 2024

富文本数据是否 v-model 双向绑定? 如果已绑定存在该问题,可尝试 activated 通过 v-if 控制富文本组件重新创建

<rich-text v-model="value" v-if="show" />

async activated(){
  this.show = false
  await this.$nextTick()
  this.show = true
}

问题发生的根因是,iframe 脱离 document 后重新插入,子页面内容会重新加载。 RouterTab 是基于 KeepAlive 实现的,页面内部的 iframe 在切换页签后,实际 iframe 节点会重新加载。 如果富文本控件是你们自己封装的,可以内部处理一下。

编辑器是双向绑定的,看来只能内部重建一下了

from vue-router-tab.

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.