GithubHelp home page GithubHelp logo

lunrtick / vue-bulma-accordion Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 6.0 1.65 MB

A simple, easily configurable accordion or collapsible for Vue, styled with Bulma

Home Page: https://lunrtick.github.io/vue-bulma-accordion/

Vue 58.63% JavaScript 23.09% Shell 3.11% HTML 15.17%

vue-bulma-accordion's People

Contributors

lunrtick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vue-bulma-accordion's Issues

Unable to give background color

I am unable to set different background color to header, content and footer. Is this option not available or is there some way to achieve this?

Doesn't work with v-for

Hello, it doesn't recognize my items when I use v-for. The Items get displayed but i cant open any of them.

My Error: Error:

There are only 0 AccordionItems, 1 is out of bounds. [indexing from 1]

My Code:
<BulmaAccordion dropdown initial-open-item="1" :icon="'custom'" :caretAnimation="{ duration: '.6s', timerFunc: 'ease-in-out' }" :slide="{ duration: '.9s', timerFunc: 'ease' }" > <BulmaAccordionItem v-for="(role, index) in roles" :key="index"> <div slot="title"> "Title" </div> <div slot="content"> "Content" </div> </BulmaAccordionItem> </BulmaAccordion>

Does anyone know what I'm doing wrong?

Accordion not showing expanded when using v-show

Let's say I had something in the lines of this where only when showMembership is true, then the section with accordion will show. Well what happens is the accordion will show but always in a closed state. How I can force it to always show open?

<section class="accordions box notification is-info" v-show="showMembership">
  <bulma-accordion dropdown icon="plus-minus" :initial-open-items="[1]"> 
    <bulma-accordion-item>
      SOME CONTENT
    </bulma-accordion-item>
  </bulma-accordion>
</section>

<script>
export default {
  data: function() {
    return {
      showMembership: false
    };
    mounted() {
      this.$events.$on("someEvent", element => {
        this.showMembership = true;
      });
    }
  }
</script>

Slide Not Working Right

Is anyone else having issues where the slide is sliding underneat any content below the accordion?

Also the icon is not showing in Chrome

Does not work with Gridsome

Thanks for building this!

I've been trying to get this accordion to work with Gridsome but there seem to be some weird layout and stylistic bugs. I've also tried using the <ClientOnly> option in Gridsome but that doesn't work too.

Reproduction: CodeSandbox

v0.4 does not work or SSR

Hi! First of all, thank you for this library. I've been using it for long before 0.4 and was working perfectly. I just updated to 0.4.7 and I'm getting "document is not defined" around this line: https://github.com/Lunrtick/vue-bulma-accordion/blob/master/dist/vue-bulma-accordion.umd.js#L283

I'm using this on Vuepress, which renders everything at build time using Node and obviously document object is not defined. A possible solution is wrapping bulma-accordion in <ClientOnly> so it doesn't render at build time, but then all the text shown in the accordion cannot be indexed by search engines. I guess this is related to Rollup but there should be a way to avoid calling undefined objects in SSR ๐Ÿค”

Thanks!

initialOpenItem is not working correctly

I used the code included in the docs
<BulmaAccordion :icon="'custom'" :caret-animation="{ duration: '.6s', timerFunc: 'ease-in-out', }" :slide="{ duration: '.9s', timerFunc: 'ease', }" :initial-open-item="1" :dropdown="false" >

<BulmaAccordion :icon="'custom'" :caret-animation="{ duration: '.6s', timerFunc: 'ease-in-out', }" :slide="{ duration: '.9s', timerFunc: 'ease', }" :initial-open-item="2" :dropdown="false" > <!-- add as many of these items as you need - fill them with content via the slots --> <BulmaAccordionItem> <h4 slot="title">A title with content</h4> <i slot="icon" class="material-icons">more_vert</i> <p slot="content"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Natus eos illo expedita asperiores rem iure aliquid dolore, pariatur dignissimos, minima inventore? Minima voluptatum nulla, error omnis laboriosam voluptatibus rem aperiam. </p> </BulmaAccordionItem> <BulmaAccordionItem> <h4 slot="title">A title with content</h4> <i slot="icon" class="material-icons">more_vert</i> <p slot="content"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Natus eos illo expedita asperiores rem iure aliquid dolore, pariatur dignissimos, minima inventore? Minima voluptatum nulla, error omnis laboriosam voluptatibus rem aperiam. </p> </BulmaAccordionItem> </BulmaAccordion>

and the weird thing that I added only two items , but instead in the vue devtools i can see 3 items
image
so initialOpenItem is not working correctly and i had to give it 2 instead of 1 to be default opened

can you help me please ?

Not displaying icon

Hi, I'm using "vue-bulma-accordion": "^0.5.2", but the icon property doesn't appear on the accordion.

Everything else works just fine (slide animation and dropdown).

<bulma-accordion
  :slide="{ duration: '300ms', timerFunc: 'ease' }"
  :caret-animation="{ duration: '100ms', timerFunc: 'ease' }"
  dropdown
  :icon="'plus-minus'"
>
  <bulma-accordion-item>
    <p slot="title">Some Title</p>
    <p slot="content">Some Text</p>
  </bulma-accordion-item>
<bulma-accordion />

I've tried the default caret icon, plus-minus icon, using custom icon, but it doesn't render any icon.

I have no CSS classes overriding the component.

Am I the only one here with this bug?

I'm using "nuxt": "^2.14.1" with SSR. Some problems show up in the console, and disappears if I wrap everything in a <ClientOnly> tag, just like #9.

Accordion not expanding on click

Hi,

I'm facing trouble in expanding the accordion on click. If I click on the accordion, no action takes place. It's working perfectly in my other component. Just not working in this component.

Here is the codepen of accordion not expanding:
https://codepen.io/mapkbalaji/pen/GePpOQ

Here is the codepen of accordion working:
https://codepen.io/mapkbalaji/pen/EMGVLK

I don't know the difference between these two, as they are the same but one is working and the other doesn't.

Thanks.

Import not working after 0.4.*

I can't use the component after the update to 0.4.*

It says:

Failed to compile. ./node_modules/vue-bulma-accordion/dist/vue-bulma-accordion.common.js
Module build failed: Error: ENOENT: no such file or directory, open '/src/node_modules/vue-bulma-accordion/dist/vue-bulma-accordion.common.js'

I use the following in my component:
import { BulmaAccordion, BulmaAccordionItem } from 'vue-bulma-accordion';

Am I doing something wrong?

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.