<template>
  <van-popup
    v-model="popUpVisible"
    :get-container="getContainer"
    :close-on-popstate="true"
    v-bind="$attrs"
    v-on="$listeners"
  >
    <slot />
  </van-popup>
</template>

<script>
/*
 * @Author: Liao.xiuli
 * @Date: 2021-09-18 11:18:59
 * @Last Modified by: Liao.xiuli
 * @Last Modified time: 2022-03-19 10:08:09
 */
export default {
  name: "WlPopUp",
  props: {
    value: {
      type: Boolean,
      default: false,
    },
    getContainer: {
      type: String,
      default: "body",
    },
  },
  data() {
    return {
      popUpVisible: false,
    };
  },
  watch: {
    value: {
      handler(val) {
        this.popUpVisible = val;
      },
      immediate: true,
    },
  },
};
</script>

<style lang="scss" scoped></style>
