fix(components): [select-v2] set model-value default to undefined (#21540)

* fix(components): [select-v2] set `model-value` default to `undefined`

* test: test
This commit is contained in:
Noblet Ouways
2025-07-31 05:31:43 +02:00
committed by GitHub
parent 09df413426
commit 822a5796b9
2 changed files with 10 additions and 0 deletions

View File

@@ -254,6 +254,15 @@ describe('Select', () => {
)
})
it('should show placeholder when no model-value setted', async () => {
const wrapper = _mount('<el-select :options="[]"></el-select>')
expect(
wrapper
.find('.el-select__selected-item.el-select__placeholder > span')
.text()
).toBe('Select')
})
it('default value', async () => {
const wrapper = createSelect({
data: () => ({

View File

@@ -136,6 +136,7 @@ export const selectV2Props = buildProps({
type: definePropType<
any[] | string | number | boolean | Record<string, any> | any
>([Array, String, Number, Boolean, Object]),
default: undefined,
},
/**
* @description is multiple