guoshilong
2023-09-11 11433d0f47eae3403e883fc26d72269b930235f2
src/components/Drawer/Drawer.vue
@@ -1,6 +1,6 @@
<template>
    <div class="drawer" :class="[show ? 'active':'none']" v-show="show">
        <div class="side-header">
    <div class="drawer" :style="[styleDrawer]" :class="[show ? 'active':'none']" v-show="show">
        <div v-if="isHeader" class="side-header">
            <div class="side-option flex-display flex-align-center flex-justify-between">
                <h2 class="title">{{ title }}</h2>
                <CloseOutlined @click="close" />
@@ -21,7 +21,19 @@
  },
  title: {
    type: String,
    required: true
    // required: true
  },
  // 是否显示头部
  isHeader: {
    type: Boolean,
    default: true
  },
  // 定位css
  styleDrawer: {
    type: Object,
    default: () => ({
      top: 0
    })
  }
})
const emits = defineEmits(['update:show'])