Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
chore: autodetect code false
Browse files Browse the repository at this point in the history
  • Loading branch information
hibig committed Mar 5, 2024
1 parent 7c9f862 commit 0c8c37a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ declare module 'vue' {
ADescriptions: typeof import('@arco-design/web-vue')['Descriptions'];
ADivider: typeof import('@arco-design/web-vue')['Divider'];
ADoption: typeof import('@arco-design/web-vue')['Doption'];
ADropdown: typeof import('@arco-design/web-vue')['Dropdown'];
AEmpty: typeof import('@arco-design/web-vue')['Empty'];
AForm: typeof import('@arco-design/web-vue')['Form'];
AFormItem: typeof import('@arco-design/web-vue')['FormItem'];
Expand All @@ -26,7 +25,6 @@ declare module 'vue' {
AInput: typeof import('@arco-design/web-vue')['Input'];
AInputNumber: typeof import('@arco-design/web-vue')['InputNumber'];
AInputPassword: typeof import('@arco-design/web-vue')['InputPassword'];
AInputSearch: typeof import('@arco-design/web-vue')['InputSearch'];
ALayout: typeof import('@arco-design/web-vue')['Layout'];
ALayoutContent: typeof import('@arco-design/web-vue')['LayoutContent'];
ALayoutSider: typeof import('@arco-design/web-vue')['LayoutSider'];
Expand All @@ -50,7 +48,6 @@ declare module 'vue' {
ATag: typeof import('@arco-design/web-vue')['Tag'];
ATextarea: typeof import('@arco-design/web-vue')['Textarea'];
ATooltip: typeof import('@arco-design/web-vue')['Tooltip'];
AUpload: typeof import('@arco-design/web-vue')['Upload'];
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/components/highlight-block/code-viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
lang: {
type: String,
default: ''
default: 'json'
},
autodetect: {
type: Boolean,
Expand All @@ -31,6 +31,9 @@
() => props.lang,
(nv) => {
language.value = nv;
},
{
immediate: true
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/highlight-block/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="high-light-wrapper" :class="{ dark: appStore.isDark }">
<CodeViewer :lang="lang" :code="code" />
<CodeViewer :lang="lang" :code="code" :autodetect="false" />
<slot></slot>
</div>
</template>
Expand Down

0 comments on commit 0c8c37a

Please sign in to comment.