TagUI icon indicating copy to clipboard operation
TagUI copied to clipboard

how to click 'rate' and 'slider' in tagui - try this

Open limengtaylor opened this issue 2 years ago • 1 comments

https://ant.design/components/rate-cn/ image how to spot it's half or not when i want to click? https://ant.design/components/slider-cn/ image how to set different value by click in tagui

limengtaylor avatar Aug 23 '22 03:08 limengtaylor

Hi @limengtaylor you can try this for the stars:

https://ant.design/components/rate-cn/
star = 0
for n from 1 to 5
	read //*[@id="components-rate-demo-half"]/section[1]/ul/li[`n`]/@class to x
	if x contains "ant-rate-star-half"
		star = star + 0.5
	if x contains "ant-rate-star-full"
		star = star + 1
echo `star`

For slider you can try something like this:

https://ant.design/components/slider-cn/
dom begin
document.getElementsByClassName("ant-slider-track")[0].style.width = "100%"
document.getElementsByClassName("ant-slider-handle")[0].style.left = "100%";
document.getElementsByClassName("ant-slider-handle")[0].ariaValueNow = "100"
dom finish

ruthtxh avatar Aug 25 '22 07:08 ruthtxh