Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

router-view:key="$route.path" hot reload #2150

Closed
ccqgithub opened this issue Apr 11, 2018 · 1 comment
Closed

router-view:key="$route.path" hot reload #2150

ccqgithub opened this issue Apr 11, 2018 · 1 comment

Comments

@ccqgithub
Copy link

What problem does this feature solve?

now, if i use router-view with key like this:

        <div class="sma-mod">
          <transition name="mod">
            <keep-alive>
              <router-view
                :key="$route.path"
                ref="router"
              ></router-view>
            </keep-alive>
          </transition>
        </div>

when i modify js, the current component disappear, when i modify template or style, it is right.

want: can hot reload with key router-view

What does the proposed API look like?

        <div class="sma-mod">
          <transition name="mod">
            <keep-alive>
              <router-view
                :key="$route.path"
                ref="router"
              ></router-view>
            </keep-alive>
          </transition>
        </div>
@ccqgithub ccqgithub changed the title router-view with key hot reload bug router-view with key hot reload Apr 11, 2018
@ccqgithub ccqgithub changed the title router-view with key hot reload router-view:key="$route.path" hot reload Apr 11, 2018
@posva
Copy link
Member

posva commented Apr 11, 2018

Tested with vue-cli@beta and the problem seems related to the presence of keep-alive but happens without the router. Could you report this back to vue-loader?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants