chore(Grid): use relation

This commit is contained in:
chenjiahan 2020-09-25 17:14:11 +08:00
parent a583c83c25
commit da6925aee9
2 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@ import { BORDER } from '../utils/constant';
import { GRID_KEY } from '../grid';
// Composition
import { useParent } from '../composition/use-parent';
import { useParent } from '../composition/use-relation';
import { useRoute, routeProps } from '../composition/use-route';
// Components

View File

@ -1,6 +1,6 @@
import { provide, reactive } from 'vue';
import { createNamespace, addUnit } from '../utils';
import { BORDER_TOP } from '../utils/constant';
import { useChildren } from '../composition/use-relation';
const [createComponent, bem] = createNamespace('grid');
@ -28,8 +28,9 @@ export default createComponent({
},
setup(props, { slots }) {
const children = reactive([]);
provide(GRID_KEY, { props, children });
const { linkChildren } = useChildren(GRID_KEY);
linkChildren({ props });
return () => (
<div