Skip to content

Commit e73f7f7

Browse files
committed
+ Fix incorrect new status in v-model for checkbox.
1 parent aba6fb8 commit e73f7f7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/directives/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import type { VNodeChildren, VNodeData, VNodeDirective } from 'vue'
22
import type { Ref } from '@vue/composition-api'
33
import { paramCase } from 'change-case'
4-
import { checkIsRefObj, isBoolean, isNumber, isString } from '../utils'
5-
import { getCurrentInstance } from '../runtime'
4+
import { isString } from '../utils'
65
import { dealWithVModel } from './v-model'
76
import { TagType } from '../type'
87
import { dealWithVText } from './v-text'

lib/directives/v-model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const dealWithVModel = (
9292
vNodeData.on.change = (event: Event) => {
9393
const target = event.target as HTMLInputElement
9494
const isValueSpecified = !isUndefined(config.value)
95-
const newCheckStatus = !target.checked
95+
const newCheckStatus = target.checked
9696
if (isString(bindingTarget)) {
9797
instance[bindingTarget] = isValueSpecified
9898
? target.value

0 commit comments

Comments
 (0)