karol-f / vue-custom-element

Vue Custom Element - Web Components' Custom Elements for Vue.js
https://karol-f.github.io/vue-custom-element/
MIT License
1.97k stars 187 forks source link

scoped templates #203

Open volkerrichert opened 4 years ago

volkerrichert commented 4 years ago

I'd like to use scoped templates on vce to overwrite some output defined in my component.

E.g. i have a logout compomonet with a "Bootstop Button"

<b-button :id="'submit-'+_uid" type="submit" variant="primary">
          <slot name="btnLogout">Logout</slot>
</b-button>

and i like do overwrite it like so:

<app-logout>
  <template slot id="btnLogout">goodbye "{{username}}"</template>
</app-logout>

The part inside the template isn't compiled, it's just printed out. How to solve this?

THX,

Volker

karol-f commented 4 years ago

Hi, sorry for the late response - can You please prepare e.g. CodeSandbox or GitHub repository? Thanks.

SergkeiM commented 3 years ago

Hi @karol-f I think @volkerrichert is talking about scoped slots #174 (vuejs feature), It will be nice to have it.

itd24 commented 2 years ago

any update on this?

karol-f commented 2 years ago

Hi, unfortunately I won't implement it. But Pull Requests are welcome, regards!