fix 修复 vue 类型识别问题
This commit is contained in:
@ -36,7 +36,7 @@ const show = ref(false);
|
||||
const fuse = ref();
|
||||
const headerSearchSelectRef = ref<ElSelectInstance>();
|
||||
const router = useRouter();
|
||||
const routes = computed(() => usePermissionStore().routes);
|
||||
const routes = computed(() => usePermissionStore().getRoutes());
|
||||
|
||||
const click = () => {
|
||||
show.value = !show.value;
|
||||
@ -149,7 +149,7 @@ watch(show, (value) => {
|
||||
}
|
||||
});
|
||||
|
||||
watch(searchPool, (list) => {
|
||||
watch(searchPool, (list: Router) => {
|
||||
initFuse(list);
|
||||
});
|
||||
</script>
|
||||
|
@ -81,14 +81,14 @@ const imageUploadRef = ref<ElUploadInstance>();
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
async (val) => {
|
||||
async (val: string) => {
|
||||
if (val) {
|
||||
// 首先将值转为数组
|
||||
let list: OssVO[] = [];
|
||||
if (Array.isArray(val)) {
|
||||
list = val as OssVO[];
|
||||
} else {
|
||||
const res = await listByIds(val as string);
|
||||
const res = await listByIds(val);
|
||||
list = res.data;
|
||||
}
|
||||
// 然后将数组转为对象数组
|
||||
|
@ -43,7 +43,7 @@ const router = useRouter();
|
||||
// 主题颜色
|
||||
const theme = computed(() => settingsStore.theme);
|
||||
// 所有的路由信息
|
||||
const routers = computed(() => permissionStore.topbarRouters);
|
||||
const routers = computed(() => permissionStore.getTopbarRoutes());
|
||||
|
||||
// 顶部显示菜单
|
||||
const topMenus = computed(() => {
|
||||
|
Reference in New Issue
Block a user