types: improve relation types (#9016)

This commit is contained in:
neverland
2021-07-12 20:54:19 +08:00
committed by GitHub
parent aedb8543e6
commit 0e05d8c908
28 changed files with 146 additions and 108 deletions
+11 -4
View File
@@ -3,7 +3,7 @@ import { computed, CSSProperties, defineComponent } from 'vue';
// Utils
import { createNamespace, addUnit, extend } from '../utils';
import { BORDER } from '../utils/constant';
import { GRID_KEY, GridProvide } from '../grid/Grid';
import { GRID_KEY } from '../grid/Grid';
// Composables
import { useParent } from '@vant/use';
@@ -28,7 +28,7 @@ export default defineComponent({
}),
setup(props, { slots }) {
const { parent, index } = useParent<GridProvide>(GRID_KEY);
const { parent, index } = useParent(GRID_KEY);
const route = useRoute();
if (!parent) {
@@ -113,8 +113,15 @@ export default defineComponent({
};
return () => {
const { center, border, square, gutter, reverse, direction, clickable } =
parent.props;
const {
center,
border,
square,
gutter,
reverse,
direction,
clickable,
} = parent.props;
const classes = [
bem('content', [