Giter Site home page Giter Site logo

gs-shop / vue-slick-carousel Goto Github PK

View Code? Open in Web Editor NEW
790.0 7.0 185.0 9.44 MB

🚥Vue Slick Carousel with True SSR Written for ⚡Faster Luxstay

Home Page: https://gs-shop.github.io/vue-slick-carousel/

License: Other

JavaScript 30.96% Vue 64.62% CSS 4.42%
javascript vue frontend slick carousel slider ssr pwa nuxt swiper

vue-slick-carousel's People

Contributors

dependabot[bot] avatar ekanant avatar javipuche avatar kyuwoo-choi avatar megasent1 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  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  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  avatar  avatar  avatar  avatar

vue-slick-carousel's Issues

Cannot read property '$el' of undefined on resizing window

in the responsive example, see the error while resizing the window.

InnerSlider.js:305 Uncaught TypeError: Cannot read property '$el' of undefined
    at VueComponent.resizeWindow (InnerSlider.js:305)
    at VueComponent.<anonymous> (InnerSlider.js:299)
    at invokeFunc (index.js:160)
    at trailingEdge (index.js:207)
    at timerExpired (index.js:195)

🚑 npm registry trouble for 1.0.0-beta.2, 1.0.0-beta.3

error https://registry.yarnpkg.com/vue-slick-carousel/-/vue-slick-carousel-1.0.0-beta.2.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

image

wait for recovery.

Error in render: "TypeError: Cannot read property 'filter' of null"

TypeError: Cannot read property 'filter' of null
    at VueComponent.settings (VueSlickCarousel.js:36)
    at Watcher.get (vue.runtime.esm.js:4473)
    at Watcher.evaluate (vue.runtime.esm.js:4578)
    at Proxy.computedGetter (vue.runtime.esm.js:4830)
    at Proxy.render (VueSlickCarousel.js:184)
    at VueComponent.Vue._render (vue.runtime.esm.js:3542)
    at VueComponent.updateComponent (vue.runtime.esm.js:4060)
    at Watcher.get (vue.runtime.esm.js:4473)
    at Watcher.run (vue.runtime.esm.js:4548)
    at flushSchedulerQueue (vue.runtime.esm.js:4304)

add examples

write a couple of examples, maybe to the jsfiddle.net

performance <> stability

Currently, the most significant instability comes from changing props.
This is a reliable way to force the InnserSlider to update as props change by assigning key.

This is not the best way because it can impact performance.
However, since this component is in the early stages, stability may be a priority.

// VueSlickCarousel
render() {
  // ...
  return (
      <InnerSlider
        ref="innerSlider"
        {...{ props: settings }}
        key={JSON.stringify(settings)}>
        {newChildren}
      </InnerSlider>
    )
}

For now, the "key guard" for stability will be used.
For the future, see the performance impact, and keep trying to fix the bugs on props change, consider removing the guard.

missing fonts & svg

  • ./ajax-loader.gif in ./node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/postcss-loader/src??ref--3-oneOf-1-2!./node_modules/vue-slick-carousel/dist/slick-theme.css
  • ./fonts/slick.eot in ./node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/postcss-loader/src??ref--3-oneOf-1-2!./node_modules/vue-slick-carousel/dist/slick-theme.css
  • ./fonts/slick.svg in ./node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/postcss-loader/src??ref--3-oneOf-1-2!./node_modules/vue-slick-carousel/dist/slick-theme.css
  • ./fonts/slick.ttf in ./node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/postcss-loader/src??ref--3-oneOf-1-2!./node_modules/vue-slick-carousel/dist/slick-theme.css
  • ./fonts/slick.woff in ./node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/postcss-loader/src??ref--3-oneOf-1-2!./node_modules/vue-slick-carousel/dist/slick-theme.css

#37 breaks
the theme css requires fonts and svg.
don't want to copy all those assets.
revert.

duplicated key for multiple rows example

main.js:18 [Vue warn]: Duplicate keys detected: 'postcloned4'. This may cause an update error.

found in

---> <VueSlickCarousel>
       <VContent>
         <ExamplesPage> at demo/pages/examples/index.vue
           <VApp>
             <App> at demo/App.vue
               <Root>

settings easing

the setting is not useful.
leaked in from the slick-carousel.
remove it.

Uncaught TypeError: Cannot read property '$el' of undefined

resizeWindow call after the element is destroyed.

InnerSlider.js:326 Uncaught TypeError: Cannot read property '$el' of undefined
    at VueComponent.resizeWindow (InnerSlider.js:326)
    at VueComponent.<anonymous> (InnerSlider.js:319)
    at invokeFunc (index.js:160)
    at trailingEdge (index.js:207)
    at timerExpired (index.js:195)

rename api

the api names have 'slick' prefix.
eg) slickPrev, slickNext

the prefixes are for distinguishing the method of the component as a jquery plugin.
vue doesn't need this.
consider deprecating these.

replace callbacks to event

# Settings

  • beforeChange
  • afterChange
  • onEdge
  • onInit
  • onLazyLoadError
  • onReInit
  • swipeEvent
  • onLazyLoad

# Internal

  • InnerSlider.selectHandler called from SliderTrack.focusOnSelect
  • InnerSlider.changeSlide called from SliderArrow.clickHandler
  • InnerSlider.changeSlide called from SliderDots.clickHandler

SSR test fails with different slide width

style="width: 100%; left: 0%;">
                  <div
                      aria-hidden="false"
                      class="slick-active slick-current slick-slide"
                      data-index="0"
    -                 style="outline: none; width: 100%;"
    +                 style="outline: none;"
                      tabindex="-1">
                      <div
                          class=""
                          style="">
                          <div

kyuwoo-choi@f285087 breaks the test.

improve readme

  • describe essential features
  • show how vue-slick-carousel improves performance with SSR

embed font in slick theme css

image

.slick-loading .slick-list
{
    background: #fff url('./ajax-loader.gif') center center no-repeat;
}

/* Icons */
@font-face
{
    font-family: 'slick';
    font-weight: normal;
    font-style: normal;

    src: url('./fonts/slick.eot');
    src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');
}

ref: #37

arrow click handler error due to not updating responsive setting

on updating props, got the error.
no responsive settings are updated.

[Vue warn]: Invalid handler for event "click": got null

found in

---> <SliderArrow>
       <InnerSlider>
         <VueSlickCarousel>
           <VContent>
             <ExamplesPage> at demo/pages/examples/index.vue
               <VApp>
                 <App> at demo/App.vue
                   <Root>

wrong arrows & dots with responsive

settings

{
  "dots": true,
  "infinite": false,
  "speed": 500,
  "slidesToShow": 4,
  "slidesToScroll": 4,
  "initialSlide": 0,
  "responsive": [
    {
      "breakpoint": 1024,
      "settings": {
        "slidesToShow": 3,
        "slidesToScroll": 3,
        "infinite": true,
        "dots": true
      }
    },
    {
      "breakpoint": 600,
      "settings": {
        "slidesToShow": 2,
        "slidesToScroll": 2,
        "initialSlide": 2
      }
    },
    {
      "breakpoint": 480,
      "settings": {
        "slidesToShow": 1,
        "slidesToScroll": 1
      }
    }
  ]
}

1024 < size

image

600 < size <= 1024

image

settings className

in vue, classes defined in the component apply to the root element.
consider removing this.

consider including slick styles in dist

import VueSlickCarousel from 'vue-slick-carousel'
import 'vue-slick-carousel/dist/slick.css

is better than

import VueSlickCarousel from 'vue-slick-carousel'
import 'slick-carousel/slick/slick.css

and, we can move the slick-carousel from dep to devDep

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.