微信小程序 vant-weapp的 SwipeCell 滑动单元格 van-swipe-cell 滑动单元格不显示 和 样式问题 滑动后删除样式不显示

在微信小程序开发过程中 遇到个坑 此处引用 swipeCell 组件 刚开始是组件不显示 然后又遇到样式不生效

在这里插入图片描述

首先排除问题

  1. 是否在.json文件中引入了组件
{
  "usingComponents": {
    "van-swipe-cell": "@vant/weapp/swipe-cell/index",
    "van-cell-group": "@vant/weapp/cell-group/index",
    "van-cell": "@vant/weapp/cell/index",
  },
  "navigationBarTitleText": "收货地址"
}

  1. 是否在 wxml中引入了该组件
<van-swipe-cell right-width="{{ 65 }}" left-width="{{ 65 }}">
  <view slot="left" class="van-swipe-cell__left">选择</view>
  <van-cell-group>
    <van-cell title="单元格" value="内容" />
  </van-cell-group>
  <view slot="right" class="van-swipe-cell__right">删除</view>
</van-swipe-cell>

排除了以上问题 swipeCell 显示了 但是 左右滑动 样式不对
在这里插入图片描述

解决办法

在 .scss 文件中 自己写样式吧

.van-swipe-cell__right {
  display: inline-block;
  width: 65px;
  height: 67px;
  font-size: 15px;
  line-height: 67px;
  color: #fff;
  text-align: center;
  background-color: #f44;
}

.van-swipe-cell__left {
  background-color: #07c160;
}

各位大佬 有没有其它解决办法 麻烦 留言指教下 拜托拜托!!

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-18 07:48:02       70 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-18 07:48:02       74 阅读
  3. 在Django里面运行非项目文件

    2024-07-18 07:48:02       62 阅读
  4. Python语言-面向对象

    2024-07-18 07:48:02       72 阅读

热门阅读

  1. cv2:Laplacian详解

    2024-07-18 07:48:02       23 阅读
  2. 自然语言处理NLP--LDA面试题

    2024-07-18 07:48:02       20 阅读
  3. uniapp 获取自定义组件的高度

    2024-07-18 07:48:02       23 阅读
  4. 控制台小游戏制作——贪吃蛇

    2024-07-18 07:48:02       19 阅读
  5. Python高级函数技术:闭包、装饰器与回调

    2024-07-18 07:48:02       25 阅读
  6. 07. Hibernate 会话工厂(SessionFactory)

    2024-07-18 07:48:02       23 阅读
  7. 网络抓包工具tcpdump的使用

    2024-07-18 07:48:02       22 阅读
  8. 构建之源:深入解析Gradle的settings.gradle文件

    2024-07-18 07:48:02       22 阅读