Giter VIP home page Giter VIP logo

Comments (8)

Strahinja avatar Strahinja commented on May 30, 2024 1

From the documentation, $el is available only after mount, so the difference is that the manipulation (insertion of highlighting <span>s) must be done in mounted() instead of render(). I have to test more thoroughly, but that could be a breaking change. I'll post back here when I do that, hopefully during this weekend.

from frontmatter-markdown-loader.

Strahinja avatar Strahinja commented on May 30, 2024 1

I'm sorry for not commenting here as well, I commented on the PR. Basically, the problem was to find a way to extend the loaded data. Your way of doing that solved the problem. Thanks again.

from frontmatter-markdown-loader.

hmsk avatar hmsk commented on May 30, 2024

I'm really impressed by that approach. I guess you're familiar with how Vue works 😉 (or old Vue user who needed to care about render function)

As you assumed, Mode.VUE_COMPONENT doesn't give the chance to manipulate the node tree directly, and expect to interact through $el.

from frontmatter-markdown-loader.

hmsk avatar hmsk commented on May 30, 2024

That's a good point. So the actual timing of applying "highlight" should be different completely, hence your expectation may not be satisfied with VUE_COMPONENT mode 🤔

from frontmatter-markdown-loader.

Strahinja avatar Strahinja commented on May 30, 2024

Yeah, basically I need the FMMode.VUE_RENDER_FUNCTIONS functionality because I use nuxt generate, and in addition to the above, I'm using Vuex store to handle data. My use case is my website and blog I'm developing in Nuxt.js. Is there a specific reason this feature is missing? After all, if a programmer doesn't know how to use it, they can always use FMMode.VUE_COMPONENT.

from frontmatter-markdown-loader.

hmsk avatar hmsk commented on May 30, 2024

Ah, I get it. You're generating static build of highlight-ed pages. That looks the appropriate use-case. However, I'm still aiming for the sunset of "VUE_RENDER_FUNCTIONS" to simplify the usage of FML.

Thanks for giving your repo! I will play with that since I have an idea to make it your use-case with VUE_COMPONENT.

from frontmatter-markdown-loader.

hmsk avatar hmsk commented on May 30, 2024

I tried to implement my idea and sent PR for your repo: Strahinja/strahinja-org-nuxt#1

The idea to have your highlight functionality is overwriting a component object's render function.

from frontmatter-markdown-loader.

hmsk avatar hmsk commented on May 30, 2024

@Strahinja Probably, you don't see any problem anymore...? I close this issue but feel free to reopen if you still see something worse. Thanks for sharing your use-case!

from frontmatter-markdown-loader.

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.