Skip to content

Commit

Permalink
fix: 修复 Switch 类型问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wanchun committed Jul 25, 2023
1 parent 719023d commit 1cf0e74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/switch/switch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { isEqual, isFunction } from 'lodash-es';
import { useTheme } from '../_theme/useTheme';
import getPrefixCls from '../_util/getPrefixCls';
import { useNormalModel } from '../_util/use/useModel';
import { CHANGE_EVENT } from '../_util/constants';
import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '../_util/constants';
import useFormAdaptor from '../_util/use/useFormAdaptor';
import LoadingOutlined from '../icon/LoadingOutlined';
import type { ExtractPublicPropTypes } from '../_util/interface';
Expand Down Expand Up @@ -64,6 +64,7 @@ export default defineComponent({
LoadingOutlined,
},
props: switchProps,
emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT],
setup(props, ctx) {
useTheme();
const [currentValue, updateCurrentValue] = useNormalModel(
Expand Down

0 comments on commit 1cf0e74

Please sign in to comment.