Git Product home page Git Product logo

Comments (6)

Scrum avatar Scrum commented on June 9, 2024 1

@re2005 Hi, thanks for an interesting idea, but I'll try to figure out how to do it. If you have any ideas, feel free to submit them. PR are also welcomed

from vue-2-breadcrumbs.

re2005 avatar re2005 commented on June 9, 2024 1

Thanks for the feedback. Maybe on Vue3 this is something that will work.

I've also tried but didn't succeed.

Keep u posted if any update on my side.

Thanks

from vue-2-breadcrumbs.

karladler avatar karladler commented on June 9, 2024 1

I'm not that deep into vue, but maybe it's an idea to use a similar logic like the vue-meta plugin. So that a child component can export certain fields to overwrite template strings in the parents.
https://github.com/nuxt/vue-meta

from vue-2-breadcrumbs.

re2005 avatar re2005 commented on June 9, 2024

Can u accept a promise inside the component:

const label = this.getBreadcrumb(crumb.meta.breadcrumb);

There's an async approach for handling promises. I tried but not there yet.

Vue.component('async-example', function (resolve, reject) {
  setTimeout(function () {
    // Pass the component definition to the resolve callback
    resolve({
      template: '<div>I am async!</div>'
    })
  }, 1000)
})

from vue-2-breadcrumbs.

Scrum avatar Scrum commented on June 9, 2024

So far, I do not see opportunities to implement this for several reasons:

  1. The router does not work with promises
  2. Rendering doesn't work with promises

Either I have not completely figured out the ecosystem vue and vue-router

from vue-2-breadcrumbs.

Scrum avatar Scrum commented on June 9, 2024

I'm not that deep into vue, but maybe it's an idea to use a similar logic like the vue-meta plugin. So that a child component can export certain fields to overwrite template strings in the parents. https://github.com/nuxt/vue-meta

Thanks anyway, I'll look into this pack!

from vue-2-breadcrumbs.

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.