opentiny / tiny-vue

TinyVue is an enterprise-class UI component library of OpenTiny community, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
https://opentiny.design/tiny-vue
MIT License
1.68k stars 266 forks source link

🐛 [Bug]: [slider] When the Slider component v-model is an array, when you change the value of the array, the range of the slider will not change. #1007

Closed AcWrong02 closed 10 months ago

AcWrong02 commented 11 months ago

Version

latest

Vue Version

latest

Link to minimal reproduction

https://opentiny.design/vue-playground?mode=pc&theme=default#3.11|eyJzcmMvQXBwLnZ1ZSI6IjxzY3JpcHQgbGFuZz1cInRzeFwiPlxyXG4vLyDlvJXlhaUgQG9wZW50aW55L3Z1ZSDnu4Tku7ZcclxuaW1wb3J0IHsgQnV0dG9uLCBMaW5rIH0gZnJvbSAnQG9wZW50aW55L3Z1ZSdcclxuXHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICBjb21wb25lbnRzOiB7XHJcbiAgICBUaW55QnV0dG9uOiBCdXR0b24sXHJcbiAgICBUaW55TGluazogTGlua1xyXG4gIH0sXHJcbiAgZGF0YSgpIHtcclxuICAgIHJldHVybiB7XHJcbiAgICAgIG1zZzogJ2hlbGxvIHdvcmxkISdcclxuICAgIH1cclxuICB9XHJcbn1cclxuPC9zY3JpcHQ+XHJcblxyXG48dGVtcGxhdGU+XHJcbiAgPFRpbnlCdXR0b24+56Gu5a6aPC9UaW55QnV0dG9uPlxyXG4gIDxoMT57eyBtc2cgfX08L2gxPlxyXG4gIDxkaXYgY2xhc3M9XCJ0aW55dnVlXCI+XHJcbiAgICA8ZGl2IGNsYXNzPVwidGlueXZ1ZS1wYWdlXCI+XHJcbiAgICAgIHRpbnl2dWVcclxuICAgICAgPHRpbnktbGluayB0eXBlPVwic3VjY2Vzc1wiIGhyZWY9J2h0dHBzOi8vZ2l0aHViLmNvbS9vcGVudGlueS90aW55LXZ1ZSc+XHJcbiAgICAgICAgdGlueXZ1ZVxyXG4gICAgICA8L3RpbnktbGluaz5cclxuICAgIDwvZGl2PlxyXG4gIDwvZ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XCIsXHJcbiAgICBcIm1vZHVsZVwiOiBcIkVTTmV4dFwiLFxyXG4gICAgXCJtb2R1bGVSZXNvbHV0aW9uXCI6IFwiQnVuZGxlclwiLFxyXG4gICAgXCJhbGxvd0ltcG9ydGluZ1RzRXh0ZW5zaW9uc1wiOiB0cnVlXHJcbiAgfSxcclxuICBcInZ1ZUNvbXBpbGVyT3B0aW9uc1wiOiB7XHJcbiAgICBcInRhcmdldFwiOiAzLjNcclxuICB9XHJcbn1cclxuIiwibWF4LW1pbi52dWUiOiI8dGVtcGxhdGU+XG4gIDx0aW55LXNsaWRlciB2LW1vZGVsPVwidmFsdWUzXCIgc3R5bGU9XCJtYXJnaW46NTBweFwiPjwvdGlueS1zbGlkZXI+XG4gIDxidXR0b24gQGNsaWNrPVwiaGFuZGxlQ2xpY2tcIj5cbiAgICBjbGlja1xuICA8L2J1dHRvbj5cbjwvdGVtcGxhdGU+XG5cbjxzY3JpcHQgc2V0dXAgbGFuZz1cImpzeFwiPlxuaW1wb3J0IHsgcmVmIH0gZnJvbSAndnVlJ1xuaW1wb3J0IHsgU2xpZGVyIGFzIFRpbnlTbGlkZXIgfSBmcm9tICdAb3BlbnRpbnkvdnVlJ1xuXG5jb25zdCB2YWx1ZTMgPSByZWYoWzIwLCA0MF0pXG5jb25zdCBoYW5kbGVDbGljayA9ICgpPT57XG4gIHZhbHVlMy52YWx1ZSA9IFszMCw1MF1cbn1cbjwvc2NyaXB0PlxuIiwiX28iOnt9fQ==

Step to reproduce

  1. 打开playground
  2. 点击click观察效果

What is expected

点击完click之后,范围应该要跟着变化才对

What is actually happening

点击完click之后,范围应该没变,在鼠标悬浮上去之后才会变化

Any additional comments (optional)

No response

Issues-translate-bot commented 11 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: When the v-model of the Slider component is an array, when the value of the array is changed, the range of the slider will not change accordingly.

yoyo201626 commented 11 months ago

playground好像失效了 @AcWrong02 1234566

AcWrong02 commented 11 months ago

playground好像失效了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=

AcWrong02 commented 11 months ago

playground好像失效了 @AcWrong02 1234566

不知道为什么playground链接复制过来有问题,我把代码复制到下面了,还麻烦您复制到playground看一下效果

<template>
  <tiny-slider v-model="value3"></tiny-slider>
  <button @click="handleClick">
    click
  </button>
</template>

<script setup lang="jsx">
import { ref } from 'vue'
import { Slider as TinySlider } from '@opentiny/vue'

const value3 = ref([20, 40])

const handleClick = ()=>{
  value3.value = [10,50]
}
</script>
yoyo201626 commented 11 months ago

这个问题我来修复

Issues-translate-bot commented 11 months ago

Bot detected the issue body's language is not English, translate it automatically.


I'll fix this problem

AcWrong02 commented 11 months ago

这个问题我来修复

让我学习学习,哈哈^v^

Issues-translate-bot commented 11 months ago

Bot detected the issue body's language is not English, translate it automatically.


Let me fix this problem

Let me learn, haha^v^