Skip to content

日期选择如果mode是['year', 'year'],面板点击选择的年份样式不会改变 #1321

@atzw1988

Description

@atzw1988
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.4.1

Environment

vue 3.9.3

Reproduction link

Edit on CodeSandbox

Steps to reproduce

<a-range-picker
:placeholder="['Start year', 'End year']"
format="YYYY"
:value.sync="valueYear"
:mode="modeYear"
@panelChange="handlePanelChange"
@change="handleChange"/>

modeYear: ['year', 'year'],
valueYear: []

handleChange (value) {
console.log(value)
this.valueYear = value
},
handlePanelChange (value, mode) {
console.log(mode)
this.valueYear = value
this.mode2 = [
mode[0] === 'date' ? 'year' : mode[0],
mode[1] === 'date' ? 'year' : mode[1]
]
}

What is expected?

面板点击的年份样式会发生变化

What is actually happening?

点击时不会发生变化,需要重新打开面板才会改变

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions