Skip to content

Commit

Permalink
fix(checkbox): 获取子元素失败
Browse files Browse the repository at this point in the history
  • Loading branch information
QiuShuiBai committed Mar 18, 2024
1 parent 994919c commit d576cb9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/mpx-cube-ui/src/components/checkbox-group/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ createSelectComponent({
setCheckboxValue () {
let checkboxs
if (isWeb) {
checkboxs = this.$children[0].$children
checkboxs = this.$children
if (typeof checkboxs[0].isChecked !== 'boolean') {
// mpx 转 web 有版本多了一层空的 component
checkboxs = checkboxs[0].$children
}
} else {
checkboxs = this.usingMpSlot ? this.getRelationNodes(Checkbox) : this.$refs.checkboxRef
}
Expand Down

0 comments on commit d576cb9

Please sign in to comment.