demo5.vue 820 B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <m-button @click="drawerShow=true">点击打开</m-button>
  3. <m-drawer
  4. v-model="drawerShow"
  5. custom-class="customClass"
  6. :wrapperClosable="false">
  7. <template #header>
  8. <i class="iconfont icon-email" style="font-size: 17px"></i> 新的邮件
  9. </template>
  10. <div>
  11. <m-input v-model="value" placeholder="请输入" clearable></m-input>
  12. <p>输入的值为:{{value}}</p>
  13. </div>
  14. <template #footer>
  15. <span class="drawer-footer">
  16. <m-button @click="drawerShow = false" style="margin-right: 20px">取消</m-button>
  17. <m-button type="primary" @click="drawerShow = false">确定</m-button>
  18. </span>
  19. </template>
  20. </m-drawer>
  21. </template>
  22. <script setup>
  23. import { ref } from "vue";
  24. const drawerShow = ref(false);
  25. const value = ref('');
  26. </script>