elemefe / vue-swipe Goto Github PK
View Code? Open in Web Editor NEWA touch slider for vue.js.
A touch slider for vue.js.
RT
有些使用场景需要初始化的时候就切换到第n张,可不可以在goto里加一个参数,可以直接切换,不带动画。谢谢。
除了滑动控制,如果想通过按钮控制的话
Any chance you could add a web based demo so we could see it in action before cloning?
当数据是通过ajax请求回来时,通过v-for循环出来的swipe-item无法实现轮播效果,我试着通过$broadcast('swipeItemCreated')广播给组件初始化,但是还是不行,请问怎么解决。
<swipe class="my-swipe" :speed="900" :show-indicators="true" :no-drag="false">
<swipe-item class="slide1" v-on:click="swipeItemClick(1)">
<img style="height: 6.4rem;width: 100%;" src="../../../resources/image/wtImg.png"/>
</swipe-item>
<swipe-item class="slide2" v-on:click="swipeItemClick(2)">
<img style="height: 6.4rem;width: 100%;" src="../../../resources/image/wtImg.png"/>
</swipe-item>
</swipe>
import { Swipe, SwipeItem } from 'vue-swipe'
components:{Swipe, SwipeItem},
移动端使用vue-swipe,在切换的时候会引起页面其他地方图片、文字模糊,等切换完毕又可以恢复清晰。PC端则不会
当书写这句话时,提示错误:token (1:0)
vue-swipe.css Unexpected token (1:0) You may need an appropriate loader to handle this file type.
可是我是有cssloader的
ie9下,没有滑动效果,只有过一段时间变成另外一张图
This relative module was not found:
I get a [Vue warn]
when I initialize the component like this:
<swipe auto="7000">
> [Vue warn]: Invalid prop: type check failed for prop "auto". Expected Number, got String.
(found in component <mt-swipe>)
It seems to be parsing 7000
as a string, but for my purposes this is the simplest, most-straightforward way to configure this. Is there a better way to set this prop while keeping it as an attribute in the template?
如题,同步后,当swipe时候,原本显示的白色标点不会改变,且执行goto event也不能跳转到指定index啊
出现问题之后左右滑动一下,问题就消失了。
容器无法自适应高度
`require('vue-swipe/dist/vue-swipe.css')
import { Swipe, SwipeItem } from 'vue-swipe'
export default ({
components: {
'swipe': Swipe,
'swipe-item': SwipeItem
}
})`
<template> <swipe class="my-swipe"> <swipe-item class="slide1">Slide1</swipe-item> <swipe-item class="slide2">Slide2</swipe-item> <swipe-item class="slide3">Slide3</swipe-item> </swipe> </template>
This code use to work with versions of Vue 2.0
Hello,
Is it possible to go to a page when clicked on the indicator in the bottom?
想知道有没有 api 允许跳到指定页
不能增加 <swipe-item @click="alert()"
不知道是不是我这边出现的个例
这样 tab-container 支持滑动的功能就可以直接用 swipe 了
import { Swipe, SwipeItem } from 'vue-swipe';
export default {
data () {
},
components: {
Swipe,SwipeItem
}
}
这样使用的
RT
如果组件在销毁的前一刻恰巧发生了 swipe-item
子组件的变动,那么将会触发 reInitPages
的计时器,组件销毁后仍然会执行 reInitPages
,导致组件抛出错误。
老哥,新版本同步npm啊~,现在npm还203呢,新的功能用不了。(~,~)
<template>
<swipe class="my-swipe">
<swipe-item class="slide1"></swipe-item>
<swipe-item class="slide2"></swipe-item>
<swipe-item class="slide3"></swipe-item>
</swipe>
</template>
<script>
require('vue-swipe/dist/vue-swipe.css');
// in ES6 modules
import { Swipe, SwipeItem } from 'vue-swipe';
export default {
components: {
'swipe': Swipe,
'swipe-item': SwipeItem
}
}
</script>
错误代码
[Vue warn]: You are using the runtime-only build of Vue where the template option is not available. Either pre-compile the templates into render functions, or use the compiler-included build. (found in component <mt-swipe>)
1、没有索引按钮点击锚点
2、没有向上向下页翻转按钮扩展
3、没有回调方法吗?
4、再扩展下面索引的滑过的可以有方法回调(比如滑过可以显示缩略图)
bug很多
这是据说的解决方法,是不是你们要更新一下vue的版本http://stackoverflow.com/questions/41142784/node-dependency-stopped-working
在左右滑动的时候,页面同时可以进行上下滚动。体验很不好。
需要增加一个配置来处理这个问题
https://github.com/ElemeFE/vue-swipe/blob/master/package.json#L5
If we use the module system, i think the original source is more appropriate than the result after the build.
For example, if you use webpack you do not need require('vue-swipe/dist/vue-swipe.css');
if you have vue-loader
and css-loader
.
使用的时候发现左右滑动每次都会出现如图这种情况
下面是我对代码做改动后的效果,原理是使用一个300%宽度的容器做左右滑动,而不是三个宽度100%的swipe-item同时滑动。
Github生涯第一次提issue,请多多指教😊
代码在这里another vue-swipe
import { once } from 'wind-dom/src/event';
import { addClass, removeClass } from 'wind-dom/src/class';
这两个文件不知道在哪里的?
组件倒是引进去了,但是显示的效果不是那养的,应该横排但是是竖排的,好像css存在问题。
这个标签出现在了html文档中
就是我们在滑动图片的时候,轮播图的轮播定时器没关闭,造成图片的间隔时间没刷新,比如我轮播间隔3s,我2s的时候右滑动一张图,下一张图1s后会自动轮播过来,不会等3s
你好,现在我们有个需求是,页面顶部固定3个导航一排显示,下面的3个页面,可以左右划动切换,有什么实现思路吗
现在用图片没法自适应高度吗?
部分手机中 不能滑动
部分手机中不能自动切换
部分手机中点击会出现闪动
hi~ I want to use v2.2.0 from npm, but the latest version on it is v2.0.3. How about sync with npm ?
defaultIndex设置之后为啥不起作用啊!!!
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.