mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(Grid): use relation
This commit is contained in:
parent
a583c83c25
commit
da6925aee9
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user