mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
解决pages页面不显示问题
This commit is contained in:
parent
df99ebfc8e
commit
d4759fecca
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "front-next",
|
||||
"version": "5.7.6",
|
||||
"version": "5.7.7",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"build": "vite build",
|
||||
|
@ -55,28 +55,27 @@ router.append = function (data) {
|
||||
d.name = d.path.substring(1);
|
||||
}
|
||||
|
||||
if (!d.component) {
|
||||
const url = d.viewPath;
|
||||
|
||||
if (url) {
|
||||
if (url.indexOf("http") == 0) {
|
||||
if (d.meta) {
|
||||
d.meta.iframeUrl = url;
|
||||
}
|
||||
|
||||
d.component = () => import(`/$/base/views/frame.vue`);
|
||||
} else {
|
||||
d.component = files["/src/" + url.replace("cool/", "")];
|
||||
}
|
||||
} else {
|
||||
d.redirect = "/404";
|
||||
}
|
||||
}
|
||||
|
||||
if (e.isPage) {
|
||||
router.addRoute(d);
|
||||
} else {
|
||||
if (!d.component) {
|
||||
const url = d.viewPath;
|
||||
|
||||
if (url) {
|
||||
if (url.indexOf("http") == 0) {
|
||||
if (d.meta) {
|
||||
d.meta.iframeUrl = url;
|
||||
}
|
||||
|
||||
d.component = () => import(`/$/base/views/frame.vue`);
|
||||
} else {
|
||||
d.component = files["/src/" + url.replace("cool/", "")];
|
||||
}
|
||||
} else {
|
||||
d.redirect = "/404";
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
router.addRoute("index", d);
|
||||
}
|
||||
});
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="app-views">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="caches">
|
||||
<component :is="Component" />
|
||||
</keep-alive>
|
||||
<!-- <keep-alive :include="caches"> -->
|
||||
<component :is="Component" />
|
||||
<!-- </keep-alive> -->
|
||||
</router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<li @click="refresh()">
|
||||
<el-tooltip content="刷新">
|
||||
<el-icon>
|
||||
<refresh />
|
||||
<refresh-icon />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</li>
|
||||
@ -77,7 +77,7 @@ import { useCool } from "/@/cool";
|
||||
import { deepTree, revDeepTree } from "/@/cool/utils";
|
||||
import { isArray } from "lodash";
|
||||
import { ContextMenu, useForm } from "@cool-vue/crud";
|
||||
import { Refresh, Operation, MoreFilled } from "@element-plus/icons-vue";
|
||||
import { Refresh as RefreshIcon, Operation, MoreFilled } from "@element-plus/icons-vue";
|
||||
import { useBase, checkPerm } from "/$/base";
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -4,7 +4,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script lang="ts" name="frame" setup>
|
||||
import { ref, watch, onMounted } from "vue";
|
||||
import { useCool } from "/@/cool";
|
||||
|
||||
|
5
src/modules/demo/pages/test.vue
Normal file
5
src/modules/demo/pages/test.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div>Test</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="tt" setup></script>
|
Loading…
Reference in New Issue
Block a user