2023-01-31 14:20:43 +00:00
|
|
|
<docs>
|
|
|
|
---
|
|
|
|
order: 10
|
|
|
|
title:
|
|
|
|
zh-CN: useBreakpoint Hook
|
|
|
|
en-US: useBreakpoint Hook
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
使用 `useBreakpoint` 个性化布局。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Use `useBreakpoint` Hook provide personalized layout.
|
|
|
|
|
|
|
|
</docs>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
Current break point:
|
|
|
|
<template v-for="(value, key) in screens">
|
2023-02-17 14:01:30 +00:00
|
|
|
<a-tag v-if="!!value" :key="key" color="blue">
|
2023-01-31 14:20:43 +00:00
|
|
|
{{ key }}
|
|
|
|
</a-tag>
|
|
|
|
</template>
|
|
|
|
</template>
|
2023-04-28 06:08:21 +00:00
|
|
|
<script lang="ts" setup>
|
2023-01-31 14:20:43 +00:00
|
|
|
import { Grid } from 'ant-design-vue';
|
|
|
|
|
|
|
|
const useBreakpoint = Grid.useBreakpoint;
|
2023-04-28 06:08:21 +00:00
|
|
|
const screens = useBreakpoint();
|
2023-01-31 14:20:43 +00:00
|
|
|
</script>
|