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

Rate组件设置半星显示异常 #594

Closed
1 of 7 tasks
liujunminx opened this issue Dec 11, 2023 · 3 comments
Closed
1 of 7 tasks

Rate组件设置半星显示异常 #594

liujunminx opened this issue Dec 11, 2023 · 3 comments

Comments

@liujunminx
Copy link

这个 Issue 涉及以下平台:

  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 头条小程序
  • 快手小程序
  • QQ 轻应用
  • Web 平台(H5)

BUG 描述
Rate组件设置半星显示异常
复现步骤
加入allowHalf

<Rate allowHalf value={scoreServer} onChange={(e) => this.setState({scoreServer: e.detail})}/>

期望结果

实际结果
半星显示在正常全星后面
截图
image

环境

"dependencies": {
  "@antmjs/vantui": "^2.5.3",
  "@babel/runtime": "^7.7.7",
  "@tarojs/components": "3.6.2",
  "@tarojs/plugin-framework-react": "3.6.2",
  "@tarojs/plugin-sass": "^2.2.10",
  "@tarojs/react": "3.6.2",
  "@tarojs/runtime": "3.6.2",
  "@tarojs/taro": "3.6.2",
  "@vant/area-data": "^1.4.1",
  "dva-core": "^2.0.4",
  "dva-immer": "^0.5.2",
  "jsencrypt": "^3.3.1",
  "react": "^17.0.0",
  "react-dom": "^17.0.0",
  "react-redux": "^7.2.0",
  "redux": "^4.0.0",
  "redux-logger": "^3.0.6",
  "redux-thunk": "^2.3.0",
  "taro-ui": "^3.0.0-alpha.9",
  "weapp-qrcode": "^1.0.0",
  "xlsx": "^0.18.5"
}
npm: 8.19.4
node: v16.20.0

附加信息

@zuolung
Copy link
Contributor

zuolung commented Dec 21, 2023

/* eslint-disable */
import react from 'react'
import { Rate } from '@antmjs/vantui'

export default function Demo() {
  const [value, setValue] = react.useState(4.5)

  return (
    <Rate
      value={value}
      allowHalf
      voidIcon="star"
      voidColor="#eee"
      onChange={(e) => setValue(e.detail)}
    />
  )
}

@zuolung
Copy link
Contributor

zuolung commented Dec 21, 2023

未复现

@liujunminx
Copy link
Author

可能是环境哪里有问题,我这环境配的挺乱的,原有的node_modules都删不了,删了重新yarn install然后运行会报

Module not found: Error: Can't resolve '@antmjs/vantui/es/power-scroll-view/style/less' in 'D:\Project\xxx'
resolve '@antmjs/vantui/es/power-scroll-view/style/less' in 'D:\Project\xxx'
Parsed request is a module
using description file: D:\Project\xxx)
resolve as module
D:\Project\xxx\node_modules doesn't exist or is not a directory

@zuolung zuolung closed this as completed May 24, 2024
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