This repository was archived by the owner on Feb 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 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
7980import 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+
8196export 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' ,
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments