From eb7b73160270c2f2a714020b89d6d57260e01c8e Mon Sep 17 00:00:00 2001 From: zhouhang Date: Thu, 9 May 2024 22:34:33 +0800 Subject: [PATCH] feat(demo): add height option --- demo/App.vue | 9 ++++++++- demo/main.ts | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/demo/App.vue b/demo/App.vue index faa4951..8a6a354 100644 --- a/demo/App.vue +++ b/demo/App.vue @@ -20,6 +20,7 @@ const formState = reactive({ newFilename: 'newPackage.json', hideHeader: false, hideStat: false, + maxHeight: '', }) const oldString = ref(oldShortText.value) @@ -185,6 +186,12 @@ function toggleLang() { + + + {{ t('options.maxHeight') }} + + + @@ -194,7 +201,7 @@ function toggleLang() { :diff-style="formState.diffStyle" :force-inline-comparison="formState.forceInlineComparison" :output-format="formState.outputFormat" :context="formState.context" :trim="formState.trim" :no-diff-line-feed="formState.noDiffLineFeed" :filename="formState.filename" :new-filename="formState.newFilename" :hide-header="formState.hideHeader" :hide-stat="formState.hideStat" - @diff="printEvent" + :max-height="formState.maxHeight" @diff="printEvent" /> diff --git a/demo/main.ts b/demo/main.ts index a4f5cec..66078e0 100644 --- a/demo/main.ts +++ b/demo/main.ts @@ -47,6 +47,7 @@ const i18n = createI18n({ hideHeader: '隐藏首部', hideStatistics: '隐藏统计信息', forceInlineComparison: '强制行内对比', + maxHeight: '固定高度(带上单位)', }, }, en: { @@ -74,6 +75,7 @@ const i18n = createI18n({ hideHeader: 'Hide Header', hideStatistics: 'Hide Statistics', forceInlineComparison: 'Force Inline Comparison', + maxHeight: 'Height(with unit)', }, }, },