feat(directive): 添加自定义指令directive实现按钮权限控制

This commit is contained in:
郝先瑞
2022-01-23 18:03:18 +08:00
parent 1c3b5f3bec
commit 7c8326c7c5
6 changed files with 144 additions and 96 deletions

View File

@@ -163,16 +163,21 @@
</template>
<script setup lang="ts">
// Vue依赖
import {onMounted, reactive, unref, ref, toRefs} from 'vue'
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
// API依赖
import {listDeptTable, getDeptDetail, deleteDept, updateDept, addDept, listDeptSelect} from '@/api/system/dept'
// 组件依赖
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
import TreeSelect from '@/components/TreeSelect/Index.vue'
import {ElForm, ElMessage, ElMessageBox} from 'element-plus'
// DOM元素的引用声明定义
const queryFormRef = ref(ElForm)
const dataFormRef = ref(ElForm)
const state = reactive({
// 选中ID数组
ids: [],