mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 09:33:52 +08:00
fix 一些使用问题
This commit is contained in:
@@ -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",
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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)),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -15,7 +15,6 @@ export const columns = [
|
||||
{
|
||||
ghost: true,
|
||||
strong: true,
|
||||
tertiary: true,
|
||||
size: 'small',
|
||||
text: true,
|
||||
iconPlacement: 'right',
|
||||
|
Reference in New Issue
Block a user