element-plus / element-plus

🎉 A Vue.js 3 UI Library made by Element team

Home Page:https://element-plus.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Component] [input] input component: The clearable attribute is invalid

Kimberleeee opened this issue · comments

Bug Type: Component

Environment

  • Vue Version: 3.4.21
  • Element Plus Version: 2.6.3
  • Browser / OS: chrome/124.0.6367.201 windows10
  • Build Tool: Vite

Reproduction

Related Component

  • el-input

Reproduction Link

Element Plus Playground

Steps to reproduce

Create an input component with readonly and clearable attributes.

What is Expected?

The clearable attribute is valid

What is actually happening?

The clearable attribute is invalid when there is a value in the input component

Additional comments

When I want the user to click on the input component to display a popup and assign a value to the input component using the data in the popup, I need to use the readonly property, but I also need to use the clearable property to make the data clear

在input的定义中,readonly 属性规定输入字段为只读。可清除依旧是对数据的一种修改。所以我认为这不是一个问题,建议使用其他but来辅助实现