Skip to content

Commit

Permalink
feat(Popup): update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao committed Oct 12, 2022
1 parent 2c37941 commit d26514d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/popup/__test__/__snapshots__/demo.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ exports[`Popup > Popup mobileVue demo works fine 1`] = `
>
<div
class="t-overlay"
style="z-index: 1000; transition-duration: 300ms; display: none;"
style="background-color: rgba(0, 0, 0, 0.3); z-index: 1000; transition-duration: 300ms; display: none;"
>
Expand Down Expand Up @@ -814,7 +814,7 @@ exports[`Popup > Popup placementTopVue demo works fine 1`] = `
>
<div
class="t-overlay"
style="z-index: 1000; transition-duration: 300ms; display: none;"
style="background-color: rgba(0, 0, 0, 0.3); z-index: 1000; transition-duration: 300ms; display: none;"
>
Expand Down
5 changes: 4 additions & 1 deletion src/popup/demos/placement-top.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="button-group">
<t-button block variant="outline" size="large" @click="top = true">顶部弹出</t-button>
</div>
<t-popup v-model="top" placement="top">
<t-popup v-model="top" placement="top" :overlay-props="overlayProps">
<div style="height: 200px; background: #fff"></div>
</t-popup>
</div>
Expand All @@ -12,6 +12,9 @@
<script lang="ts" setup>
import { ref } from 'vue';
const overlayProps = {
customStyle: `background-color: rgba(0,0,0,.3)`, // 自定义遮罩层样式
};
const top = ref(false);
</script>

Expand Down

0 comments on commit d26514d

Please sign in to comment.