index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <!-- 账号权限 -->
  2. <template>
  3. <app-drawer class="role-auth" title="权限设置" width="680" v-model:show="show">
  4. <el-breadcrumb separator-icon="ArrowRight">
  5. <el-breadcrumb-item>当前角色</el-breadcrumb-item>
  6. <el-breadcrumb-item>{{ selectedRow.roleName }}</el-breadcrumb-item>
  7. </el-breadcrumb>
  8. <el-scrollbar height="300px">
  9. <el-tree :data="userMenus" :props="{ label: 'title' }" :expand-on-click-node="false" show-checkbox
  10. check-on-click-node default-expand-all />
  11. </el-scrollbar>
  12. <template #footer>
  13. <el-button @click="show = false">取消</el-button>
  14. <el-button type="primary" @click="show = false">提交</el-button>
  15. </template>
  16. </app-drawer>
  17. </template>
  18. <script lang="ts" setup>
  19. import { ref, PropType } from 'vue'
  20. import { useMenu } from '@/hooks/menu'
  21. import AppDrawer from '@pc/components/base/drawer/index.vue'
  22. defineProps({
  23. selectedRow: {
  24. type: Object as PropType<Ermcp.UserRole>,
  25. default: () => ({})
  26. }
  27. })
  28. const { userMenus } = useMenu()
  29. const show = ref(true)
  30. </script>
  31. <style lang="less">
  32. @import './index.less';
  33. </style>