chore: migrate to useCustomFieldValue (#9201)

This commit is contained in:
neverland
2021-08-07 16:22:02 +08:00
committed by GitHub
parent 6de05f45d2
commit 1bfcbab2fa
36 changed files with 113 additions and 103 deletions

View File

@@ -1,6 +1,6 @@
import { defineComponent } from 'vue';
import { createNamespace, addUnit, unknownProp } from '../utils';
import { useLinkField } from '../composables/use-link-field';
import { useCustomFieldValue } from '@vant/use';
import { Loading } from '../loading';
const [name, bem] = createNamespace('switch');
@@ -45,7 +45,7 @@ export default defineComponent({
}
};
useLinkField(() => props.modelValue);
useCustomFieldValue(() => props.modelValue);
return () => {
const { size, loading, disabled, activeColor, inactiveColor } = props;