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

uni-swipe-action-item生产环境类名丢失 #732

Open
yaomk opened this issue Apr 4, 2023 · 1 comment
Open

uni-swipe-action-item生产环境类名丢失 #732

yaomk opened this issue Apr 4, 2023 · 1 comment

Comments

@yaomk
Copy link

yaomk commented Apr 4, 2023

  • 问题描述:uni-swipe-action-item 设置 class 类名 swipe-item-f,开发环境样式正常,打包后类名丢失。
  • uni-swipe-action 版本:1.3.7
  • 版本构建相关:"vue": "^3.2.45", "vite": "4.1.4"
  • 项目构建方式:npx degit dcloudio/uni-preset-vue#vite my-vue3-project
  • 运行环境:h5
  • 代码示例:
<template>
  <view class="content">
    <view class="text-area">
      <text class="title">{{ title }}</text>
    </view>
    <uni-swipe-action class="swipe-action-content">
      <!-- 使用插槽 (请自行给定插槽内容宽度)-->
      <uni-swipe-action-item class="swipe-item-f">
        <view>
          <text>使用插槽</text>
        </view>
        <template #right>
          <view style="margin-left: 10rpx;"><text style="color: red;">删除</text></view>
        </template>
      </uni-swipe-action-item>
    </uni-swipe-action>
  </view>
</template>

<script>
export default {
  data() {
    return {
      title: 'Hello',
    }
  },
  onLoad() { },
  methods: { },
}
</script>

<style lang="scss" scoped>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}

.swipe-action-content {
  width: 100%;
  height: 50rpx;
  background-color: #f3f3f3;
  .swipe-item-f {
    color: aqua;
  }
}
</style>
  • 开发环境,类名生效
    开发环境

  • 打包后查看,类名丢失,静态资源里有返回
    生产环境
    打包后静态资源

@18148764734
Copy link
Contributor

感谢反馈,已复现该问题,正在排查

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

2 participants