element icon indicating copy to clipboard operation
element copied to clipboard

[Bug Report] How to disable the “status-icon” with “Select” in “Mixed input”?

Open skaiy opened this issue 8 years ago • 2 comments

#

Element UI version

2.0.10

OS/Browsers version

windows,sogou

Vue version

2.5.13

Reproduction Link

https://jsfiddle.net/g8ayby37/2/

Steps to reproduce

  1. “Select” in “Mixed input”
  2. “Select” has default value or disabled state
  3. Form validation has “status-icon”

What is Expected?

no “status-icon” at “Select”,when has default value or disabled state in “Mixed input”

What is actually happening?

has “status-icon” at “Select” (when has default value or disabled state)

20180103105901

skaiy avatar Jan 03 '18 03:01 skaiy

This bug is not easy to fix.

Form components may only contain one input component in the original design. If we include more than two inputs, it is impossible to know the input that need to be verified. Each input gets the FormItem from the inject option.

But I have a workaround. We can register a component to override the parent component provide option.

Vue.component('breakForm', {
  provide: {
    elForm: '',
    elFormItem: ''
  },

  render() {
    return this.$slots.default[0]
  }
})

online demo

QingWei-Li avatar Jan 03 '18 09:01 QingWei-Li

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 18 '19 05:02 stale[bot]