Fix/message-box: messageBox prompt default value is null (#642)

* fix(message-box): fix validate failed style error

* fix(input): fix input's value is a 'null' string when modelValue is null
This commit is contained in:
Ryan2128 2020-11-22 19:02:33 +08:00 committed by GitHub
parent 95d28d48ea
commit 7897fa1ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -243,7 +243,7 @@ export default defineComponent({
resize: props.resize,
}))
const inputDisabled = computed(() => props.disabled || elForm.disabled)
const nativeInputValue = computed(() => String(props.modelValue))
const nativeInputValue = computed(() => (props.modelValue === null || props.modelValue === undefined) ? '' : String(props.modelValue))
const upperLimit = computed(() => ctx.attrs.maxlength)
const showClear = computed(() => {
return props.clearable &&

View File

@ -77,7 +77,7 @@
color: $--messagebox-content-color;
font-size: $--messagebox-content-font-size;
}
@include e(container) {
position: relative;
}
@ -85,7 +85,7 @@
@include e(input) {
padding-top: 15px;
& input.invalid {
& div.invalid > input {
border-color: $--color-danger;
&:focus {
border-color: $--color-danger;