Skip to content

Dynamic content in Vue components #1074

Description

@Fohlen

Bug Report

In the documentation it says that one can embed Vue instances. I tried building an interactive component for our documentation like so:

# Servers
Thanks to [AngrySnout](https://github.com/AngrySnout/SauerTracker) we have excellent statistics for the game.
<divid="server">
<ul> <li v-for="server in servers" :key="server.description"> {{ server.descriptionStyled }} </li></ul>
</div>
<script>
constAPI_URL="https://tomaten.sauertracker.net/api/servers"newVue({
el:'#server',
data: () => ({
servers: []
}),
async mounted {}
console.log("HEY")
constresponse=awaitfetch(API_URL);
this.servers=awaitresponse.json(); }
})
</script>

However when loading the page the content quickly flashes before getting "rendered away".
I have no idea what sorcery is going on behind the scenes but my best bet is that it's an unsupported feature.

Steps to reproduce

(see above)

What is current behaviour

(see above)

What is the expected behaviour

The app that is rendered on screen should allow for dynamic content.

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: OSX 10.15.3 (19D76)

  • Browser version: Version 80.0.3987.132 (Official Build) (64-bit)

  • Docsify version: 4.11.2

  • Docsify plugins: search plugin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmed as a bugvuejsrelated to Vue.js

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions