Coder Social home page Coder Social logo

Nothing is working about vue-slick HOT 11 CLOSED

staskjs avatar staskjs commented on August 21, 2024
Nothing is working

from vue-slick.

Comments (11)

mooc0705 avatar mooc0705 commented on August 21, 2024 3

import 'slick-carousel/slick/slick.css';
import 'slick-carousel/slick/slick-theme.css';

This is how I solved the problem. Add 'slick-carousel/slick/slick-theme.css' should fix the problem

from vue-slick.

cviebrock avatar cviebrock commented on August 21, 2024 2

I needed to make sure the containing element of the <slick> component had a defined width. 😞

from vue-slick.

henridelozanne avatar henridelozanne commented on August 21, 2024 1

I had the same problem, solved it by adding

<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/[email protected]/slick/slick.css"/> <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/[email protected]/slick/slick-theme.css"/>

in my index.html head

from vue-slick.

staskjs avatar staskjs commented on August 21, 2024

This most likely has nothing to do with vue-slick, because it is just a wrapper for vue. You should better address your question to original plugin authors. But I think this is just a css problem.

from vue-slick.

FrancescoSaverioZuppichini avatar FrancescoSaverioZuppichini commented on August 21, 2024

I just follow the guideline, that's it.

from vue-slick.

mbarwick83 avatar mbarwick83 commented on August 21, 2024

I'm also getting this issue too.

from vue-slick.

staskjs avatar staskjs commented on August 21, 2024

I would suggest adding slick css from node_modules/slick-carousel/slick/slick.css

from vue-slick.

cviebrock avatar cviebrock commented on August 21, 2024

I'm having this issue as well, but I traced it back to the fact that the HTML element that held my slick component was part of a CSS Grid element with a variable width. i.e.:

<div class="grid" style="display: grid; grid-template-columns: 200px 1fr;">
    <div class="sidebar">...</div>
    <div class="main">
        <slick ...>...</slick>
    </div>
</div>

I think in this case, the plugin can't determine the width of the slick-track, so everything goes a bit nuts.

EDIT: Yup ... this has been reported: kenwheeler/slick#2959

from vue-slick.

jzucadi avatar jzucadi commented on August 21, 2024

So what do you do, the link doesn't have a solution that works

from vue-slick.

Bobur-kobilov avatar Bobur-kobilov commented on August 21, 2024

How I solved it:
import './../node_modules/slick-carousel/slick/slick.css';

from vue-slick.

P-James avatar P-James commented on August 21, 2024

I had this issue after running npm run prod
So I also added the cdn links to the css in my template and it works

from vue-slick.

Related Issues (20)

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.