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

select-date属性不是响应式的? #131

Open
59637428 opened this issue Jul 7, 2022 · 3 comments
Open

select-date属性不是响应式的? #131

59637428 opened this issue Jul 7, 2022 · 3 comments

Comments

@59637428
Copy link

59637428 commented Jul 7, 2022

:select-date="rangeDate"
rangeDate定义为ref响应式,但是我通过函数更改rangeDate的值,日历组件内不会响应的高亮,只有初始设置的值生效

@xutian111
Copy link

大哥你的问题解决了么

@chenchen0224
Copy link

解决办法:

  1. vue:修改select-date 时,用 v-if 控制组件重新渲染
state.isShow = false
state.selectDate = ['2023-1-7', '2023-1-8']
nextTick(() => {
   state.isShow = true
})

注意:日期格式不带0才会生效,'2023-01-07'是不会被选中的

@1075951090
Copy link

用 v-if 控制组件重新渲染太消耗性能了,强烈要求作者select-date属性做成响应式

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

4 participants