chore: install @vant/use

This commit is contained in:
chenjiahan
2020-09-10 21:15:16 +08:00
parent 38edb83f37
commit df0a055ce6
4 changed files with 7 additions and 11 deletions
+1 -1
View File
@@ -16,8 +16,8 @@ import {
} from '../utils';
// Composition
import { useToggle } from '@vant/use';
import { useHeight } from '../../composition/use-rect';
import { useToggle } from '../../composition/use-toggle';
import { usePublicApi } from '../../composition/use-public-api';
// Components
-10
View File
@@ -1,10 +0,0 @@
import { ref } from 'vue';
export function useToggle(defaultValue = false) {
const state = ref(defaultValue);
const setState = (value: boolean) => {
state.value = value;
};
return [state, setState];
}