gs-shop / vue-slick-carousel Goto Github PK
View Code? Open in Web Editor NEW🚥Vue Slick Carousel with True SSR Written for ⚡Faster Luxstay
Home Page: https://gs-shop.github.io/vue-slick-carousel/
License: Other
🚥Vue Slick Carousel with True SSR Written for ⚡Faster Luxstay
Home Page: https://gs-shop.github.io/vue-slick-carousel/
License: Other
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)
make static, showing SSR results.
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)
write a couple of examples, maybe to the jsfiddle.net
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.
#37 breaks
the theme css requires fonts and svg.
don't want to copy all those assets.
revert.
try switch to "auto play" tab from the other tab.
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>
the setting is not useful.
leaked in from the slick-carousel.
remove it.
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)
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.
[Vue warn]: Duplicate keys detected: 'originalundefined'. This may cause an update error.
found in
---> <SliderTrack>
<InnerSlider>
<VueSlickCarousel>
<VContent>
<ExamplesPage> at demo/pages/examples/index.vue
<VApp>
<App> at demo/App.vue
<Root>
test gitmoji supporting tools
change/fix commit message convensions for gitmoji to find best fit for those tools.
current behavior moves the selected slide to the leftmost position.
moving the selected slide to the center makes more sense.
consider changing the behavior
The settings are for handling touch/mouse events for moving slides.
Explanations and codes for those are redundant and not precise.
We need to review and clear things up.
the setting value should be either 'ondemand' or 'progressive'.
by changing router mode from history to hash by #31
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.
InnerSlider.js:346 Uncaught TypeError: Cannot read property 'speed' of undefined
at HTMLImageElement.image.onload (InnerSlider.js:346)
funny can not show SSR demo.
need to rebuild demo with SSR.
candidate solution: https://github.com/Akryum/vue-cli-plugin-ssr
.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
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>
{
"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
}
}
]
}
in vue, classes defined in the component apply to the root element.
consider removing this.
error on assigning null
to click handler.
accidental commits make noise. at least do lint before commit.
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
to confirm settings/apis work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.