From 0c8c37aff1e43e16b67396ce1087389fcfc0554a Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 5 Mar 2024 20:18:10 +0800 Subject: [PATCH] chore: autodetect code false --- components.d.ts | 3 --- src/components/highlight-block/code-viewer.vue | 5 ++++- src/components/highlight-block/index.vue | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components.d.ts b/components.d.ts index ed0d8a1d..c6110a56 100644 --- a/components.d.ts +++ b/components.d.ts @@ -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']; @@ -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']; @@ -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']; } } diff --git a/src/components/highlight-block/code-viewer.vue b/src/components/highlight-block/code-viewer.vue index da9ff559..8efc642c 100644 --- a/src/components/highlight-block/code-viewer.vue +++ b/src/components/highlight-block/code-viewer.vue @@ -13,7 +13,7 @@ }, lang: { type: String, - default: '' + default: 'json' }, autodetect: { type: Boolean, @@ -31,6 +31,9 @@ () => props.lang, (nv) => { language.value = nv; + }, + { + immediate: true } ); diff --git a/src/components/highlight-block/index.vue b/src/components/highlight-block/index.vue index d823bf92..3d4d1f92 100644 --- a/src/components/highlight-block/index.vue +++ b/src/components/highlight-block/index.vue @@ -1,6 +1,6 @@