mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(checkbox): fix checkbox migrate error (#1293)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
{ 'is-bordered': border },
|
||||
{ 'is-checked': isChecked }
|
||||
]"
|
||||
:aria-controls="indeterminate ? controls : null"
|
||||
>
|
||||
<span
|
||||
class="el-checkbox__input"
|
||||
@@ -60,8 +61,6 @@
|
||||
<script lang='ts'>
|
||||
import {
|
||||
defineComponent,
|
||||
getCurrentInstance,
|
||||
onMounted,
|
||||
PropType,
|
||||
} from 'vue'
|
||||
import { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'
|
||||
@@ -109,21 +108,7 @@ export default defineComponent({
|
||||
},
|
||||
emits: [UPDATE_MODEL_EVENT, 'change'],
|
||||
setup(props) {
|
||||
const { focus, isChecked, isDisabled, checkboxSize, model, handleChange } = useCheckbox(props)
|
||||
const instance = getCurrentInstance()
|
||||
|
||||
onMounted(() => {
|
||||
instance.vnode.el.setAttribute('aria-controls', props.controls)
|
||||
})
|
||||
|
||||
return {
|
||||
focus,
|
||||
isChecked,
|
||||
isDisabled,
|
||||
checkboxSize,
|
||||
model,
|
||||
handleChange,
|
||||
}
|
||||
return useCheckbox(props)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user