<template>
  <van-popover v-model="popUpVisible" trigger="click" v-bind="$attrs" v-on="$listeners">
    <template #default>
      <slot />
    </template>
    <template #reference>
      <slot name="reference" />
    </template>
  </van-popover>
</template>

<script>
/*
 * @Author: Liao.xiuli
 * @Date: 2021-09-18 11:18:59
 * @Last Modified by: Liao.xiuli
 * @Last Modified time: 2021-10-13 15:53:51
 */
export default {
  name: "WlPopOver",
  props: {
    value: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      popUpVisible: false,
    };
  },
  watch: {
    value: {
      handler(val) {
        this.popUpVisible = val;
      },
      immediate: true,
    },
  },
};
</script>

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