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
+4 -3
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