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
📌 Upgrade Changes 升级变化 (2.7.2) #15834
Comments
2.5.02024-01-10 Compatibility 兼容性Please make sure your browser supports ES2021 and related CSS features such as flex gap. 请确保您的浏览器支持 ES2021 及相关 CSS 特性,如 flex gap 等。
select & select-v2 #15352The default width of components are 100%. Inline forms could cause the components width to be non-adaptive. It is recommended to manually set a fixed width style, for example: 组件默认宽度为100%,行内表单会造成组件宽度无法自适应。建议手动设置固定宽度样式,例如: .el-form--inline {
.el-form-item {
& > .el-input, .el-cascader, .el-select, .el-date-editor, .el-autocomplete {
width: 240px;
}
}
} |
2.5.42024-02-02 tabs #15733The
|
2.6.02024-03-01 checkbox & radio #15525Distinguish between
区分 Group 模式下 checkbox 中 select & select-v2 #15995When there is an empty string In single select mode, clear select returns 当 单选模式下清空 select 会返回 button #16002Remove 移除 |
2.7.02024-04-12 empty-values & value-on-clear #16361In order to support custom clear value and conditions for determining the empty value, two props are added.
为了支持自定义清空值和确定空值的条件,添加了两个参数。
Support 支持
Demo<template>
<el-config-provider :value-on-clear="null" :empty-values="[undefined, null]">
<div class="flex flex-wrap gap-4 items-center">
<el-select
v-model="value1"
clearable
placeholder="Select"
style="width: 240px"
@change="handleChange"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select-v2
v-model="value2"
clearable
placeholder="Select"
style="width: 240px"
:options="options"
:value-on-clear="() => undefined"
@change="handleChange"
/>
</div>
</el-config-provider>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
const value1 = ref('')
const value2 = ref('')
const options = [
{
value: '',
label: 'All',
},
{
value: 'Option1',
label: 'Option1',
},
{
value: 'Option2',
label: 'Option2',
},
{
value: 'Option3',
label: 'Option3',
},
{
value: 'Option4',
label: 'Option4',
},
{
value: 'Option5',
label: 'Option5',
},
]
const handleChange = (value) => {
if ([undefined, null].includes(value)) {
ElMessage.info(`The clear value is: ${value}`)
}
}
</script> Deprecate the dynamic recognition of empty string usage of #15995, as it is not possible to determine if an empty string exists by options in a remote search. Please use 废弃 #15995 动态识别空字符串的用法,因为在远程搜索中,无法通过选项判断是否存在空字符串。请使用 |
2.7.22024-04-26 aria #16598
A11y 中的 Changed components List: 改动组件列表:
The checkbox 的 |
To make it easier for users to upgrade Element Plus, this issue will document the upgrade changes from version
2.5.0
.为了更好地方便用户升级 Element Plus,此 issue 将记录从
2.5.0
版本开始的升级变化。The text was updated successfully, but these errors were encountered: