Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit daa6920

Browse files
committed
chore: Modify demo setting
1 parent b8258df commit daa6920

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

dev/App.vue

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,34 @@
7474
</template>
7575

7676
<script lang="ts">
77-
import { defineComponent, ref, watch } from 'vue';
77+
import { Mode, Theme } from '../src/types';
78+
import { defineComponent, Ref, ref, watch } from 'vue';
7879
7980
import template from './template';
8081
82+
interface ListItem {
83+
key: string;
84+
title: string;
85+
language: string;
86+
inputDelay: number;
87+
virtualScroll:
88+
| false
89+
| {
90+
height: number;
91+
lineMinHeight: number;
92+
delay: number;
93+
};
94+
}
95+
8196
export default defineComponent({
8297
setup() {
83-
const modes = ref(['split', 'unified']);
84-
const mode = ref('split');
85-
const selected = ref<null | {}>(null);
86-
const themes = ref(['dark', 'light', 'custom']);
87-
const theme = ref('dark');
98+
const modes = ref<Mode[]>(['split', 'unified']);
99+
const mode = ref<Mode>('split');
100+
const selected = ref<ListItem | null>(null);
101+
const themes = ref<Theme[]>(['dark', 'light', 'custom']);
102+
const theme = ref<Theme>('dark');
88103
const folding = ref(false);
89-
const list = ref([
104+
const list = ref<ListItem[]>([
90105
{
91106
key: 'javascript',
92107
title: 'javascript',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"url": "https://github.com/hoiheart/vue-diff/issues"
2424
},
2525
"scripts": {
26-
"dev": "vite -c vite.config.demo.ts",
26+
"dev": "vite -c vite.config.docs.ts",
2727
"build": "vue-tsc --noEmit && vite build",
2828
"predeploy": "vite build -c vite.config.docs.ts",
2929
"deploy": "gh-pages -d docs -r origin",

0 commit comments

Comments
 (0)