| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <view v-if="showPopup" class="popup-mask">
- <view class="popup-content">
- <view class="close-button" @click="closePopup">×</view>
- <slot></slot>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- showPopup: {
- type: Boolean,
- default: false
- }
- },
- methods: {
- closePopup() {
- this.$emit('close');
- }
- }
- };
- </script>
- <style>
- .popup-mask {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .popup-content {
- /* Styling for the popup content */
- background-color: rgba(255, 255, 255, 0.9);
- width: 100%;
- height: 68%;
- padding: 30rpx;
- }
- .close-button {
- position: absolute;
- top: 60rpx;
- right: 30rpx;
- font-size: 38rpx;
- color: #fff;
- cursor: pointer;
- width: 46rpx;
- height: 46rpx;
- line-height: 46rpx;
- text-align: center;
- border-radius: 50%;
- background-color: rgba(255, 255, 255, 0.5);
- }
- </style>
|