Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swipe-cell 真机下无法使用,操作无反馈;开发者工具可以正常预览、操作反馈。 #2500

Closed
makecoder opened this issue Dec 16, 2023 · 12 comments

Comments

@makecoder
Copy link

swipe-cell 无法使用

在开发者工具里预览正常,左滑有反馈,但是在真机上预览、真机调试、体验版左滑都无反馈。
开发者工具信息如下:
[system] WeChatLib: 3.0.1 (2023.8.30 19:21:49)
[system] Subpackages: N/A
[system] LazyCodeLoading: true

开发调试所用的手机设备如下:
华为 P30 pro(鸿蒙3.0.0):微信版本8.0.43
iPhone13(iOS15.5):微信版本8.0.44

代码如下

huadong.json

{
  "usingComponents": {
    "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell",
    "t-cell": "tdesign-miniprogram/cell/cell"
  }
}

huadong.js

//开发者默认生成的代码,无改动

huadong.wxml

<!--pages/huadong/huadong.wxml-->
<view style="margin-top: 300rpx;background-color: aquamarine;">pages/huadong/huadong.wxml</view>
<t-swipe-cell opened="{{true}}">
  <t-cell title="左滑多操作" note="辅助信息" bordered="{{true}}" />
  <view slot="right" class="btn-wrapper">
    <view class="btn favor-btn" bind:tap="onFavor">收藏</view>
    <view class="btn edit-btn" bind:tap="onEdit">编辑</view>
    <view class="btn delete-btn" bind:tap="onDelete">删除</view>
  </view>
</t-swipe-cell>

huadong.wxss

/* pages/huadong/huadong.wxss */

.btn-wrapper {
  height: 100%;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 120rpx;
  height: 100%;
  color: white;
}

.delete-btn {
  background-color: #e34d59;
}

.copy-btn {
  background-color: var(--td-brand-color);
}

.favor-btn {
  background-color: #0052d9;
}

.column {
  flex-direction: column;
}

.padding-bottom {
  padding-bottom: 8rpx;
}
Copy link
Contributor

👋 @makecoder,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@jarmywang jarmywang added bug Something isn't working and removed bug Something isn't working labels Dec 21, 2023
@jarmywang
Copy link
Collaborator

麻烦升级到最新的1.2.6版本,我这边真机看没问题呢

@makecoder
Copy link
Author

在PC端预览是,左滑动时控制台的输出很多行:

7879944a7880c2b4eba6800704df649a-8501-V0FTZXJ2aWNlTWFpbkNvbnRleHQuanM=.cachedata:1 Component "miniprogram_npm/tdesign-miniprogram/swipe-cell/swipe-cell" does not have a method "function(...e){const o=gdc(e,void 0===t?"nv_":void 0),r=n.apply(i,o);return gdc(r,t)}" to handle event "touchmove".

微信截图_20231223205041

@makecoder
Copy link
Author

另外我版本就是1.2.6.
手机真机调试时,控制台输出:
微信图片_20231223205406

@makecoder
Copy link
Author

微信截图_20231223205814

@GitHub-ydp
Copy link

您好,请问这个问题解决了吗?我看怎么关闭问题了呢,一模一样的问题,但是官方的模板好使,相关的依赖也都一样的安装了,还是不行

@OrionMark
Copy link

我也遇到了 真机无法左滑的问题

@makecoder
Copy link
Author

您好,请问这个问题解决了吗?我看怎么关闭问题了呢,一模一样的问题,但是官方的模板好使,相关的依赖也都一样的安装了,还是不行

没有解决,试了好多手机,都不行。官方自己觉得没有问题就直接关问题,多少有点草率。

@makecoder
Copy link
Author

@jarmywang 关注一下我们的问题,谢谢!

@makecoder
Copy link
Author

@jarmywang 关注一下我们的问题,谢谢!

@makecoder
Copy link
Author

您好,请问这个问题解决了吗?我看怎么关闭问题了呢,一模一样的问题,但是官方的模板好使,相关的依赖也都一样的安装了,还是不行

@GitHub-ydp @AvenirZheng
我通过删除app.json的“lazyCodeLoading”: “requiredComponents"配置解决了。

@GitHub-ydp
Copy link

@makecoder 谢谢您,用这个方式我这也好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants