Comments (9)
已定位问题,AtCalendarBody
中,Swiper
没有动态绑定 current
导致。
vue.h(components.Swiper, vue.mergeProps(animationEndOrFinish, {
class: 'main__body',
circular: true,
vertical: props.isVertical,
skipHiddenItemLayout: true,
current: 1, // <- 应该改为: currentSwiperIndex.value
onChange: handleChange,
onTouchMove: handleSwipeTouchMove,
onTouchEnd: handleSwipeTouchEnd,
onTouchStart: handleSwipeTouchStart
}),
会在下一个版本中修复。
from taro-ui-vue3.
我看react
版也没绑,current
应该是swiper
自己变的吧。如果monthChange
的时候不修改partLoading
就没问题
from taro-ui-vue3.
你可以试试 react 版本存在这个问题吗?
from taro-ui-vue3.
把 taro-ui-vue3/dist/index.umd.js 中 AtCalendarBody 中相应的地方按照上面改一下,的确可以修复问题。具体是哪个逻辑,或者 Swiper 组件的问题,后续再研究一下。
from taro-ui-vue3.
@whyour
单独用 Swiper
复现了一下这个问题, 的确就是因为 Swiper
的 current
参数绑定了 1
导致的。
current
参数的作用是定位滑块,页面首次渲染后,滑块定位在 index 为 1
的滑块位置。在不重新渲染页面的情况下,左右滑动不受影响。
在页面重新渲染后,虽然 onChange
中获取到的 current
值是相应变化的,但如果不动态绑定 current
的值,Swiper
视图一定会返回 index 为 1
的滑块位置。
<swiper
circular
vertical
:current="1" // <- currentSwiperIndex
@change="handleChange"
>
<swiper-item>
<view class='demo-text-1'>1</view>
</swiper-item>
<swiper-item>
<view class='demo-text-2'>2</view>
</swiper-item>
<swiper-item>
<view class='demo-text-3'>3</view>
</swiper-item>
</swiper>
<view
class="part-loading"
v-if="partLoading"
>
<at-activity-indicator></at-activity-indicator>
</view>
const partLoading = ref(false)
const currentSwiperIndex = ref(1)
function handleChange(e) {
const { current, source } = e.detail
if (source === 'touch') {
console.log(current)
// currentSwiperIndex.value = current
partLoading.value = !partLoading.value // 触发页面重新渲染
}
}
from taro-ui-vue3.
你可以试试 react 版本存在这个问题吗?
react
版本也有问题,但不知道是不是同一个问题。react
版本滑动第一次没问题,第二次swiper
的current
会变成 -1,日历面板成白板了
from taro-ui-vue3.
你可以试试 react 版本存在这个问题吗?
react
版本也有问题,但不知道是不是同一个问题。react
版本滑动第一次没问题,第二次swiper
的current
会变成 -1,日历面板成白板了
React
、Vue 2.0
、Vue 3.0
这三个版本的的 Taro UI
都存在同样的问题。React
版本因为缺乏维护,问题更多。
from taro-ui-vue3.
你可以试试 react 版本存在这个问题吗?
react
版本也有问题,但不知道是不是同一个问题。react
版本滑动第一次没问题,第二次swiper
的current
会变成 -1,日历面板成白板了
React
、Vue 2.0
、Vue 3.0
这三个版本的的Taro UI
都存在同样的问题。React
版本因为缺乏维护,问题更多。
是的,所以我React
都写完了,又转向Vue 3.0
了,没人维护很尴尬
from taro-ui-vue3.
已发 alpha.13
from taro-ui-vue3.
Related Issues (20)
- 请问下 自定义的文件夹无法在 tsconfig.json设置别名吗? HOT 1
- 使用taro-ui-vue3在钉钉小程序报错 HOT 3
- List item onClick/onSwitchChange 应该是action不是props HOT 3
- Taro2.x还是Taro3.x HOT 2
- imagepicker @image-pick=H5图片点击放大效果不生效 HOT 2
- VirtualScroll :itemHeight 单位固定成为了px,无法适配小程序 HOT 3
- '@tarojs/components' does not contain an export named 'View'.
- 如何使用AtTabBar作为自定义tabbar HOT 1
- class多级嵌套下,报错TypeError: insertionPoint.insertAdjacentHTML is not a function HOT 3
- 希望VirtualScroll增加一个列表数据为空的时候显示的结构 HOT 2
- 停止维护通知
- 关于滑动条范围选择组件AtRange小程序模拟器/真机演示不能拖动选择的问题 HOT 3
- 兄弟们 Taroify 也是一个不错的选择
- SwipeAction 第一次触发无反应 HOT 4
- at-search-bar组件的onClear事件无效 HOT 5
- SearchBar怎么一点击搜索那个文字就自动清空了的? HOT 2
- Taro Vue 3.0 报错: SVGElement is not defined HOT 6
- AtSwipeAction 出现相同的id swipeAction-2020 HOT 2
- `AtFloatLayout` 组件滚动穿透问题。 HOT 2
- 全局引入报错 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taro-ui-vue3.