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",
|
"name": "front-next",
|
||||||
"version": "5.7.6",
|
"version": "5.7.7",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
@ -55,28 +55,27 @@ router.append = function (data) {
|
|||||||
d.name = d.path.substring(1);
|
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) {
|
if (e.isPage) {
|
||||||
router.addRoute(d);
|
router.addRoute(d);
|
||||||
} else {
|
} 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);
|
router.addRoute("index", d);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-views">
|
<div class="app-views">
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component }">
|
||||||
<keep-alive :include="caches">
|
<!-- <keep-alive :include="caches"> -->
|
||||||
<component :is="Component" />
|
<component :is="Component" />
|
||||||
</keep-alive>
|
<!-- </keep-alive> -->
|
||||||
</router-view>
|
</router-view>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<li @click="refresh()">
|
<li @click="refresh()">
|
||||||
<el-tooltip content="刷新">
|
<el-tooltip content="刷新">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<refresh />
|
<refresh-icon />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</li>
|
</li>
|
||||||
@ -77,7 +77,7 @@ import { useCool } from "/@/cool";
|
|||||||
import { deepTree, revDeepTree } from "/@/cool/utils";
|
import { deepTree, revDeepTree } from "/@/cool/utils";
|
||||||
import { isArray } from "lodash";
|
import { isArray } from "lodash";
|
||||||
import { ContextMenu, useForm } from "@cool-vue/crud";
|
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";
|
import { useBase, checkPerm } from "/$/base";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" name="frame" setup>
|
||||||
import { ref, watch, onMounted } from "vue";
|
import { ref, watch, onMounted } from "vue";
|
||||||
import { useCool } from "/@/cool";
|
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