├── .DS_Store ├── LICENSE ├── README.md ├── src ├── .DS_Store └── hello.vue └── weex-tantan.gif /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezshine/weex-tindereffect/e7d92390bb73f7965d62813c89191103eeec7019/.DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 ezshine 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # weex-tindereffect 2 | based on weex to make card stack and drag effect 3 | ![weex-tindereffect](weex-tantan.gif) 4 | 其实是一个挺简单的效果,各种框架下都有类似的源码。但由于weex内没有z-index等,所以实现起来还是挺麻烦的。 5 | 真机效果很流畅,大家可尽情使用。 6 | 7 | 1、完全基于pan事件实现,实现了手滑方向的判定,以及扔出的判定。 8 | 2、计算了拖动的加速度,clone的朋友们可以改变animation里的duration寻找更合适的缓冲效果。 9 | 3、三卡片层叠,可重用。卡片的内容在交换时可更新下一张卡的内容,有注释。 10 | 11 | thanks for eros , the best solution to build iOS/Android apps. -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezshine/weex-tindereffect/e7d92390bb73f7965d62813c89191103eeec7019/src/.DS_Store -------------------------------------------------------------------------------- /src/hello.vue: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 265 | 414 | -------------------------------------------------------------------------------- /weex-tantan.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezshine/weex-tindereffect/e7d92390bb73f7965d62813c89191103eeec7019/weex-tantan.gif --------------------------------------------------------------------------------