Closed
Description
Version
latest
Vue Version
latest
Link to minimal reproduction
https://codesandbox.io/s/bitter-shadow-h5ep1v?file=/src/App.vue
Step to reproduce
<template>
<div>
<el-slider v-model="value" :max="max" @change="change"/>
value: {{ value }} max: {{ max }} ischangeEventTriggered: {{ischangeEventTriggered}}
<button @click="maxChange">
maxChange
</button>
<button @click="valChange">
valChange
</button>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const value = ref(5)
const max=ref(10)
const ischangeEventTriggered=ref(false)
const maxChange=()=>{
max.value=20
}
const valChange=()=>{
value.value=8
}
const change=(val)=>{
ischangeEventTriggered.value=true
}
</script>
<style scoped>
</style>
What is expected
No response
What is actually happening
- 修改传入的value的值 滑块位置不会立刻更新
- 修改传入的max/min tooltip位置对 但是滑块位置不对
Any additional comments (optional)
似乎只是style设置的不对,值是对的
其他组件库如element-plus
是支持动态修改的