Skip to content
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

Addon-Docs: Handle class attributes in Dynamic Source Rendering for Vue.js #13327

Merged
merged 2 commits into from Nov 29, 2020

Commits on Nov 29, 2020

  1. fix(addon-docs): render Vue classes in dynamic source

    #13326
    
    Both static class (`class="foo"`) and dynamic class (`:class="..."`)
    are ignored because Vue treats them as special attribute. They don't
    exist in normal vnode.data.attrs nor componentOptions.propsData.
    pocka committed Nov 29, 2020
    Copy the full SHA
    fe2a84b View commit details
    Browse the repository at this point in the history
  2. fix(addon-docs): Handle object-in-array class (Vue.js)

    https://vuejs.org/v2/guide/class-and-style.html#Array-Syntax
    
    Add support for below.
    
    ```vue
    <div v-bind:class="[{ active: isActive }, errorClass]"></div>
    ```
    pocka committed Nov 29, 2020
    Copy the full SHA
    2e724f7 View commit details
    Browse the repository at this point in the history