Skip to content

docsify-vue-no-additional-configuration-issue #2324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
ezzle opened this issue Dec 7, 2023 · 3 comments · Fixed by #2327
Closed
1 task

docsify-vue-no-additional-configuration-issue #2324

ezzle opened this issue Dec 7, 2023 · 3 comments · Fixed by #2327

Comments

@ezzle
Copy link

ezzle commented Dec 7, 2023

Bug Report

docsify-vue-no-additional-configuration-issue

Vue template syntax is used to create dynamic content. With no additional configuration, this syntax offers several useful features like support for JavaScript expressions and Vue directives for loops and conditional rendering.

Not working when missing vueGlobalOptions configuration. Even an empty one is ok. At least An empty vueGlobalOptions config required ?

Steps to reproduce

https://stackblitz.com/edit/stackblitz-starters-zex4gj?file=docs%2Findex.html

COMMENT the vueGlobalOptions to test the issue

Current behaviour

Not working when missing at least an empty vueGlobalOptions

Expected behaviour

Working with no vue configuration. What I understand from the documention

Other relevant information

  • Docsify version: the latest
  • Bug still occurs when all/other plugins are disabled?

  • Docsify plugins (if the bug happens when plugins enabled, please try to isolate the issue):

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

@Koooooo-7
Copy link
Member

Koooooo-7 commented Dec 10, 2023

Hi @ezzle , thx for catching the point.
It needs enhancement in our side here to parse Vue content automatically once user import Vue resources, although without define any Vue contexts (components, configs).

@ezzle
Copy link
Author

ezzle commented Dec 10, 2023

Please can you also clarify how to use Vue3.x to

  1. declare an component
  2. import, register and use vue component defined in an external SFC .vue component

@Koooooo-7
Copy link
Member

Please can you also clarify how to use Vue3.x to

  1. declare an component
  2. import, register and use vue component defined in an external SFC .vue component

Hi @ezzle , you could declare an component like this below, more in our docsify docs.

window.$docsify = {
  vueComponents: {
    'button-counter': {
      template: `
        <button @click="count += 1">
          You clicked me {{ count }} times
        </button>
      `,
      data() {
        return {
          count: 0,
        };
      },
    },
  },
};

Unfortunately, import and use the 3rd vue component is not that feasible based on our Vue supports tho.

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

Successfully merging a pull request may close this issue.

2 participants