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

Collapse not showing up #10

Open
andela-oadebayo opened this issue Jul 26, 2017 · 10 comments
Open

Collapse not showing up #10

andela-oadebayo opened this issue Jul 26, 2017 · 10 comments

Comments

@andela-oadebayo
Copy link

Bellow is a screen shot of my code
screen shot 2017-07-26 at 11 22 58 pm

But in my console i get this error

Failed to mount component: template or render function not defined
found in
---> <Collapse>
       <CreatePatient> at resources/assets/js/components/reception/patient/CreatePatient.vue
         <Root>

Please help, i have being blocked on this for days.
Thank you

@OgaBoss
Copy link

OgaBoss commented Jul 28, 2017

Check this out, to solve the issue i had if you come across it
https://github.com/OgaBoss/collapse

@holic-cl
Copy link

holic-cl commented Aug 2, 2017

That link is not working.

Can you post what was the solution?.

@OgaBoss
Copy link

OgaBoss commented Aug 2, 2017

i changed

exports.Collapse = require('./Collapse')
exports.Item = require('./Item')

in src/index.js to

import Collapse from './Collapse'
import Item from './Item'

export {
Collapse,
Item
}
@holic-cl

@holic-cl
Copy link

holic-cl commented Aug 2, 2017

@OgaBoss thanks for fast answer, but didn't work here (mine is another problem anyway).

@OgaBoss
Copy link

OgaBoss commented Aug 2, 2017

what error are you getting @holic-cl

@holic-cl
Copy link

holic-cl commented Aug 2, 2017

Not getting error, collapse items are showing on vue-tools but i don't know why i can't see it. #9

@albertoantunes
Copy link

@OgaBoss solution didn't work as-is in my case. I needed to just add the .vue extension at the end and then it worked!

import Collapse from './Collapse.vue'
import Item from './Item.vue'

export {
Collapse,
Item
}

@albertoantunes
Copy link

turns out my webpack.config was not configured to recognize .vue extensions.
After i added extensions property in my resolve config, it worked as is, without the need to add .vue extension!

module.exports = {
  entry: {
    app: './src/main.js'
  },
  output: {
    path: config.build.assetsRoot,
    filename: '[name].js',
    publicPath: process.env.NODE_ENV === 'production'
      ? config.build.assetsPublicPath
      : config.dev.assetsPublicPath
  },
  resolve: {
    extensions: ['.js', '.vue', '.json'], //THIS LINE

@SilverFoxA
Copy link

Faced the same issue, here's the solution, add class="show" to your top level collapse element.

<collapse accordion is-fullwidth class="show">
...
</collapse>

@Zikoi5
Copy link

Zikoi5 commented Nov 27, 2020

components: {
   Collapse: Collapse.default,
   CollapseItem: CollapseItem.default,
 }

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

No branches or pull requests

6 participants