mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-18 01:32:50 +00:00
解决权限无法显示问题
This commit is contained in:
parent
43b3956640
commit
509719a643
@ -13,7 +13,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, inject, ref, watch } from "vue";
|
import { defineComponent, ref, watch } from "vue";
|
||||||
|
import { useCool } from "/@/cool";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-menu-perms",
|
name: "cl-menu-perms",
|
||||||
@ -28,7 +29,7 @@ export default defineComponent({
|
|||||||
emits: ["update:modelValue"],
|
emits: ["update:modelValue"],
|
||||||
|
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const service = inject<any>("service");
|
const { service } = useCool();
|
||||||
|
|
||||||
// 绑定值
|
// 绑定值
|
||||||
const value = ref<any[]>([]);
|
const value = ref<any[]>([]);
|
||||||
@ -67,6 +68,7 @@ export default defineComponent({
|
|||||||
const col = (i: number, d: any[]) => {
|
const col = (i: number, d: any[]) => {
|
||||||
const key = arr[i];
|
const key = arr[i];
|
||||||
|
|
||||||
|
if (d) {
|
||||||
const index = d.findIndex((e: any) => e.label == key);
|
const index = d.findIndex((e: any) => e.label == key);
|
||||||
|
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
@ -84,6 +86,7 @@ export default defineComponent({
|
|||||||
col(i + 1, d[d.length - 1].children || []);
|
col(i + 1, d[d.length - 1].children || []);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
col(0, list);
|
col(0, list);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user