petervmeijgaard/vue-2-boilerplate

data binding at default layout

sodoojin opened this issue · 7 comments

hi i'm new to vuejs.

i want to put some logic into layout component. ( login, register modal )
but slot content is disappeared after update binding.

for example.
i modified layouts -> minimal.html

<div
  class="container"
>
  {{ test }}
  <input type="text" v-model="test">
  <div class="row">
    <div class="col-md-6 col-md-offset-3">
      <slot></slot>
    </div>
  </div>
</div>

and layouts -> minimal.js

export default {
    data() {
        return {
            test: 'test'
        }
    }
};

after change input box, pages -> login -> index content was disappeared.

is it normal? i thought layout is also vue component.

thank you.

vue.common.js?e881:2527 [Vue warn]: Duplicate presense of slot "default" found in the same render tree - this will likely cause render errors. (found in component <v-layout>)

this warning was caused after update vuejs version to ^2.0.0-rc5

The issue exists and has been resolved (but not applied yet).

thank you very much for your reply!!!

Hi @sodoojin,

Thanks for the heads-up!
Perhaps you can downgrade to Vue 2.0.0-rc4
I will upgrade Vue to rc6 as soon as it will be released.
If you've got any questions, feel free to ask them!

Vue 2.0.0-rc6 is available! ;-)

Haha that's quick! I will update the repo soon!

Updated to Vue 2.0.0-rc.6 😄