admin-vben5/playground/src/views/examples/modal/blur-demo.vue

24 lines
521 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script lang="ts" setup>
import { ref, watch } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { Slider } from 'ant-design-vue';
const blur = ref(5);
const [Modal, modalApi] = useVbenModal({
overlayBlur: blur.value,
});
watch(blur, (val) => {
modalApi.setState({
overlayBlur: val,
});
});
</script>
<template>
<Modal title="遮罩层模糊">
<p>调整滑块来改变遮罩层模糊程度{{ blur }}</p>
<Slider v-model:value="blur" :max="30" :min="0" />
</Modal>
</template>