mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix: update radio button
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
</span>
|
||||
</label>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script>
|
||||
import { useELEMENT } from 'src'
|
||||
import { computed, nextTick, ref } from 'vue'
|
||||
|
||||
export default {
|
||||
@@ -49,17 +49,12 @@ export default {
|
||||
},
|
||||
setup(props, ctx) {
|
||||
//todo: elFormItem elForm ELEMENT
|
||||
const elForm = null
|
||||
const elFormItem = null
|
||||
const ELEMENT = null
|
||||
const _radioGroup = {}
|
||||
const ELEMENT = {}
|
||||
const elForm = {}
|
||||
const elFormItem = {}
|
||||
const _radioGroup = inject('RadioGroup')
|
||||
const focus = ref(false)
|
||||
const isGroup = computed(() => {
|
||||
if (_radioGroup && _radioGroup.name === 'ElRadioGroup') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
const isGroup = computed(() => _radioGroup && _radioGroup.name === 'ElRadioGroup')
|
||||
const _elFormItemSize = computed(() => {
|
||||
return (elFormItem || {}).elFormItemSize
|
||||
})
|
||||
@@ -89,7 +84,6 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
// methods
|
||||
const handleChange = () => {
|
||||
nextTick(() => {
|
||||
// this.dispatch('ElRadioGroup', 'handleChange', this.value);
|
||||
|
||||
@@ -72,17 +72,10 @@ export default defineComponent({
|
||||
const elForm = null
|
||||
const elFormItem = null
|
||||
const ELEMENT = null
|
||||
|
||||
let _radioGroup
|
||||
const _radioGroup = inject('RadioGroup') as any
|
||||
const focus = ref(false)
|
||||
const parent: IRadioGroupInject = inject('RadioGroup')
|
||||
const isGroup = computed(() => {
|
||||
if (parent && parent.name === 'ElRadioGroup') {
|
||||
_radioGroup = parent
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
const isGroup = computed(() => _radioGroup && _radioGroup.name === 'ElRadioGroup')
|
||||
const _elFormItemSize = computed(() => {
|
||||
return (elFormItem || {}).elFormItemSize
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user