File tree Expand file tree Collapse file tree 2 files changed +33
-14
lines changed Expand file tree Collapse file tree 2 files changed +33
-14
lines changed Original file line number Diff line number Diff line change 1+ <script lang="ts" setup>
2+ const { tag, options } = defineProps <{
3+ tag: string ,
4+ options: string [],
5+ }>();
6+
7+ const selected = defineModel <string | null >({ default: null });
8+ </script >
9+
10+ <template >
11+ <span class =" input" >{{ tag }}:</span >
12+ <span class =" select" >
13+ <Select v-model =" selected" filter :options =" options" />
14+ </span >
15+ </template >
16+
17+ <style scoped>
18+ .input {
19+ font-size : 14.5px ;
20+ font-weight : bold ;
21+ padding-right : 10px ;
22+ color : var (--p-button-primary-background );
23+ }
24+
25+ .select {
26+ padding-right : 10px ;
27+ }
28+ </style >
Original file line number Diff line number Diff line change 33
44 <div v-if =" displayFilters" >
55 <div style =" padding : 6px 8px 6px 8px " >
6- <span class =" input" >User:</span >
7- <span class =" select" >
8- <Select v-model =" selected.user" filter :options =" users" :optionLabel =" label" />
9- </span >
10-
11- <span class =" input" >Repo:</span >
12- <span class =" select" >
13- <Select v-model =" selected.repo" filter :options =" repos" :optionLabel =" label" />
14- </span >
15-
6+ <DropDownSimple v-model =" selected.user" tag =" User" :options =" users" />
7+ <DropDownSimple v-model =" selected.repo" tag =" Repo" :options =" repos" />
168 <DropDownWithCount v-model =" selected.target" tag =" Target" :all =" ALL_TARGETS" :counts =" targets" />
17-
189 </div >
1910
2011 <div style =" padding : 2px 8px 10px 8px " >
@@ -48,8 +39,8 @@ highlightRust();
4839const label = (a : string ) => a ;
4940
5041const selected = reactive <{
51- user: string ,
52- repo: string ,
42+ user: string | null ,
43+ repo: string | null ,
5344 target: string | null ,
5445 pkg: string | null ,
5546 features: string | null ,
@@ -79,7 +70,7 @@ githubFetch<UserRepo>({ path: "ui/user_repo.json" })
7970
8071// Init filters.
8172const users = computed (() => Object .keys (user_repo .value ).sort ());
82- const repos = computed (() => user_repo .value [selected .user ]);
73+ const repos = computed (() => selected . user ? user_repo .value [selected .user ] : [ ]);
8374const targets = computed <DropDownOptions >(() => {
8475 const t = basic .value ?.targets ;
8576 return t ? gen_targets (t ) : emptyOptions ();
You can’t perform that action at this time.
0 commit comments