<template>
<view>
<text>是否继续使用</text>
<switch type="switch" color="#FFCC33"/>
</view>
</template>
···

- 发布:2023-07-29 14:32
- 更新:2023-07-31 10:25
- 阅读:235
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10
HBuilderX类型: 正式
HBuilderX版本号: 3.8.7
手机系统: Android
手机系统版本号: Android 13
手机厂商: 小米
手机机型: redme K50
页面类型: vue
vue版本: vue2
打包方式: 离线
项目创建方式: HBuilderX
示例代码:
操作步骤:
<template>
<view>
<text>是否继续使用</text>
<switch type="switch" color="#FFCC33"/>
</view>
</template>
···
<template>
<view>
<text>是否继续使用</text>
<switch type="switch" color="#FFCC33"/>
</view>
</template>
···
预期结果:
<template>
<view>
<text>是否继续使用</text>
<switch type="switch" color="#FFCC33"/>
</view>
</template>
···
<template>
<view>
<text>是否继续使用</text>
<switch type="switch" color="#FFCC33"/>
</view>
</template>
···
实际结果:
<template>
<view>
<text>是否继续使用</text>
<switch type="switch" color="#FFCC33"/>
</view>
</template>
···
<template>
<view>
<text>是否继续使用</text>
<switch type="switch" color="#FFCC33"/>
</view>
</template>
···
bug描述:
在开发过程中,使用<switch/>组件,使用运行到Android App基座,在手机上<switch/>开关在默认关闭的情况下,会有一个带有×的矩形,并且颜色也没有改变。代码和现实bug如图。

