diff --git a/src/grid-item/index.js b/src/grid-item/index.js index 992c148c4..d98585982 100644 --- a/src/grid-item/index.js +++ b/src/grid-item/index.js @@ -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 diff --git a/src/grid/index.js b/src/grid/index.js index 1854f7933..49b9794d0 100644 --- a/src/grid/index.js +++ b/src/grid/index.js @@ -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 () => (