<template>
  <van-action-sheet
    v-model="actionSheetVisible"
    :cancel-text="cancelText"
    close-on-click-action
    close-on-popstate
    v-bind="$attrs"
    v-on="$listeners"
  >
    <slot />
  </van-action-sheet>
</template>

<script>
/*
 * @Author: Liao.xiuli
 * @Date: 2021-09-18 11:18:59
 * @Last Modified by: Liao.xiuli
 * @Last Modified time: 2022-03-09 16:56:10
 */
export default {
  name: "WlActionSheet",
  props: {
    value: {
      type: Boolean,
      default: false,
    },
    cancelText: {
      type: String,
      default: "取消",
    },
  },
  data() {
    return {
      actionSheetVisible: false,
    };
  },
  watch: {
    value: {
      handler(val) {
        this.actionSheetVisible = val;
      },
      immediate: true,
    },
  },
};
</script>

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