触发后,从屏幕一侧滑出的容器面板。
基本用法
触发后 popup
从屏幕边缘滑入,点击遮罩区关闭。
html
<iui-popup ref="popup" title="Title">
<view> Content area, click mask to close</view>
</iui-popup>
<script setup>
import { ref } from "vue";
const popup = ref(null);
onMounted(() => {
popup.value.open();
});
</script>
<iui-popup ref="popup" title="Title">
<view> Content area, click mask to close</view>
</iui-popup>
<script setup>
import { ref } from "vue";
const popup = ref(null);
onMounted(() => {
popup.value.open();
});
</script>
手势关闭
除了点击遮罩层关闭,popup
还可以通过 slide
属性控制手势关闭。
当前效果在 PC 端预览可能有误,请以实机效果为准
html
<iui-popup ref="popup" title="Title" slide>
<view> Content area, click mask to close</view>
</iui-popup>
<iui-popup ref="popup" title="Title" slide>
<view> Content area, click mask to close</view>
</iui-popup>
API
<Popup>
props<Popup>
events<Popup>
methods<Popup>
slots