fix 一些使用问题

This commit is contained in:
maxbad
2023-05-07 14:16:46 +08:00
parent 9ac036a542
commit e8a0a41cb4
10 changed files with 24 additions and 23 deletions

View File

@@ -38,6 +38,7 @@
"date-fns": "^2.28.0",
"echarts": "^5.3.2",
"element-resize-detector": "^1.2.4",
"highlight.js": "^11.8.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"mitt": "^2.1.0",

View File

@@ -118,7 +118,7 @@ export function getChildrenRouter(routerMap: Array<any>) {
* 判断根路由 Router
* */
export function isRootRouter(item) {
if (item.meta?.alwaysShow != true && item.children?.length === 1) {
if (item.meta?.alwaysShow != true && item.children?.length === 0) {
return true;
}

View File

@@ -120,6 +120,7 @@
NIcon,
NTag,
NIconWrapper,
NAvatar,
useMessage,
NImage,
useDialog,
@@ -159,25 +160,13 @@
});
} else {
return h(
NIconWrapper,
NAvatar,
{
size: 48,
borderRadius: 8,
color: '#2D8CF0',
},
{
default: () =>
h(
NIcon,
{
size: 36,
style: {
marginTop: '-8px',
},
},
{
default: () => h(getIconComponent(row.logo)),
}
),
default: () => h(getIconComponent(row.logo)),
}
);
}

View File

@@ -10,7 +10,7 @@
{{ view.path }}
</n-tag>
<n-scrollbar class="code-scrollbar" trigger="none">
<n-code :code="view.content" />
<n-code :code="view.content" :hljs="hljs" language="goLang" show-line-numbers />
</n-scrollbar>
</n-tab-pane>
</n-tabs>
@@ -19,6 +19,8 @@
<script lang="ts" setup>
import { computed } from 'vue';
import hljs from 'highlight.js/lib/core';
import goLang from 'highlight.js/lib/languages/go';
import { cloneDeep } from 'lodash-es';
import {
CheckmarkCircle,
@@ -27,6 +29,7 @@
HelpCircleOutline,
RemoveCircleOutline,
} from '@vicons/ionicons5';
hljs.registerLanguage('goLang', goLang);
interface Props {
previewModel: any;

View File

@@ -15,7 +15,6 @@ export const columns = [
{
ghost: true,
strong: true,
tertiary: true,
size: 'small',
text: true,
iconPlacement: 'right',