chore: install @vant/use
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
Reference in New Issue
Block a user